Function money_format function doesn't exist in OS Win. Fix in current_user.inc
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 20 Dec 2009 23:36:54 +0000 (23:36 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 20 Dec 2009 23:36:54 +0000 (23:36 +0000)
Some errors in header3() in pdf_report.inc..

CHANGELOG.txt
includes/current_user.inc
reporting/includes/pdf_report.inc

index ff3540997473e42c5848c7829cd078b96e47aa22..49d6b0951107efe4455bee665f1f8f92877413e8 100644 (file)
@@ -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.
index e9125bcd755fa1d0cfb0b637509f9c38311d7870..023da535e5d737e72fdad0f1f0631715ccb77b48 100644 (file)
@@ -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) {
index 2e1654d192390b9d57fa841e2a7c1fd8afcdf23e..c5ce8ba395d8a1c5279ee8fa6aeeadae081ae735 100644 (file)
@@ -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);