From: Joe Hunt Date: Fri, 29 Oct 2021 08:04:45 +0000 (+0200) Subject: Error calculating customer aging regarding journal entries. Fixed. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=9e61d0860639941a0aceace8f4c14ced1c635e7f Error calculating customer aging regarding journal entries. Fixed. --- 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,