- 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