示例#1
0
 function AutoFill($meminfo)
 {
     $this->SetFont('Arial', '', 10);
     if ($meminfo['stock']['paid-in-full']) {
         $this->SetXY(15, 94);
     } else {
         $this->SetXY(15, 106);
     }
     $this->Cell(0, 0, 'X', 0, 1);
     if ($meminfo['stock']['b'] > 0 && $meminfo['stock']['b'] < 80) {
         $this->SetXY(125, 106);
         $this->Cell(0, 0, sprintf('%.2f', $meminfo['stock']['b']), 0, 1);
     }
     if ($meminfo['stock']['total'] < 100) {
         $this->SetXY(60, 113);
         $this->Cell(0, 0, sprintf('%.2f', 100 - $meminfo['stock']['total']), 0, 1);
         $this->SetXY(135, 113);
         $start = strtotime($meminfo['date']);
         $nextyear = mktime(0, 0, 0, date('n', $start), date('j', $start), date('Y', $start) + 1);
         $this->Cell(0, 0, date('Y-m-d', $nextyear), 0, 1);
     }
     $primary = \COREPOS\Fannie\API\Member\MemberREST::getPrimary($meminfo);
     $household = \COREPOS\Fannie\API\Member\MemberREST::getHousehold($meminfo);
     $this->SetXY(53, 134);
     $this->Cell(0, 0, $this->getName($primary, 0), 0, 1);
     $this->SetXY(20, 153);
     $this->Cell(0, 0, $this->getName($household, 0), 0, 1);
     $this->SetXY(75, 153);
     $this->Cell(0, 0, $this->getName($household, 1), 0, 1);
     $this->SetXY(135, 153);
     $this->Cell(0, 0, $this->getName($household, 2), 0, 1);
     $this->SetXY(36, 161);
     $this->Cell(0, 0, $meminfo['addressFirstLine'], 0, 1);
     $this->SetXY(146, 161);
     $this->Cell(0, 0, $meminfo['addressSecondLine'], 0, 1);
     $this->SetXY(22, 169);
     $this->Cell(0, 0, $meminfo['city'], 0, 1);
     $this->SetXY(98, 170);
     $this->Cell(0, 0, $meminfo['state'], 0, 1);
     $this->SetXY(149, 170);
     $this->Cell(0, 0, $meminfo['zip'], 0, 1);
     $this->SetXY(25, 178);
     $this->Cell(0, 0, $primary[0]['phone'], 0, 1);
     $phoneAlt = '';
     $this->SetXY(104, 179);
     $this->Cell(0, 0, $phoneAlt, 0, 1);
     $this->SetXY(24, 186);
     $this->Cell(0, 0, $primary[0]['email'], 0, 1);
     $this->SetXY(169, 188);
     $this->Cell(0, 0, $meminfo['contactAllowed'] ? 'X' : '', 0, 1);
     $this->SetXY(176, 188);
     $this->Cell(0, 0, !$meminfo['contactAllowed'] ? 'X' : '', 0, 1);
     $this->Image($meminfo['signature'], 35, 203, 60, 0, 'jpg');
     $this->SetXY(142, 209);
     $this->Cell(0, 0, date('Y-m-d', strtotime($meminfo['date'])), 0, 1);
     $this->SetXY(40, 231);
     $this->Cell(0, 0, $meminfo['cardNo'], 0, 1);
     $this->SetXY(151, 232);
     $this->Cell(0, 0, $meminfo['stock']['total'], 0, 1);
 }
示例#2
0
 protected function get_id_view()
 {
     $this->addScript('../../../src/javascript/signature_pad-1.5.0/signature_pad.js');
     $this->addScript('sig.js');
     $mem = \COREPOS\Fannie\API\member\MemberREST::get($this->id);
     $primary = \COREPOS\Fannie\API\Member\MemberREST::getPrimary($mem);
     if ($mem === false) {
         return '<div class="alert alert-danger">Owner not found</div>' . $this->get_view();
     }
     $ret = '<form method="post" id="sign-form">
         <p>
             <label>Owner</label>
             <input type="hidden" name="id" value="' . $this->id . '" />
             ' . $mem['cardNo'] . ' ' . $primary[0]['firstName'] . ' ' . $primary[0]['lastName'] . '
         </p>
         <p id="sign-p">
             <label>Sign Here</label>
             <canvas id="sign-canvas" 
                 style="width:100%;height:200px;border-radius:4px;border-style:solid;border-color:black;border-width:1px;">
             </canvas>
         </p>
         <p class="clearfix">
             <button type="button" class="btn btn-default btn-lg pull-left" id="btn-clear">Clear</button>
             <button type="button" class="btn btn-default btn-lg pull-right" id="btn-accept">Accept</button>
         </p>
         </form>';
     return $ret;
 }