Bug 12976: Fix the footer if several tax rate exist
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 14 Nov 2014 14:51:24 +0000 (15:51 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 19 Feb 2015 12:46:35 +0000 (09:46 -0300)
If more that 1 tax rate exist, 1 total ligne should be display in the
footer.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
acqui/invoice.pl

index 59f2edc..5fe3b27 100755 (executable)
@@ -130,14 +130,14 @@ foreach my $order (@$orders) {
     );
     my $line = get_infos( $order, $bookseller);
 
-    $foot{$$line{gstgsti}}{gstrate} = $$line{gstrate};
-    $foot{$$line{gstgsti}}{gstvalue} += $$line{gstvalue};
+    $foot{$$line{gstrate}}{gstrate} = $$line{gstrate};
+    $foot{$$line{gstrate}}{gstvalue} += $$line{gstvalue};
     $total_gstvalue += $$line{gstvalue};
-    $foot{$$line{gstgsti}}{quantity}  += $$line{quantity};
+    $foot{$$line{gstrate}}{quantity}  += $$line{quantity};
     $total_quantity += $$line{quantity};
-    $foot{$$line{gstgsti}}{totalgste} += $$line{totalgste};
+    $foot{$$line{gstrate}}{totalgste} += $$line{totalgste};
     $total_gste += $$line{totalgste};
-    $foot{$$line{gstgsti}}{totalgsti} += $$line{totalgsti};
+    $foot{$$line{gstrate}}{totalgsti} += $$line{totalgsti};
     $total_gsti += $$line{totalgsti};
 
     $line->{orderline} = $line->{parent_ordernumber};