Skip to content

Commit

Permalink
revert: Reverting changes done on 33495 (frappe#33662)
Browse files Browse the repository at this point in the history
'ordered_qty' will not be fetched from `tabBin`
  • Loading branch information
ruthra-kumar authored Jan 16, 2023
1 parent 333907b commit be38205
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion erpnext/stock/doctype/item/test_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def test_get_item_details(self):
"conversion_factor": 1.0,
"reserved_qty": 1,
"actual_qty": 5,
"ordered_qty": 10,
"projected_qty": 14,
}

Expand Down
3 changes: 1 addition & 2 deletions erpnext/stock/get_item_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,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
Expand All @@ -1197,7 +1197,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]
Expand Down

0 comments on commit be38205

Please sign in to comment.