mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 23:52:57 +00:00
makes set_exchange_rate retrieve the latest exchange rate not average for "pay" and "internal transfer" payment entries
This commit is contained in:
@@ -149,8 +149,6 @@ class PaymentEntry(AccountsController):
|
|||||||
if self.paid_from and not self.source_exchange_rate:
|
if self.paid_from and not self.source_exchange_rate:
|
||||||
if self.paid_from_account_currency == self.company_currency:
|
if self.paid_from_account_currency == self.company_currency:
|
||||||
self.source_exchange_rate = 1
|
self.source_exchange_rate = 1
|
||||||
elif self.payment_type in ("Pay", "Internal Transfer"):
|
|
||||||
self.source_exchange_rate = get_average_exchange_rate(self.paid_from)
|
|
||||||
else:
|
else:
|
||||||
self.source_exchange_rate = get_exchange_rate(self.paid_from_account_currency,
|
self.source_exchange_rate = get_exchange_rate(self.paid_from_account_currency,
|
||||||
self.company_currency, self.posting_date)
|
self.company_currency, self.posting_date)
|
||||||
|
|||||||
Reference in New Issue
Block a user