mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
refactor: update base_outstanding calculation
This commit is contained in:
@@ -2412,13 +2412,12 @@ class AccountsController(TransactionBase):
|
|||||||
base_grand_total * flt(d.invoice_portion) / 100, d.precision("base_payment_amount")
|
base_grand_total * flt(d.invoice_portion) / 100, d.precision("base_payment_amount")
|
||||||
)
|
)
|
||||||
d.outstanding = d.payment_amount
|
d.outstanding = d.payment_amount
|
||||||
d.base_outstanding = flt(
|
d.base_outstanding = d.base_payment_amount
|
||||||
d.payment_amount * self.get("conversion_rate"), d.precision("base_outstanding")
|
|
||||||
)
|
|
||||||
elif not d.invoice_portion:
|
elif not d.invoice_portion:
|
||||||
d.base_payment_amount = flt(
|
d.base_payment_amount = flt(
|
||||||
d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount")
|
d.payment_amount * self.get("conversion_rate"), d.precision("base_payment_amount")
|
||||||
)
|
)
|
||||||
|
d.base_outstanding = d.base_payment_amount
|
||||||
else:
|
else:
|
||||||
self.fetch_payment_terms_from_order(
|
self.fetch_payment_terms_from_order(
|
||||||
po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms
|
po_or_so, doctype, grand_total, base_grand_total, automatically_fetch_payment_terms
|
||||||
|
|||||||
Reference in New Issue
Block a user