fix: Paid amount 0 while creating advanced payment entry
Paid amount is set 0 while creating advanced payment entry
against multi-currency purchase order.
Solution: Populate paid amount value after applying conversion rate
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py
index da6b167..fd3f28f 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.py
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py
@@ -933,10 +933,15 @@
paid_amount = abs(outstanding_amount)
if bank_amount:
received_amount = bank_amount
+ else:
+ received_amount = paid_amount * doc.conversion_rate
else:
received_amount = abs(outstanding_amount)
if bank_amount:
paid_amount = bank_amount
+ else:
+ # if party account currency and bank currency is different then populate paid amount as well
+ paid_amount = received_amount * doc.conversion_rate
pe = frappe.new_doc("Payment Entry")
pe.payment_type = payment_type