feat: Payment allocation based on payment terms (#20946)

* feat: Payment allocation based on payment terms

* fix: Add desccription for checkbox

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
Deepesh Garg
2020-04-23 16:09:08 +05:30
committed by GitHub
parent dd560d676e
commit bd4b5da11b
8 changed files with 326 additions and 678 deletions

View File

@@ -819,7 +819,7 @@ class AccountsController(TransactionBase):
else:
for d in self.get("payment_schedule"):
if d.invoice_portion:
d.payment_amount = grand_total * flt(d.invoice_portion) / 100
d.payment_amount = flt(grand_total * flt(d.invoice_portion) / 100, d.precision('payment_amount'))
def set_due_date(self):
due_dates = [d.due_date for d in self.get("payment_schedule") if d.due_date]