X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep202.php;h=4b788eb62fe46f4e0ad6521c6e00afaafb067957;hb=107a22ab168c1102f3f534a22cd5b8290331f17d;hp=7ba8b0d7733ad3d5dcc53d1d3d36789af5ba74b6;hpb=7c5836f0236b223954d803717762a15942ec0ca2;p=fa-stable.git diff --git a/reporting/rep202.php b/reporting/rep202.php index 7ba8b0d7..4b788eb6 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -32,8 +32,9 @@ print_aged_supplier_analysis(); function get_invoices($supplier_id, $to, $all=true) { $todate = date2sql($to); - $PastDueDays1 = get_company_pref('past_due_days'); - $PastDueDays2 = 2 * $PastDueDays1; + $current = 1; + $PastDueDays1 = get_company_pref('past_due_days') + $current; + $PastDueDays2 = 2 * $PastDueDays1 + $current; // Revomed allocated from sql if ($all) @@ -47,7 +48,7 @@ function get_invoices($supplier_id, $to, $all=true) ".TB_PREF."supp_trans.reference, ".TB_PREF."supp_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)) >= $current,$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