fix: convert invoice_portion value from str to float (#41485)

This commit is contained in:
Nabin Hait
2024-05-20 17:57:59 +05:30
committed by GitHub
parent f24d61daea
commit a1d489195d

View File

@@ -2211,10 +2211,10 @@ class AccountsController(TransactionBase):
for d in self.get("payment_schedule"):
if d.invoice_portion:
d.payment_amount = flt(
grand_total * flt(d.invoice_portion / 100), d.precision("payment_amount")
grand_total * flt(d.invoice_portion) / 100, d.precision("payment_amount")
)
d.base_payment_amount = flt(
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
elif not d.invoice_portion: