Skip to content

Commit

Permalink
fix: validation error on reconciling PE to Journals as Invoice
Browse files Browse the repository at this point in the history
With the same exchange rate on Journal Entry and Payment Entry,
reconcilition should not post exc gain/loss journal and should not
throw validation error

(cherry picked from commit 5eeb650)
  • Loading branch information
ruthra-kumar committed Dec 15, 2023
1 parent 12cd7a7 commit 9836205
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,10 @@ def update_reference_in_payment_entry(
"total_amount": d.grand_total,
"outstanding_amount": d.outstanding_amount,
"allocated_amount": d.allocated_amount,
"exchange_rate": d.exchange_rate if d.exchange_gain_loss else payment_entry.get_exchange_rate(),
"exchange_gain_loss": d.exchange_gain_loss,
"exchange_rate": d.exchange_rate
if d.difference_amount is not None
else payment_entry.get_exchange_rate(),
"exchange_gain_loss": d.difference_amount,
}

if d.voucher_detail_no:
Expand Down

0 comments on commit 9836205

Please sign in to comment.