X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep202.php;h=c61c2aa5dd9ba290d8df939f8a7f69622895e764;hb=bd8f517d30d1edd3261e26e582ddd9e11c555616;hp=5901260596b53b878a93ff35f6fbdbbb1bb163b2;hpb=264c09696d65efe4532c197f317162daf8c24f32;p=fa-stable.git diff --git a/reporting/rep202.php b/reporting/rep202.php index 59012605..c61c2aa5 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -72,7 +72,7 @@ function get_invoices($supplier_id, $to, $all=true) function print_aged_supplier_analysis() { - global $path_to_root, $systypes_array; + global $path_to_root, $systypes_array, $SysPrefs; $to = $_POST['PARAM_0']; $fromsupp = $_POST['PARAM_1']; @@ -82,12 +82,14 @@ function print_aged_supplier_analysis() $no_zeros = $_POST['PARAM_5']; $graphics = $_POST['PARAM_6']; $comments = $_POST['PARAM_7']; - $destination = $_POST['PARAM_8']; + $orientation = $_POST['PARAM_8']; + $destination = $_POST['PARAM_9']; if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else include_once($path_to_root . "/reporting/includes/pdf_report.inc"); + $orientation = ($orientation ? 'L' : 'P'); if ($graphics) { include_once($path_to_root . "/reporting/includes/class.graphic.inc"); @@ -140,7 +142,9 @@ function print_aged_supplier_analysis() if ($convert) $headers[2] = _('currency'); - $rep = new FrontReport(_('Aged Supplier Analysis'), "AgedSupplierAnalysis", user_pagesize()); + $rep = new FrontReport(_('Aged Supplier Analysis'), "AgedSupplierAnalysis", user_pagesize(), 9, $orientation); + if ($orientation == 'L') + recalculate_cols($cols); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); @@ -242,16 +246,15 @@ function print_aged_supplier_analysis() $rep->NewLine(); 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; @@ -265,4 +268,3 @@ function print_aged_supplier_analysis() $rep->End(); } -?>