mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
refactor: assume any of the foreign currency as transaction currency
On a foreign currency payment entry, assume any one of the foreign currency as the transaction currency
This commit is contained in:
@@ -1243,6 +1243,12 @@ class PaymentEntry(AccountsController):
|
|||||||
if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"):
|
if self.payment_type in ("Receive", "Pay") and not self.get("party_account_field"):
|
||||||
self.setup_party_account_field()
|
self.setup_party_account_field()
|
||||||
|
|
||||||
|
company_currency = erpnext.get_company_currency(self.company)
|
||||||
|
if self.paid_from_account_currency != company_currency:
|
||||||
|
self.currency = self.paid_from_account_currency
|
||||||
|
elif self.paid_to_account_currency != company_currency:
|
||||||
|
self.currency = self.paid_to_account_currency
|
||||||
|
|
||||||
gl_entries = []
|
gl_entries = []
|
||||||
self.add_party_gl_entries(gl_entries)
|
self.add_party_gl_entries(gl_entries)
|
||||||
self.add_bank_gl_entries(gl_entries)
|
self.add_bank_gl_entries(gl_entries)
|
||||||
|
|||||||
Reference in New Issue
Block a user