示例#1
0
 function getTFoot($tbody)
 {
     $total = 0;
     foreach ($tbody[0] as $tb) {
         $total += preg_replace("/([^0-9\\.])/i", "", $tb->modal);
     }
     $this->tfoot[0][2] = 'TOTAL';
     $this->tfoot[0][3] = $this->toRp($total);
     $pcs = 0;
     $kg = 0;
     foreach ($tbody[1] as $tb) {
         $pcs += $tb->pcs;
         $kg += $tb->kg;
     }
     $this->tfoot[1][3] = 'TOTAL';
     $this->tfoot[1][4] = "{$pcs} PCs";
     $this->tfoot[1][5] = "{$kg} Kg";
     $total = 0;
     $satuan = '';
     foreach ($tbody[2] as $tb) {
         $total += $tb->qty;
         $satuan = $tb->satuan;
     }
     $this->tfoot[2][3] = 'TOTAL';
     $this->tfoot[2][4] = "{$total} {$satuan}";
     $total = 0;
     foreach ($tbody[3] as $tb) {
         $total += $tb->qty;
     }
     $this->tfoot[3][3] = 'TOTAL';
     $this->tfoot[3][4] = "{$total} PCs";
     return parent::getTFoot($tbody);
 }
示例#2
0
 function getTFoot($tbody)
 {
     $total = 0;
     foreach ($tbody as $tb) {
         $total += preg_replace("/([^0-9\\.])/i", "", $tb->nominal);
     }
     $this->tfoot[3] = 'TOTAL';
     $this->tfoot[4] = $this->toRp($total);
     return parent::getTFoot($tbody);
 }
示例#3
0
 function getTFoot($tbody)
 {
     $total = 0;
     foreach ($tbody as $tb) {
         $total += preg_replace("/([^0-9\\.])/i", "", $tb->saldo);
     }
     $this->tfoot[1] = 'TOTAL HUTANG';
     $this->tfoot[2] = $this->toRp($total);
     return parent::getTFoot($tbody);
 }
示例#4
0
 function getTFoot($tbody)
 {
     $qty = 0;
     $total = 0;
     $satuan = 'PCs';
     foreach ($tbody as $tb) {
         $qty += $tb->qty;
         $total += preg_replace("/([^0-9\\.])/i", "", $tb->total);
     }
     $this->tfoot[4] = 'TOTAL';
     $this->tfoot[5] = "{$qty} {$satuan}";
     $this->tfoot[6] = $this->toRp($total);
     return parent::getTFoot($tbody);
 }
示例#5
0
 function getTFoot($tbody)
 {
     $masuk = 0;
     $keluar = 0;
     $saldo = 0;
     foreach ($tbody as $tb) {
         $masuk += preg_replace("/([^0-9\\.])/i", "", $tb->masuk);
         $keluar += preg_replace("/([^0-9\\.])/i", "", $tb->keluar);
     }
     $saldo = $masuk - $keluar;
     $this->tfoot[2] = 'TOTAL';
     $this->tfoot[3] = $this->toRp($masuk);
     $this->tfoot[4] = $this->toRp($keluar);
     $this->tfoot[5] = $this->toRp($saldo);
     $this->tfoot[5] = $this->tfoot[5] < 0 ? "RUGI " . $this->tfoot[5] * -1 : "LABA " . $this->tfoot[5];
     return parent::getTFoot($tbody);
 }
 function getTFoot($tbody)
 {
     $masuk = 0;
     $keluar = 0;
     $stock = 0;
     $satuan = '';
     foreach ($tbody as $tb) {
         $satuan = $tb->satuan;
         $masuk += $tb->masuk;
         $keluar += $tb->keluar;
     }
     $stock = $masuk - $keluar;
     $this->tfoot[3] = 'TOTAL';
     $this->tfoot[4] = "{$masuk} {$satuan}";
     $this->tfoot[5] = "{$keluar} {$satuan}";
     $this->tfoot[6] = "{$stock} {$satuan}";
     return parent::getTFoot($tbody);
 }