fix: incorrect available quantity in BIN

This commit is contained in:
Rohit Waghchaure
2023-05-25 23:41:56 +05:30
parent ec5d34117b
commit 9e5e2de5d5
2 changed files with 14 additions and 3 deletions

View File

@@ -220,7 +220,7 @@ def get_bin(item_code, warehouse):
def get_or_make_bin(item_code: str, warehouse: str) -> str:
bin_record = frappe.db.get_value("Bin", {"item_code": item_code, "warehouse": warehouse})
bin_record = frappe.get_cached_value("Bin", {"item_code": item_code, "warehouse": warehouse})
if not bin_record:
bin_obj = _create_bin(item_code, warehouse)