minor fix
This commit is contained in:
parent
3cae3a5190
commit
06966e8e1d
@ -326,10 +326,12 @@ class JournalEntry(AccountsController):
|
||||
if d.account_currency == self.company_currency:
|
||||
d.exchange_rate = 1
|
||||
elif not d.exchange_rate or d.exchange_rate == 1 or \
|
||||
(d.reference_type in ("Sales Invoice", "Purchase Invoice") and d.reference_name and d.posting_date):
|
||||
(d.reference_type in ("Sales Invoice", "Purchase Invoice")
|
||||
and d.reference_name and self.posting_date):
|
||||
|
||||
# Modified to include the posting date for which to retreive the exchange rate
|
||||
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency, self.company,
|
||||
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
|
||||
d.exchange_rate = get_exchange_rate(self.posting_date, d.account, d.account_currency,
|
||||
self.company, d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
|
||||
|
||||
if not d.exchange_rate:
|
||||
frappe.throw(_("Row {0}: Exchange Rate is mandatory").format(d.idx))
|
||||
|
Loading…
x
Reference in New Issue
Block a user