Merge pull request #4976 from saurabh6790/pr_from_si
[fixes] set amount in PR by checking party_account_currency field
This commit is contained in:
commit
a098b4178a
@ -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.outstanding_amount)
|
||||
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