From 3a187f7f0793959da140c7f812448c0aaad596d0 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 30 Jan 2018 15:06:31 +0000 Subject: [PATCH] Bug 18736: (follow-up) fix wrong call to _get_rounding_sql --- C4/Acquisition.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 94e15a2..0f07633 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2183,11 +2183,10 @@ sub GetLateOrders { AND aqbasket.closedate IS NOT NULL AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') "; - my ($round_sql_start,$round_sql_end) = _get_rounding_sql(); if ($dbdriver eq "mysql") { $select .= " aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, - (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * $round_sql_start aqorders.rrp $round_sql_end AS subtotal, + (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * " . _get_rounding_sql("aqorders.rrp") . " AS subtotal, DATEDIFF(CAST(now() AS date),closedate) AS latesince "; if ( defined $delay ) { @@ -2199,7 +2198,7 @@ sub GetLateOrders { # FIXME: account for IFNULL as above $select .= " aqorders.quantity AS quantity, - aqorders.quantity * $round_sql_start aqorders.rrp $round_sql_end AS subtotal, + aqorders.quantity * "._get_rounding_sql("aqorders.rrp")." AS subtotal, (CAST(now() AS date) - closedate) AS latesince "; if ( defined $delay ) { -- 2.1.4