mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix: Only add Item to packed_items list if it's not already there
This commit is contained in:
@@ -39,8 +39,10 @@ def update_packing_list_item(doc, packing_item_code, qty, main_item_row, descrip
|
|||||||
# check if exists
|
# check if exists
|
||||||
exists = 0
|
exists = 0
|
||||||
for d in doc.get("packed_items"):
|
for d in doc.get("packed_items"):
|
||||||
if d.parent_item == main_item_row.item_code and d.item_code == packing_item_code and\
|
if d.parent_item == main_item_row.item_code and d.item_code == packing_item_code:
|
||||||
d.parent_detail_docname == main_item_row.name:
|
if d.parent_detail_docname != main_item_row.name:
|
||||||
|
d.parent_detail_docname = main_item_row.name
|
||||||
|
|
||||||
pi, exists = d, 1
|
pi, exists = d, 1
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user