fix: inventory dimension for inter company transfer return use case
This commit is contained in:
@@ -449,8 +449,22 @@ class StockController(AccountsController):
|
||||
"Delivery Note",
|
||||
"Stock Entry",
|
||||
]:
|
||||
if (sl_dict.actual_qty > 0 and self.doctype in ["Purchase Invoice", "Purchase Receipt"]) or (
|
||||
sl_dict.actual_qty < 0 and self.doctype in ["Sales Invoice", "Delivery Note", "Stock Entry"]
|
||||
if (
|
||||
(
|
||||
sl_dict.actual_qty > 0
|
||||
and not self.get("is_return")
|
||||
or sl_dict.actual_qty < 0
|
||||
and self.get("is_return")
|
||||
)
|
||||
and self.doctype in ["Purchase Invoice", "Purchase Receipt"]
|
||||
) or (
|
||||
(
|
||||
sl_dict.actual_qty < 0
|
||||
and not self.get("is_return")
|
||||
or sl_dict.actual_qty > 0
|
||||
and self.get("is_return")
|
||||
)
|
||||
and self.doctype in ["Sales Invoice", "Delivery Note", "Stock Entry"]
|
||||
):
|
||||
sl_dict[dimension.target_fieldname] = row.get(dimension.source_fieldname)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user