From accf310aa3af6d98a039ef9d2918aaf359668de5 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Thu, 11 Apr 2019 11:08:07 +0530 Subject: [PATCH] fix: start date and loan period should be mandatory --- .../accounts/doctype/invoice_discounting/invoice_discounting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py index 7b1dcd4f3d..d1ed430829 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py @@ -20,7 +20,7 @@ class InvoiceDiscounting(AccountsController): self.loan_end_date = add_days(self.loan_start_date, self.loan_period) def validate_mandatory(self): - if self.docstatus == 1 and not (self.loan_start_date and self.loan_period): + if not (self.loan_start_date and self.loan_period): frappe.throw(_("Loan Start Date and Loan Period are mandatory to submit the Invoice Discounting")) def calculate_total_amount(self):