mirror of
https://github.com/frappe/erpnext.git
synced 2025-12-03 18:35:36 +00:00
fix: set missing due date in Purchase Invoice and POS Invoice (#49232)
This commit is contained in:
@@ -717,7 +717,13 @@ class POSInvoice(SalesInvoice):
|
|||||||
"Account", self.debit_to, "account_currency"
|
"Account", self.debit_to, "account_currency"
|
||||||
)
|
)
|
||||||
if not self.due_date and self.customer:
|
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,
|
||||||
|
self.company,
|
||||||
|
template_name=self.payment_terms_template,
|
||||||
|
)
|
||||||
|
|
||||||
super(SalesInvoice, self).set_missing_values(for_validate)
|
super(SalesInvoice, self).set_missing_values(for_validate)
|
||||||
|
|
||||||
|
|||||||
@@ -343,7 +343,12 @@ class PurchaseInvoice(BuyingController):
|
|||||||
)
|
)
|
||||||
if not self.due_date:
|
if not self.due_date:
|
||||||
self.due_date = get_due_date(
|
self.due_date = get_due_date(
|
||||||
self.posting_date, "Supplier", self.supplier, self.company, self.bill_date
|
self.posting_date,
|
||||||
|
"Supplier",
|
||||||
|
self.supplier,
|
||||||
|
self.company,
|
||||||
|
self.bill_date,
|
||||||
|
template_name=self.payment_terms_template,
|
||||||
)
|
)
|
||||||
|
|
||||||
tds_category = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
tds_category = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
||||||
|
|||||||
Reference in New Issue
Block a user