Patch: Create Payment Terms based on default credit days set in company and use it while setting due_date (#12685)

* Patch: Create Payment Terms based on default credit days set in company and use it while setting due_date

* Payment Terms patch for credit days defined in customer group
This commit is contained in:
Nabin Hait
2018-01-29 16:07:21 +05:30
committed by GitHub
parent 186bea6e95
commit cfa9d1adb7
12 changed files with 118 additions and 132 deletions

View File

@@ -135,9 +135,9 @@ 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)
validate_due_date(self.posting_date, self.due_date, "Customer", self.customer, self.company)
elif self.doctype == "Purchase Invoice":
validate_due_date(self.posting_date, self.due_date, "Supplier", self.supplier)
validate_due_date(self.posting_date, self.due_date, "Supplier", self.supplier, self.company)
def set_price_list_currency(self, buying_or_selling):
if self.meta.get_field("posting_date"):