X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep102.php;h=62128b5022a543ce24c65fd69e1267ef7f80e4f2;hb=7fae690528df9b851fba309b71bf7c3b961c9dd9;hp=fc2457c4930193c22c27ddfb6daa299015befced;hpb=8ea6c4dd0d9b31b3456d012b0c94339b801bee0c;p=fa-stable.git diff --git a/reporting/rep102.php b/reporting/rep102.php index fc2457c4..62128b50 100644 --- a/reporting/rep102.php +++ b/reporting/rep102.php @@ -50,7 +50,7 @@ function get_invoices($customer_id, $to) ".TB_PREF."debtor_trans WHERE ".TB_PREF."debtor_trans.type <> ".ST_CUSTDELIVERY." - AND ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator + AND ".TB_PREF."debtor_trans.payment_terms = ".TB_PREF."payment_terms.terms_indicator AND ".TB_PREF."debtors_master.debtor_no = ".TB_PREF."debtor_trans.debtor_no AND ".TB_PREF."debtor_trans.debtor_no = $customer_id AND ".TB_PREF."debtor_trans.tran_date <= '$todate' @@ -64,7 +64,7 @@ function get_invoices($customer_id, $to) function print_aged_customer_analysis() { - global $comp_path, $path_to_root, $systypes_array; + global $path_to_root, $systypes_array; $to = $_POST['PARAM_0']; $fromcust = $_POST['PARAM_1']; @@ -125,7 +125,7 @@ function print_aged_customer_analysis() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $total = array(0,0,0,0, 0); @@ -228,14 +228,14 @@ function print_aged_customer_analysis() $pg->built_in = false; $pg->fontfile = $path_to_root . "/reporting/fonts/Vera.ttf"; $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); - $filename = $comp_path .'/'. user_company(). "/images/test.png"; + $filename = company_path(). "/images/test.png"; $pg->display($filename, true); $w = $pg->width / 1.5; $h = $pg->height / 1.5; $x = ($rep->pageWidth - $w) / 2; $rep->NewLine(2); if ($rep->row - $h < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($filename, $x, $rep->row - $h, $w, $h); } $rep->NewLine();