make due date, invoice_portion mandatory

This commit is contained in:
tunde
2017-09-22 16:22:15 +01:00
parent e6b3fe1215
commit 3aec78b472
2 changed files with 7 additions and 4 deletions

View File

@@ -666,7 +666,7 @@ class AccountsController(TransactionBase):
def validate_invoice_portion(self):
total_portion = 0
for term in self.payment_schedule:
total_portion += term.invoice_portion
total_portion += flt(term.get('invoice_portion', 0))
if flt(total_portion, 2) != 100.00:
frappe.msgprint(_('Combined invoice portion must equal 100%'), raise_exception=1, indicator='red')