Merge pull request #33761 from frappe/mergify/bp/version-14-hotfix/pr-33759

fix: incorrect actual qty for the packed item (backport #33759)
This commit is contained in:
rohitwaghchaure
2023-01-21 09:47:13 +05:30
committed by GitHub
4 changed files with 117 additions and 1 deletions

View File

@@ -25,7 +25,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):