Improvement of Customer Detail Listing and Supplier Detail Listing (General notes...
[fa-stable.git] / purchasing / supplier_credit.php
index 7cea70211027571f904ec925e441338d0a999a41..4824344e0d907b1aff4ce8fdf92c01b1a09e0e8f 100644 (file)
@@ -194,8 +194,8 @@ function check_data()
                foreach ($_SESSION['supp_trans']->grn_items as $n => $item) {
                        if (is_inventory_item($item->item_code))
                        {
-                               $qoh = get_qoh_on_date($item->item_code, $item->location, $_SESSION['supp_trans']->tran_date);
-                               if ($item->qty_recd > $qoh)
+                               $qoh = get_qoh_on_date($item->item_code, null, $_SESSION['supp_trans']->tran_date);
+                               if ($item->this_quantity_inv > $qoh)
                                {
                                        $stock = get_item($item->item_code);
                                        display_error(_("The return cannot be processed because there is an insufficient quantity for item:") .