whitelisted erpnext.stock.utils.get_stock_balance (#7402)

whitelisted erpnext.stock.utils.get_stock_balance with respect to
https://github.com/frappe/erpnext/issues/7364
This commit is contained in:
nick9822 2017-01-09 12:12:36 +05:30 committed by Rushabh Mehta
parent 8b133ac087
commit 6f48d4be1c

View File

@ -45,6 +45,7 @@ def get_stock_value_on(warehouse=None, posting_date=None, item_code=None):
return sum(sle_map.values())
@frappe.whitelist()
def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None, with_valuation_rate=False):
"""Returns stock balance quantity at given warehouse on given posting date or current date.
@ -191,4 +192,4 @@ def validate_warehouse_company(warehouse, company):
def is_group_warehouse(warehouse):
if frappe.db.get_value("Warehouse", warehouse, "is_group"):
frappe.throw(_("Group node warehouse is not allowed to select for transactions"))