[fixes] check party_account_currency while creating Pull Request from Sales Invoice
This commit is contained in:
parent
9f94266892
commit
c54619570a
@ -211,7 +211,10 @@ def get_amount(ref_doc, dt):
|
||||
grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
|
||||
|
||||
if dt == "Sales Invoice":
|
||||
grand_total = flt(ref_doc.grand_total)
|
||||
if ref_doc.party_account_currency == ref_doc.currency:
|
||||
grand_total = flt(ref_doc.outstanding_amount)
|
||||
else:
|
||||
grand_total = flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate
|
||||
|
||||
if grand_total > 0 :
|
||||
return grand_total
|
||||
|
Loading…
x
Reference in New Issue
Block a user