Merge pull request #22682 from Anurag810/expense-claim-payment-fix
fix: 'ExpenseClaim' object has no attribute 'conversion_rate'
This commit is contained in:
commit
aab0ada598
@ -1029,14 +1029,14 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
|||||||
if bank_amount:
|
if bank_amount:
|
||||||
received_amount = bank_amount
|
received_amount = bank_amount
|
||||||
else:
|
else:
|
||||||
received_amount = paid_amount * doc.conversion_rate
|
received_amount = paid_amount * doc.get('conversion_rate', 1)
|
||||||
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:
|
else:
|
||||||
# if party account currency and bank currency is different then populate paid amount as well
|
# if party account currency and bank currency is different then populate paid amount as well
|
||||||
paid_amount = received_amount * doc.conversion_rate
|
paid_amount = received_amount * doc.get('conversion_rate', 1)
|
||||||
|
|
||||||
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