diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index bf620ab27a..06a4974ea1 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -92,7 +92,7 @@ class PurchaseInvoice(BuyingController): if not self.credit_to: self.credit_to = get_party_account("Supplier", self.supplier, self.company) if not self.due_date: - self.due_date = get_due_date(self.posting_date, "Supplier", self.supplier, self.company) + self.due_date = get_due_date(self.posting_date, "Supplier", self.supplier) super(PurchaseInvoice, self).set_missing_values(for_validate) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index a5bf4ff11f..afed3e876d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -241,7 +241,7 @@ class SalesInvoice(SellingController): if not self.debit_to: self.debit_to = get_party_account("Customer", self.customer, self.company) if not self.due_date and self.customer: - self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company) + self.due_date = get_due_date(self.posting_date, "Customer", self.customer) super(SalesInvoice, self).set_missing_values(for_validate)