trans.alloc AS Allocated,
((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue,
(ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc <= ".FLOAT_COMP_DELTA.") AS Settled
FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier
WHERE supplier.supplier_id = trans.supplier_id
trans.alloc AS Allocated,
((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue,
(ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount) - trans.alloc <= ".FLOAT_COMP_DELTA.") AS Settled
FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier
WHERE supplier.supplier_id = trans.supplier_id