Negative stock allowed for perpetual inventory. Blocked in specific case

This commit is contained in:
Nabin Hait
2014-10-14 16:07:56 +05:30
parent 248a65b37d
commit 38d0ed9f3a
4 changed files with 8 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ class StockController(AccountsController):
def get_gl_entries(self, warehouse_account=None, default_expense_account=None,
default_cost_center=None, allow_negative_stock=False):
block_negative_stock(allow_negative_stock)
# block_negative_stock(allow_negative_stock)
if not warehouse_account:
warehouse_account = get_warehouse_account()
@@ -319,4 +319,7 @@ def get_valuation_rate(item_code, warehouse):
if not valuation_rate:
valuation_rate = frappe.db.get_value("Item Price", {"item_code": item_code, "buying": 1}, "price_list_rate")
if not valuation_rate:
frappe.throw(_("Purchase rate for item: {0} not found, which is required to book accounting entry. Please mention item price against a buying price list.").format(item_code))
return valuation_rate