noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 22/33: Cosmetic #0002081: PRINTTVA : l'export


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 22/33: Cosmetic #0002081: PRINTTVA : l'export PDF de la TVA
Date: Thu, 11 Nov 2021 06:02:49 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 6f8265689a0f1c003724293594e81233437be882
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Oct 14 19:26:20 2021 +0200

    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 624229f..876e848 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++){



reply via email to

[Prev in Thread] Current Thread [Next in Thread]