mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-23 00:28:30 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user