date_diff function name changed to date_diff for php5.3 compatibility.
[fa-stable.git] / sales / sales_order_entry.php
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);