From 3d8705681d32bf2acbe764e235dd569edfd50098 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 20 Dec 2009 23:36:54 +0000 Subject: [PATCH] Function money_format function doesn't exist in OS Win. Fix in current_user.inc Some errors in header3() in pdf_report.inc.. --- CHANGELOG.txt | 6 ++++++ includes/current_user.inc | 9 +++++++++ reporting/includes/pdf_report.inc | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ff35409..49d6b09 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,12 @@ Legend: ! -> Note $ -> Affected files +21-Dec-2009 Joe Hunt +# Function money_format function doesn't exist in OS Win. Fix in current_user.inc + Some errors in header3() in pdf_report.inc.. +$ /includes/current_user.inc + /reporting/includes/pdf_report.inc + 18-Dec-2009 Joe Hunt # Allowing a quantity of 0 in a PO item line when modifying caused strange result. Fixed depending on the decimals in the stock item to not allow less than minimum. diff --git a/includes/current_user.inc b/includes/current_user.inc index e9125bc..023da53 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -239,6 +239,15 @@ function price_decimal_format($number, &$dec) } return number_format2($number, $dec); } +// function money_format doesn't exist in OS Win. +if (!function_exists('money_format')) +{ + function money_format($format, $number) + { + return price_format($number); + } +} + // 2008-06-15. Added extra parameter $stock_id and reference for $dec //-------------------------------------------------------------------- function qty_format($number, $stock_id=null, &$dec) { diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 2e1654d..c5ce8ba 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -523,7 +523,7 @@ class FrontReport extends Cpdf $str = _("Report Period") . ':'; $this->Text($this->leftMargin, $str, $headerFieldCol); $str = ''; - if ($this->params[1]['from'] != '') + if (isset($this->params[1]['from']) && $this->params[1]['from'] != '') $str = $this->params[1]['from'] . ' - '; $str .= $this->params[1]['to']; $this->Text($headerFieldCol, $str, $companyCol); -- 2.30.2