From 7ca8263e37281cb60f0e527f541ae1e56256432b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 18 Apr 2018 11:38:24 +0000 Subject: [PATCH] Bug 18736: (follow-up) Undo changes to GetLateOrders GetLateOrders calculates subtotal based on rrp which is a 2 decimal precision field. If we need more precision here it should be fixed on a separate bug --- C4/Acquisition.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 6d06f1f..37442d6 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2186,7 +2186,7 @@ sub GetLateOrders { if ($dbdriver eq "mysql") { $select .= " aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, - (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * " . _get_rounding_sql("aqorders.rrp") . " AS subtotal, + (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, DATEDIFF(CAST(now() AS date),closedate) AS latesince "; if ( defined $delay ) { @@ -2198,7 +2198,7 @@ sub GetLateOrders { # FIXME: account for IFNULL as above $select .= " aqorders.quantity AS quantity, - aqorders.quantity * "._get_rounding_sql("aqorders.rrp")." AS subtotal, + aqorders.quantity * aqorders.rrp AS subtotal, (CAST(now() AS date) - closedate) AS latesince "; if ( defined $delay ) { -- 2.1.4