mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix(accounts): fetch project name from payment entry to journal entry
This commit is contained in:
@@ -2526,6 +2526,7 @@ def create_gain_loss_journal(
|
|||||||
ref2_detail_no,
|
ref2_detail_no,
|
||||||
cost_center,
|
cost_center,
|
||||||
dimensions,
|
dimensions,
|
||||||
|
project=None,
|
||||||
) -> str:
|
) -> str:
|
||||||
journal_entry = frappe.new_doc("Journal Entry")
|
journal_entry = frappe.new_doc("Journal Entry")
|
||||||
journal_entry.voucher_type = "Exchange Gain Or Loss"
|
journal_entry.voucher_type = "Exchange Gain Or Loss"
|
||||||
@@ -2552,6 +2553,7 @@ def create_gain_loss_journal(
|
|||||||
"account_currency": party_account_currency,
|
"account_currency": party_account_currency,
|
||||||
"exchange_rate": 0,
|
"exchange_rate": 0,
|
||||||
"cost_center": cost_center or erpnext.get_default_cost_center(company),
|
"cost_center": cost_center or erpnext.get_default_cost_center(company),
|
||||||
|
"project": project,
|
||||||
"reference_type": ref1_dt,
|
"reference_type": ref1_dt,
|
||||||
"reference_name": ref1_dn,
|
"reference_name": ref1_dn,
|
||||||
"reference_detail_no": ref1_detail_no,
|
"reference_detail_no": ref1_detail_no,
|
||||||
@@ -2569,6 +2571,7 @@ def create_gain_loss_journal(
|
|||||||
"account_currency": gain_loss_account_currency,
|
"account_currency": gain_loss_account_currency,
|
||||||
"exchange_rate": 1,
|
"exchange_rate": 1,
|
||||||
"cost_center": cost_center or erpnext.get_default_cost_center(company),
|
"cost_center": cost_center or erpnext.get_default_cost_center(company),
|
||||||
|
"project": project,
|
||||||
"reference_type": ref2_dt,
|
"reference_type": ref2_dt,
|
||||||
"reference_name": ref2_dn,
|
"reference_name": ref2_dn,
|
||||||
"reference_detail_no": ref2_detail_no,
|
"reference_detail_no": ref2_detail_no,
|
||||||
|
|||||||
@@ -1768,6 +1768,7 @@ class AccountsController(TransactionBase):
|
|||||||
arg.get("referenced_row"),
|
arg.get("referenced_row"),
|
||||||
arg.get("cost_center"),
|
arg.get("cost_center"),
|
||||||
dimensions_dict,
|
dimensions_dict,
|
||||||
|
arg.get("project"),
|
||||||
)
|
)
|
||||||
frappe.msgprint(
|
frappe.msgprint(
|
||||||
_("Exchange Gain/Loss amount has been booked through {0}").format(
|
_("Exchange Gain/Loss amount has been booked through {0}").format(
|
||||||
@@ -1852,6 +1853,7 @@ class AccountsController(TransactionBase):
|
|||||||
d.idx,
|
d.idx,
|
||||||
self.cost_center,
|
self.cost_center,
|
||||||
dimensions_dict,
|
dimensions_dict,
|
||||||
|
self.project,
|
||||||
)
|
)
|
||||||
frappe.msgprint(
|
frappe.msgprint(
|
||||||
_("Exchange Gain/Loss amount has been booked through {0}").format(
|
_("Exchange Gain/Loss amount has been booked through {0}").format(
|
||||||
|
|||||||
Reference in New Issue
Block a user