Esempio n. 1
0
 }
 $total_fp += $row['f_total'];
 $row['f_total'] = number_format($row['f_total'], 2);
 if ($row['f_serie'] === '0') {
     $row['f_serie'] = '';
 }
 //
 // Print objects
 //
 $aop->text(22 + $aop->right(62, 6, $row['c_exe']), $print_height, $row['c_exe'], 6);
 $aop->text(97, $print_height, date('d/m/y', $row['c_date']), 6);
 $aop->text(148 + $aop->right(50, 6, $row['p_nit']), $print_height, $row['p_nit'], 6);
 if ($row['f_serie']) {
     $aop->text(345, $print_height, $row['f_serie'], 6);
 }
 $print_height_add = $aop->blocks(125, 125, $row['p_name'], $row['c_text'], $print_height, 6, 205, 400, $line_height);
 $aop->text(346 + $aop->right(50, 6, $row['f_fact']), $print_height, $row['f_fact'], 6);
 $aop->text(529 + $aop->right(50, 6, $row['f_total']), $print_height, $row['f_total'], 6);
 $print_height += $line_height * $print_height_add;
 if ($print_height > 625 || $i + 1 == $total_rows) {
     if ($i + 1 < $total_rows) {
         $write_total_fp = 'VAN';
         $aop->text(482 + $aop->right($aop->pdf->getTextWidth(6, $write_total_fp), 6, $write_total_fp), 636, $write_total_fp, 6);
     }
     $new_total_fp = number_format($total_fp, 2);
     $aop->text(507 + $aop->right(70, 7, $new_total_fp), 645, $new_total_fp, 7);
     if ($print_height > 625) {
         $new_page = true;
         $create_page = true;
     }
 }