X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fincludes%2Fdb%2Fgl_db_banking.inc;h=cbeea72bbcc647691a408729d48182cb43177946;hb=9451db1760036985de791ba24c442801e37f37de;hp=a26d92e71baf236b51a0de72f7d5f0043fcfb738;hpb=4fcb2ed2946898d413f18fe9e2be33d1b16b8749;p=fa-stable.git diff --git a/gl/includes/db/gl_db_banking.inc b/gl/includes/db/gl_db_banking.inc index a26d92e7..cbeea72b 100644 --- a/gl/includes/db/gl_db_banking.inc +++ b/gl/includes/db/gl_db_banking.inc @@ -92,7 +92,7 @@ function get_cust_account_curr_balances($date) { $to = date2sql($date); - $sql = "SELECT SUM(IF(t.type =".ST_CUSTCREDIT." OR t.type = ".ST_CUSTPAYMENT." OR t.type = ".ST_BANKDEPOSIT.", + $sql = "SELECT SUM(IF(t.type =".ST_CUSTCREDIT." OR t.type = ".ST_CUSTPAYMENT." OR t.type = ".ST_BANKDEPOSIT." OR t.type = ".ST_JOURNAL.", -(t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount), (t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount))) AS amount, dt.debtor_no, dt.name, dt.curr_code, b.receivables_account