We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
period_based_on
1 parent 9805745 commit 9787777Copy full SHA for 9787777
1 file changed
erpnext/controllers/trends.py
@@ -55,6 +55,14 @@ def validate_filters(filters):
55
if filters.get("based_on") == filters.get("group_by"):
56
frappe.throw(_("'Based On' and 'Group By' can not be same"))
57
58
+ if filters.get("period_based_on") and filters.period_based_on not in ["bill_date", "posting_date"]:
59
+ frappe.throw(
60
+ msg=_("{0} can be either {1} or {2}.").format(
61
+ frappe.bold("Period based On"), frappe.bold("Posting Date"), frappe.bold("Billing Date")
62
+ ),
63
+ title=_("Invalid Filter"),
64
+ )
65
+
66
67
def get_data(filters, conditions):
68
data = []
0 commit comments