feat: inventory dimension for rejected materials (#44156)

This commit is contained in:
rohitwaghchaure
2024-11-15 17:03:22 +05:30
committed by GitHub
parent 29f8777079
commit 9bf16df41e
3 changed files with 58 additions and 6 deletions

View File

@@ -839,6 +839,15 @@ class StockController(AccountsController):
if not dimension:
continue
if (
self.doctype in ["Purchase Invoice", "Purchase Receipt"]
and row.get("rejected_warehouse")
and sl_dict.get("warehouse") == row.get("rejected_warehouse")
):
fieldname = f"rejected_{dimension.source_fieldname}"
sl_dict[dimension.target_fieldname] = row.get(fieldname)
continue
if self.doctype in [
"Purchase Invoice",
"Purchase Receipt",