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
This commit is contained in:
parent
235166ec41
commit
0c699f0726
@ -933,10 +933,15 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
|||||||
paid_amount = abs(outstanding_amount)
|
paid_amount = abs(outstanding_amount)
|
||||||
if bank_amount:
|
if bank_amount:
|
||||||
received_amount = bank_amount
|
received_amount = bank_amount
|
||||||
|
else:
|
||||||
|
received_amount = paid_amount * doc.conversion_rate
|
||||||
else:
|
else:
|
||||||
received_amount = abs(outstanding_amount)
|
received_amount = abs(outstanding_amount)
|
||||||
if bank_amount:
|
if bank_amount:
|
||||||
paid_amount = 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 = frappe.new_doc("Payment Entry")
|
||||||
pe.payment_type = payment_type
|
pe.payment_type = payment_type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user