mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 20:48:27 +00:00
fix(accounts): fetch project name from payment entry to journal entry
(cherry picked from commit d9b255b952)
This commit is contained in:
committed by
Mergify
parent
bd4eb71205
commit
55cce2a11c
@@ -2320,6 +2320,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"
|
||||||
@@ -2346,6 +2347,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,
|
||||||
@@ -2363,6 +2365,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,
|
||||||
|
|||||||
@@ -1751,6 +1751,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(
|
||||||
@@ -1835,6 +1836,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