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:
parent
8b133ac087
commit
6f48d4be1c
@ -45,6 +45,7 @@ def get_stock_value_on(warehouse=None, posting_date=None, item_code=None):
|
|||||||
|
|
||||||
return sum(sle_map.values())
|
return sum(sle_map.values())
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None, with_valuation_rate=False):
|
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.
|
"""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):
|
def is_group_warehouse(warehouse):
|
||||||
if frappe.db.get_value("Warehouse", warehouse, "is_group"):
|
if frappe.db.get_value("Warehouse", warehouse, "is_group"):
|
||||||
frappe.throw(_("Group node warehouse is not allowed to select for transactions"))
|
frappe.throw(_("Group node warehouse is not allowed to select for transactions"))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user