[Fix] System always fetches the payment terms template from the company even if it's removed from the sales invoice (#14879)
This commit is contained in:
committed by
Nabin Hait
parent
5c3b69476d
commit
3ffe89659a
@@ -138,9 +138,11 @@ class AccountsController(TransactionBase):
|
||||
if not self.due_date:
|
||||
frappe.throw(_("Due Date is mandatory"))
|
||||
|
||||
validate_due_date(self.posting_date, self.due_date, "Customer", self.customer, self.company)
|
||||
validate_due_date(self.posting_date, self.due_date,
|
||||
"Customer", self.customer, self.company, self.payment_terms_template)
|
||||
elif self.doctype == "Purchase Invoice":
|
||||
validate_due_date(self.posting_date, self.due_date, "Supplier", self.supplier, self.company)
|
||||
validate_due_date(self.posting_date, self.due_date,
|
||||
"Supplier", self.supplier, self.company, self.payment_terms_template)
|
||||
|
||||
def set_price_list_currency(self, buying_or_selling):
|
||||
if self.meta.get_field("posting_date"):
|
||||
|
||||
Reference in New Issue
Block a user