Global fixes in SQL queries aimed to make them more readible and easier for maintence.
[fa-stable.git] / purchasing / supplier_credit.php
index 19337cbef13a094288de4dba7eca5b08cf439cf5..8a0ab8cb49b3296385eda82b417bdadd162c0bda 100644 (file)
@@ -204,7 +204,8 @@ function check_data()
                                        $stock = get_item($item->item_code);
                                        display_error(_("The return cannot be processed because there is an insufficient quantity for item:") .
                                                " " . $stock['stock_id'] . " - " . $stock['description'] . " - " .
-                                               _("Quantity On Hand") . " = " . number_format2($qoh, get_qty_dec($stock['stock_id'])));
+                                               _("Quantity On Hand") . " = " . number_format2(get_qoh_on_date($stock['stock_id'], null, 
+                                               $_SESSION['supp_trans']->tran_date), get_qty_dec($stock['stock_id'])));
                                        return false;
                                }
                        }
@@ -270,6 +271,7 @@ function commit_item_data($n)
                $_POST['prev_quantity_inv'.$n], input_num('This_QuantityCredited'.$n),
                $_POST['order_price'.$n], input_num('ChgPrice'.$n),
                $_POST['std_cost_unit'.$n], "");
+               reset_tax_input();
        }
 }