Eliminated non-static method calls and other bulk fixes to fix php5 warnings
[fa-stable.git] / purchasing / po_receive_items.php
index cec4715f05c66b0224c93e0486f47fdbd9469bac..5059807be0e433350209e5934cefe5c7501729c8 100644 (file)
@@ -158,6 +158,8 @@ function check_po_changed()
 
 function can_process()
 {
+       global $SysPrefs, $Refs;
+       
        if (count($_SESSION['PO']->line_items) <= 0)
        {
         display_error(_("There is nothing to process. Please enter valid quantities greater than zero."));
@@ -171,7 +173,7 @@ function can_process()
                return false;
        }
 
-    if (!references::is_valid($_POST['ref']))
+    if (!$Refs->is_valid($_POST['ref']))
     {
                display_error(_("You must enter a reference."));
                set_focus('ref');
@@ -200,7 +202,7 @@ function can_process()
        foreach ($_SESSION['PO']->line_items as $order_line)
        {
                if ($order_line->receive_qty+$order_line->qty_received >
-                       $order_line->quantity * (1+ (sys_prefs::over_receive_allowance() / 100)))
+                       $order_line->quantity * (1+ ($SysPrefs->over_receive_allowance() / 100)))
                {
                        $delivery_qty_too_large = 1;
                        break;
@@ -214,7 +216,7 @@ function can_process()
     }
     elseif ($delivery_qty_too_large == 1)
     {
-       display_error(_("Entered quantities cannot be greater than the quantity entered on the purchase order including the allowed over-receive percentage") . " (" . sys_prefs::over_receive_allowance() ."%)."
+       display_error(_("Entered quantities cannot be greater than the quantity entered on the purchase order including the allowed over-receive percentage") . " (" . $SysPrefs->over_receive_allowance() ."%)."
                . "<br>" .
                _("Modify the ordered items on the purchase order if you wish to increase the quantities."));
        return false;