From a27667416f35f4e5d61227c064f9093d06b7b08b 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 e40a10a..cd35764 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2182,11 +2182,10 @@ sub GetLateOrders { AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00') "; my $having = ""; - 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 ) { @@ -2198,7 +2197,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