From 9e61d0860639941a0aceace8f4c14ced1c635e7f Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 29 Oct 2021 10:04:45 +0200 Subject: [PATCH] Error calculating customer aging regarding journal entries. Fixed. --- sales/includes/db/customers_db.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sales/includes/db/customers_db.inc b/sales/includes/db/customers_db.inc index 3f16159e..8d423918 100644 --- a/sales/includes/db/customers_db.inc +++ b/sales/includes/db/customers_db.inc @@ -97,7 +97,7 @@ function get_customer_details($customer_id, $to=null, $all=true) $sql .= " AND debtor.debtor_no = ".db_escape($customer_id); if (!$all) - $sql .= " AND ABS(trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount - trans.alloc) > ".FLOAT_COMP_DELTA; + $sql .= " AND ABS(trans.ov_amount) + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount - trans.alloc > ".FLOAT_COMP_DELTA; $sql .= " GROUP BY debtor.name, terms.terms, -- 2.30.2