From 3f411535a5b0d3d87a2e246ffd8732579b5b07c6 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 18 Jul 2023 14:47:43 +0000 Subject: [PATCH] Bug 34305: Account for negative prices on acq details tab The acquisition detail tab shows the estimated cost while the order is still pending and the actual price, once received. At least the tool tip on the table header row says so. This was not working correctly. To test: * Create a basket * Create a new order line with a negative list price (credit) * Close the basket * Verify that the price shows correctly in the acquisition details tab on the record * Receive the order and enter a different negative actual price. * Reload detail view, verify it still shows the estimated price * Apply patch, restart_all * Verify now the correct actual price displays * Create another basket and order line * Verify while not yet received, it still shows the estimated price Signed-off-by: Caroline Cyr La Rose Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 758712dc0140bb40cf0254125d006eed6c590b3a) Signed-off-by: Fridolin Somers (cherry picked from commit cc21197125b8c4a8d237c5cf41cacbcf55f12422) Signed-off-by: Pedro Amorim --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 7286a36dd3..3e634f8583 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -894,7 +894,7 @@ [% END %] [% order.quantity | html %] - [% IF ( order.unitprice_tax_included > 0 ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %] + [% IF ( order.orderstatus == "complete" ) %][% order.unitprice_tax_included | $Price %][% ELSE %][% order.ecost_tax_included | $Price %][% END %] [% order.order_internalnote | html %] [% IF order.subscriptionid %] -- 2.39.2