makes set_exchange_rate
retrieve the latest exchange rate not average for "pay" and "internal transfer" payment entries
This commit is contained in:
parent
6148fe0909
commit
9b827e5b95
@ -149,8 +149,6 @@ class PaymentEntry(AccountsController):
|
||||
if self.paid_from and not self.source_exchange_rate:
|
||||
if self.paid_from_account_currency == self.company_currency:
|
||||
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:
|
||||
self.source_exchange_rate = get_exchange_rate(self.paid_from_account_currency,
|
||||
self.company_currency, self.posting_date)
|
||||
|
Loading…
x
Reference in New Issue
Block a user