X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep102.php;h=9fb6459dd26001b2662c26e6f976203338468ec2;hb=3974cfebf97c03e07b0beb608ae63b84b1e0f908;hp=acbf3624c3ceaaf615956b2ad09df7f214a8c834;hpb=fa43a9c974d05b77517a0d8e3e510ef4a088632e;p=fa-stable.git diff --git a/reporting/rep102.php b/reporting/rep102.php index acbf3624..9fb6459d 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 @@ -69,7 +69,7 @@ function get_invoices($customer_id, $to, $all=true) function print_aged_customer_analysis() { - global $path_to_root, $systypes_array; + global $path_to_root, $systypes_array, $SysPrefs; $to = $_POST['PARAM_0']; $fromcust = $_POST['PARAM_1']; @@ -238,16 +238,15 @@ function print_aged_customer_analysis() $rep->Line($rep->row - 8); if ($graphics) { - global $decseps, $graph_skin; $pg->x = array(_('Current'), $nowdue, $pastdue1, $pastdue2); $pg->title = $rep->title; $pg->axis_x = _("Days"); $pg->axis_y = _("Amount"); $pg->graphic_1 = $to; $pg->type = $graphics; - $pg->skin = $graph_skin; + $pg->skin = $SysPrefs->graph_skin; $pg->built_in = false; - $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); + $pg->latin_notation = ($SysPrefs->decseps[user_dec_sep()] != "."); $filename = company_path(). "/pdf_files/". uniqid("").".png"; $pg->display($filename, true); $w = $pg->width / 1.5; @@ -262,4 +261,3 @@ function print_aged_customer_analysis() $rep->End(); } -?>