From 6f8265689a0f1c003724293594e81233437be882 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 14 Oct 2021 19:26:20 +0200 Subject: [PATCH] Cosmetic #0002081: PRINTTVA : l'export PDF de la TVA --- include/export/export_printtva_pdf.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/export/export_printtva_pdf.php b/include/export/export_printtva_pdf.php index 624229f7c..876e8484e 100644 --- a/include/export/export_printtva_pdf.php +++ b/include/export/export_printtva_pdf.php @@ -104,11 +104,10 @@ for ($i = 0; $i < $nb_array; $i++) { if ($ledger_name != $array[$i]['jrn_def_name']) { // Display totals $pdf->SetFont('DejaVuCond', 'B', 7); - $pdf->line_new(); - $pdf->write_cell(70, 5, ""); + $pdf->write_cell(80, 5, ""); for ($e=2;$e<$nb_col;$e++){ $colname=$a_col[$e]; - $pdf->write_cell(40, 5, nbm($a_tot[$colname]), 0, 0, 'R'); + $pdf->write_cell(40, 5, nbm($a_tot[$colname]), 1, 0, 'R'); $a_tot[$colname]=0; } $pdf->line_new(); @@ -253,12 +252,11 @@ for ($i = 0; $i < $nb_array; $i++) { if ($ledger_name != $array[$i]['jrn_def_name']) { // Display totals $pdf->SetFont('DejaVuCond', 'B', 7); - $pdf->line_new(); - $pdf->write_cell(70, 5, ""); + $pdf->write_cell($a_size['tva_label']+$a_size['tva_rate'], 5, ""); for ($e=2;$e<$nb_col;$e++){ $t_idx=$a_colp[$e]; $colname=$a_colp[$e]; - $pdf->write_cell($a_size[$t_idx], 5, nbm($a_tot[$colname]), 0, 0, 'R'); + $pdf->write_cell($a_size[$t_idx], 5, nbm($a_tot[$colname]), 1, 0, 'R'); $a_tot[$colname]=0; } $pdf->line_new(); @@ -279,8 +277,12 @@ for ($i = 0; $i < $nb_array; $i++) { } else { $pdf->write_cell($a_size[$t_idx], 5,$a_purchase_header[$e], 1, 0, 'R'); } - $a_tot[$colname]=0; } + for ($e=2;$e<$nb_col;$e++){ + $colname=$a_colp[$e]; + $a_tot[$colname]=bcadd($a_tot[$colname],$array[$i][$colname]); + } + $pdf->line_new(); } $pdf->SetFont('DejaVuCond', '', 7); for ($e=0;$e<$nb_col;$e++){