fix: carry forward the delivered_by_supplier check to PO

This commit is contained in:
l0gesh29
2025-07-09 19:26:41 +05:30
parent ec07549d5e
commit f3460ec840
3 changed files with 14 additions and 7 deletions

View File

@@ -1397,11 +1397,7 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t
suppliers = [item.get("supplier") for item in selected_items if item.get("supplier")]
suppliers = list(dict.fromkeys(suppliers)) # remove duplicates while preserving order
items_to_map = [
item.get("item_code")
for item in selected_items
if item.get("item_code") and item.get("delivered_by_supplier")
]
items_to_map = [item.get("item_code") for item in selected_items if item.get("item_code")]
items_to_map = list(set(items_to_map))
if not suppliers: