Only first item in Supplier Credit Notes had tax added. Fixed.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 29 Apr 2015 14:39:48 +0000 (16:39 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 29 Apr 2015 14:39:48 +0000 (16:39 +0200)
purchasing/supplier_credit.php

index b4f31966d9aa7f8f7e82368b5625a6960c0a5991..f4982933fa2d347d9c226e0d1fc4a405e930890a 100644 (file)
@@ -209,7 +209,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;
                                }
                        }
@@ -275,6 +276,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();
        }
 }