fix: target inventory dimension for stock entry

(cherry picked from commit d65cb56d66)

# Conflicts:
#	erpnext/controllers/stock_controller.py
This commit is contained in:
Rohit Waghchaure
2025-06-19 19:33:26 +05:30
committed by Mergify
parent 8208a9ec27
commit 91e56988c8

View File

@@ -480,6 +480,18 @@ class StockController(AccountsController):
)
and self.doctype in ["Sales Invoice", "Delivery Note", "Stock Entry"]
):
<<<<<<< HEAD
=======
if self.doctype == "Stock Entry":
if row.get("t_warehouse") == sl_dict.warehouse and sl_dict.get("actual_qty") > 0:
fieldname = f"to_{dimension.source_fieldname}"
if dimension.source_fieldname.startswith("to_"):
fieldname = f"{dimension.source_fieldname}"
sl_dict[dimension.target_fieldname] = row.get(fieldname)
continue
>>>>>>> d65cb56d66 (fix: target inventory dimension for stock entry)
sl_dict[dimension.target_fieldname] = row.get(dimension.source_fieldname)
else:
fieldname_start_with = "to"