refactor: pass dimension values to Gain/Loss journal

(cherry picked from commit c44eb432a5)

# Conflicts:
#	erpnext/accounts/utils.py
This commit is contained in:
ruthra kumar
2024-01-18 14:35:06 +05:30
committed by Mergify
parent de948f23c1
commit a919702319
3 changed files with 34 additions and 8 deletions

View File

@@ -1123,7 +1123,9 @@ class AccountsController(TransactionBase):
return True
return False
def make_exchange_gain_loss_journal(self, args: dict = None) -> None:
def make_exchange_gain_loss_journal(
self, args: dict = None, dimensions_dict: dict = None
) -> None:
"""
Make Exchange Gain/Loss journal for Invoices and Payments
"""
@@ -1178,7 +1180,7 @@ class AccountsController(TransactionBase):
self.name,
arg.get("referenced_row"),
arg.get("cost_center"),
{},
dimensions_dict,
)
frappe.msgprint(
_("Exchange Gain/Loss amount has been booked through {0}").format(
@@ -1259,7 +1261,7 @@ class AccountsController(TransactionBase):
self.name,
d.idx,
self.cost_center,
{},
dimensions_dict,
)
frappe.msgprint(
_("Exchange Gain/Loss amount has been booked through {0}").format(