Skip to content

Commit

Permalink
fix(test): TestBomStockReport
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Mar 8, 2023
1 parent 08b9aaf commit 4824302
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ def get_expected_data(bom, warehouse, qty_to_produce, show_exploded_view=False):
expected_data = []

for item in bom.get("exploded_items") if show_exploded_view else bom.get("items"):
in_stock_qty = frappe.get_cached_value(
"Bin", {"item_code": item.item_code, "warehouse": warehouse}, "actual_qty"
)
in_stock_qty = None
if frappe.db.exists("Bin", {"item_code": item.item_code, "warehouse": warehouse}, "actual_qty"):
in_stock_qty = frappe.get_cached_value(
"Bin", {"item_code": item.item_code, "warehouse": warehouse}, "actual_qty"
)

expected_data.append(
[
Expand Down

0 comments on commit 4824302

Please sign in to comment.