From 454bef0b795ad5ab38b659b0366d9edd1f592dd7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 24 Mar 2014 10:11:47 +0100 Subject: [PATCH] Bug 10613: (follow-up) fix QA issues This patch fixes the following QA issue: FAIL acqui/invoice.pl FAIL valid Useless use of private variable in void context Signed-off-by: Jacek Ablewicz Signed-off-by: Katrin Fischer Patch passes all tests and QA script. Specifically checked the t/db_depenedent/Acq* tests. A test plan could be: 0) Add a value in the gist pref (0.1 or 0.25 or something else easy). 1) a) Create a supplier "10613 0 0" with List item price includes tax: No Invoice item price includes tax: No Tax: 10% b) Create a supplier "10613 0 1" with List item price includes tax: No Invoice item price includes tax: Yes Tax: 10% c) Create a supplier "10613 1 0" with List item price includes tax: Yes Invoice item price includes tax: No Tax: 10% d) Create a supplier "10613 1 1" with List item price includes tax: Yes Invoice item price includes tax: Yes Tax: 10% 2) Create a basket for each supplier a) 00 List price: 10.00 (11.00 with 10% taxes) b) 01 List price: 10.00 (11.00 with 10% taxes) c) 10 List price: 10.00 (9.09 without taxes) d) 11 List price: 10.00 (9.09 without taxes) Note: Information on the basket page is shown correctly. If you look at the list of ordered items for the fund, the list price is used. 3) Create 1+ order(s) with 1+ item(s) for each basket with a discount and a gst value. 4) Close the baskets 5) Receive the items Left actual price as suggested: a) 00 Actual cost: 10.00 b) 01 Actual cost: 11.00 c) 10 Actual cost: 9.09 d) 11 Actual cost: 10.00 Calculations on the invoice page now all appear to be correct. Note: When you take a look at the 'ordered' list for the fund, the actual price is used as entered. 6) Go on acqui/invoice.pl?invoiceid=XX acqui/basket.pl?basketno=YY for each basket/invoice, click on the "Show all details" checkbox and verify that the values are all correct. Calculations are exactly the same for tax registered yes and no. Signed-off-by: Galen Charlton --- acqui/invoice.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/acqui/invoice.pl b/acqui/invoice.pl index c59c490f3b..95065c9cff 100755 --- a/acqui/invoice.pl +++ b/acqui/invoice.pl @@ -123,9 +123,8 @@ foreach my $order (@$orders) { $foot{$$line{gstgsti}}{totalgsti} += $$line{totalgsti}; $total_gsti += $$line{totalgsti}; - my %row = %{ $order, $line }; - $row{'orderline'} = $row{'parent_ordernumber'}; - push @orders_loop, \%row; + $line->{orderline} = $line->{parent_ordernumber}; + push @orders_loop, $line; } push @foot_loop, map {$_} values %foot; -- 2.39.5