X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep202.php;h=0e122ab4f25a4f5c6bc9587a896dc14e030a3d06;hb=0bb9ce50f39b09b93005c45a49d9c47c4521267c;hp=04d1afa1d5365b735759ebde3e44376685740745;hpb=3593bf5e540f7bb5ce1fd084eeba83a88b0c1518;p=fa-stable.git diff --git a/reporting/rep202.php b/reporting/rep202.php index 04d1afa1..0e122ab4 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -91,7 +91,8 @@ function print_aged_supplier_analysis() if ($graphics) { include_once($path_to_root . "/reporting/includes/class.graphic.inc"); - $pg = new graph(); + $pg = new chart($graphics); + $serie = array(); } if ($fromsupp == ALL_TEXT) @@ -237,21 +238,21 @@ function print_aged_supplier_analysis() $rep->AmountCol($i + 3, $i + 4, $total[$i], $dec); if ($graphics && $i < count($total) - 1) { - $pg->y[$i] = abs($total[$i]); + $serie[$i] = abs($total[$i]); } } $rep->Line($rep->row - 8); $rep->NewLine(); if ($graphics) { - $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 = $SysPrefs->graph_skin; - $pg->built_in = false; + $pg->setStream('png'); + $pg->setLabels(array(_('Current'), $nowdue, $pastdue1, $pastdue2)); + $pg->addSerie(_("Balances"), $serie); + $pg->setTitle($rep->title); + $pg->setXTitle(_("Days")); + $pg->setYTitle(_("Amount")); + $pg->setDTitle(number_format2($total[4])); + $pg->setValues(true); $pg->latin_notation = ($SysPrefs->decseps[user_dec_sep()] != "."); $filename = company_path(). "/pdf_files/". random_id().".png"; $pg->display($filename, true);