X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep102.php;h=0034d786654176b6add8c467cce7fffb7cf761ca;hb=a9e2c0e710a5431ce3c31ef89d4c94bf69538238;hp=beea87bcae78a995e0d93ec27de278231c2318b2;hpb=40da959b32eb27fcb0422207a284eed13cc27d7e;p=fa-stable.git diff --git a/reporting/rep102.php b/reporting/rep102.php index beea87bc..0034d786 100644 --- a/reporting/rep102.php +++ b/reporting/rep102.php @@ -46,9 +46,9 @@ function get_invoices($customer_id, $to, $all=true) $sql = "SELECT ".TB_PREF."debtor_trans.type, ".TB_PREF."debtor_trans.reference, ".TB_PREF."debtor_trans.tran_date, $value as Balance, - IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= 0,$value,0) AS Due, - IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $PastDueDays1,$value,0) AS Overdue1, - IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $PastDueDays2,$value,0) AS Overdue2 + IF ((TO_DAYS('$todate') - TO_DAYS($due)) > 0,$value,0) AS Due, + IF ((TO_DAYS('$todate') - TO_DAYS($due)) > $PastDueDays1,$value,0) AS Overdue1, + IF ((TO_DAYS('$todate') - TO_DAYS($due)) > $PastDueDays2,$value,0) AS Overdue2 FROM ".TB_PREF."debtors_master, ".TB_PREF."debtor_trans