Merge pull request #33669 from frappe/mergify/bp/version-13-hotfix/pr-33662

revert: Reverting changes done on 33495 (backport #33662)
This commit is contained in:
ruthra kumar
2023-01-16 14:25:55 +05:30
committed by GitHub
2 changed files with 1 additions and 3 deletions

View File

@@ -104,7 +104,6 @@ class TestItem(FrappeTestCase):
"conversion_factor": 1.0,
"reserved_qty": 1,
"actual_qty": 5,
"ordered_qty": 10,
"projected_qty": 14,
}

View File

@@ -1161,7 +1161,7 @@ def get_projected_qty(item_code, warehouse):
@frappe.whitelist()
def get_bin_details(item_code, warehouse, company=None, include_child_warehouses=False):
bin_details = {"projected_qty": 0, "actual_qty": 0, "reserved_qty": 0, "ordered_qty": 0}
bin_details = {"projected_qty": 0, "actual_qty": 0, "reserved_qty": 0}
if warehouse:
from frappe.query_builder.functions import Coalesce, Sum
@@ -1177,7 +1177,6 @@ def get_bin_details(item_code, warehouse, company=None, include_child_warehouses
Coalesce(Sum(bin.projected_qty), 0).as_("projected_qty"),
Coalesce(Sum(bin.actual_qty), 0).as_("actual_qty"),
Coalesce(Sum(bin.reserved_qty), 0).as_("reserved_qty"),
Coalesce(Sum(bin.ordered_qty), 0).as_("ordered_qty"),
)
.where((bin.item_code == item_code) & (bin.warehouse.isin(warehouses)))
).run(as_dict=True)[0]