date_diff function name changed to date_diff for php5.3 compatibility.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 8 Sep 2009 18:57:09 +0000 (18:57 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 8 Sep 2009 18:57:09 +0000 (18:57 +0000)
CHANGELOG.txt
dimensions/inquiry/search_dimensions.php
includes/date_functions.inc
manufacturing/search_work_orders.php
manufacturing/work_order_add_finished.php
manufacturing/work_order_costs.php
sales/includes/cart_class.inc
sales/includes/ui/sales_order_ui.inc
sales/sales_order_entry.php

index 26318b67eea7a38815a548ec168303be1dcaacd0..73b55b55cfaa94629902776bfa3c95710d229f95 100644 (file)
@@ -40,6 +40,15 @@ $ /includes/systypes.inc
 # Removed obsolete field in sys_types
 $ /sql/en_US-demo.sql
   /sql/en_US-new.sql
+# date_diff function name changed to date_diff2 for php5.3 compatibility 
+$ /dimensions/inquiry/search_dimensions.php
+  /includes/date_functions.inc
+  /manufacturing/search_work_orders.php
+  /manufacturing/work_order_add_finished.php
+  /manufacturing/work_order_costs.php
+  /sales/sales_order_entry.php
+  /sales/includes/cart_class.inc
+  /sales/includes/ui/sales_order_ui.inc
 
 08-Sep-2009 Joe Hunt
 + Added Sales Quotations, inquiry and report
index 8006a1c4f6265517bb4ce0e2bfc5566d1d57d4d5..eaf74c1988f825fac739dd68099147b2082aa503 100644 (file)
@@ -118,7 +118,7 @@ function sum_dimension($row)
 
 function is_overdue($row)
 {
-       return date_diff(Today(), sql2date($row["due_date"]), "d") > 0;
+       return date_diff2(Today(), sql2date($row["due_date"]), "d") > 0;
 }
 
 function edit_link($row)
index 089eeb7e3fbc3c730ff0906ee53b677f1caa4920..5f9f0bc802e13fe72e6ef0da9cfba26e6e0adf1e 100644 (file)
@@ -418,7 +418,7 @@ function date1_greater_date2 ($date1, $date2)
 }
 
 
-function date_diff ($date1, $date2, $period) 
+function date_diff2 ($date1, $date2, $period) 
 {
 
 /* expects dates in the format specified in $DefaultDateFormat - period can be one of 'd','w','y','m'
index dfd74f8e17121b7da0122a2d224002faca4ab323..e03538b5508a3fa13330c920c86625b847b28ab3 100644 (file)
@@ -85,7 +85,7 @@ end_form();
 function check_overdue($row)
 {
        return (!$row["closed"] 
-               && date_diff(Today(), sql2date($row["required_by"]), "d") > 0);
+               && date_diff2(Today(), sql2date($row["required_by"]), "d") > 0);
 }
 
 function view_link($dummy, $order_no)
index 2804ea1e1fc04627a99bfe1ec75cedf903826bdd..8ba7fd6e0942c1e98a3efdb41d904d4c130a9ca1 100644 (file)
@@ -104,7 +104,7 @@ function can_process()
                set_focus('date_');
                return false;
        }
-       if (date_diff(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0)
+       if (date_diff2(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0)
        {
                display_error(_("The production date cannot be before the release date of the work order."));
                set_focus('date_');
index 107c073bb97c7d73a884b501b58568b5c1f1a111..b6f6ba237d74fdad8d0810fa728bb221d575b3d5 100644 (file)
@@ -89,7 +89,7 @@ function can_process()
                set_focus('date_');
                return false;
        }
-       if (date_diff(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0)
+       if (date_diff2(sql2date($wo_details["released_date"]), $_POST['date_'], "d") > 0)
        {
                display_error(_("The additional cost date cannot be before the release date of the work order."));
                set_focus('date_');
index 719f661733c058e8bc11c8dc5a5b400d3011ec7d..e865b24556a998cb800b27bf90284fb259dcf814 100644 (file)
@@ -188,7 +188,7 @@ class cart
                                  if (!$pos['cash_sale'] || !$pos['credit_sale']) 
                                        $this->pos = -1; // mark not editable payment type
                                  else
-                                       $this->cash = date_diff($this->due_date, Today(), 'd')<2;
+                                       $this->cash = date_diff2($this->due_date, Today(), 'd')<2;
                                if ($this->cash) {
                                        $this->Location = $pos['pos_location'];
                                        $this->location_name = $pos['location_name'];
index 3fa6c32b477eb16a0a2d1c026256e33c3811e68a..1b98e41ea6c3742e95ca1c0ff90594e18d86833f 100644 (file)
@@ -114,7 +114,7 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id)
        if ($order->trans_type == 10) {
                $order->due_date = get_invoice_duedate($customer_id, $order->document_date);
                if ($order->pos != -1)
-                       $order->cash = date_diff($order->due_date, Today(), 'd')<2;
+                       $order->cash = date_diff2($order->due_date, Today(), 'd')<2;
        }
        if($order->cash ) {
                if($order->pos != -1) {
index e1c6b759edf706cf92e912d3583b4c168164e034..fccbc3a33c6089581268741ae38b4988f83e3c13 100644 (file)
@@ -532,7 +532,7 @@ function create_cart($type, $trans_no)
                        if (!$pos['cash_sale'] || !$pos['credit_sale']) 
                                $doc->pos = -1; // mark not editable payment type
                        else
-                               $doc->cash = date_diff($doc->due_date, Today(), 'd')<2;
+                               $doc->cash = date_diff2($doc->due_date, Today(), 'd')<2;
                } else
                        $doc->due_date = $doc->document_date;
                $doc->reference = references::get_next($doc->trans_type);