fix: incorrect actual qty for the packed item

This commit is contained in:
Rohit Waghchaure
2023-01-20 22:38:56 +05:30
parent 6b31c27ed6
commit 02566a02a8
4 changed files with 117 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ class SellingController(StockController):
def onload(self):
super(SellingController, self).onload()
if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
for item in self.get("items"):
for item in self.get("items") + (self.get("packed_items") or []):
item.update(get_bin_details(item.item_code, item.warehouse, include_child_warehouses=True))
def validate(self):