fix: Date filters added to dashboards, number cards and minor fixes.
This commit is contained in:
parent
75c65fd1b1
commit
50d4bf578b
@ -34,10 +34,10 @@ def get_dashboards():
|
||||
"name": "Buying",
|
||||
"dashboard_name": "Buying",
|
||||
"charts": [
|
||||
{ "chart": "Top Suppliers", "width": "Full"},
|
||||
{ "chart": "Purchase Order Trends", "width": "Full"},
|
||||
{ "chart": "Material Request Analysis", "width": "Half"},
|
||||
{ "chart": "Purchase Order Analysis", "width": "Half"},
|
||||
{ "chart": "Purchase Order Trends", "width": "Full"}
|
||||
{ "chart": "Top Suppliers", "width": "Full"}
|
||||
],
|
||||
"cards": [
|
||||
{ "card": "Purchase Orders to Receive"},
|
||||
@ -80,7 +80,8 @@ def get_charts():
|
||||
"filters_json": json.dumps(
|
||||
[["Material Request", "status", "not in", ["Draft", "Cancelled", "Stopped", None], False],
|
||||
["Material Request", "material_request_type", "=", "Purchase", False],
|
||||
["Material Request", "company", "=", company.name, False]]
|
||||
["Material Request", "company", "=", company.name, False],
|
||||
["Material Request", "transaction_date", "Between", [start_date,end_date], False]]
|
||||
),
|
||||
"group_by_based_on": "status",
|
||||
"group_by_type": "Count",
|
||||
@ -96,9 +97,11 @@ def get_charts():
|
||||
"chart_type": "Report",
|
||||
"custom_options": json.dumps({
|
||||
"type": "line",
|
||||
"regionFill": 1,
|
||||
"axisOptions": {"shortenYAxisNumbers": 1},
|
||||
"tooltipOptions": {}
|
||||
"tooltipOptions": {},
|
||||
"lineOptions": {
|
||||
"regionFill": 1
|
||||
}
|
||||
}),
|
||||
"doctype": "Dashboard Chart",
|
||||
"filters_json": json.dumps({
|
||||
@ -144,7 +147,8 @@ def get_number_cards():
|
||||
"filters_json": json.dumps(
|
||||
[["Purchase Order", "transaction_date", "Between", [start_date,end_date], False],
|
||||
["Purchase Order", "status", "not in", ["Draft","On Hold","Cancelled","Closed", None], False],
|
||||
["Purchase Order", "company", "=", company.name, False]]
|
||||
["Purchase Order", "company", "=", company.name, False],
|
||||
["Purchase Order", "transaction_date", "Between", [start_date,end_date], False]]
|
||||
),
|
||||
"function": "Sum",
|
||||
"is_public": 1,
|
||||
@ -159,7 +163,8 @@ def get_number_cards():
|
||||
"document_type": "Purchase Order",
|
||||
"filters_json": json.dumps(
|
||||
[["Purchase Order", "status", "in", ["To Receive and Bill", "To Receive", None], False],
|
||||
["Purchase Order", "company", "=", company.name, False]]
|
||||
["Purchase Order", "company", "=", company.name, False],
|
||||
["Purchase Order", "transaction_date", "Between", [start_date,end_date], False]]
|
||||
),
|
||||
"function": "Count",
|
||||
"is_public": 1,
|
||||
|
@ -19,7 +19,7 @@
|
||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/buying",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
"modified": "2020-05-15 23:42:35.625736",
|
||||
"modified": "2020-05-19 15:37:50.111851",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Buying",
|
||||
|
@ -46,10 +46,13 @@ def get_chart_data(data, conditions, filters):
|
||||
"labels" : labels,
|
||||
"datasets" : [
|
||||
{
|
||||
"name" : _("{0}").format(filters.get("period")) + _(" Revenue"),
|
||||
"name" : _("{0}").format(filters.get("period")) + _(" Expenditure"),
|
||||
"values" : datapoints
|
||||
}
|
||||
]
|
||||
},
|
||||
"type" : "line"
|
||||
"type" : "line",
|
||||
"lineOptions": {
|
||||
"regionFill": 1
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user