feat: allow Sales Invoice as data source (#35855)
* feat: allow Sales Invoice as data source * chore: linter
This commit is contained in:
parent
2f638ae32a
commit
802c89ffb3
@ -30,7 +30,7 @@ frappe.query_reports["Exponential Smoothing Forecasting"] = {
|
||||
"fieldname":"based_on_document",
|
||||
"label": __("Based On Document"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Sales Order", "Delivery Note", "Quotation"],
|
||||
"options": ["Sales Order", "Sales Invoice", "Delivery Note", "Quotation"],
|
||||
"default": "Sales Order",
|
||||
"reqd": 1
|
||||
},
|
||||
|
@ -99,7 +99,9 @@ class ForecastingReport(ExponentialSmoothingForecast):
|
||||
parent = frappe.qb.DocType(self.doctype)
|
||||
child = frappe.qb.DocType(self.child_doctype)
|
||||
|
||||
date_field = "posting_date" if self.doctype == "Delivery Note" else "transaction_date"
|
||||
date_field = (
|
||||
"posting_date" if self.doctype in ("Delivery Note", "Sales Invoice") else "transaction_date"
|
||||
)
|
||||
|
||||
query = (
|
||||
frappe.qb.from_(parent)
|
||||
|
Loading…
Reference in New Issue
Block a user