fix: Date filters added to dashboards, number cards and minor fixes.
diff --git a/erpnext/buying/dashboard_fixtures.py b/erpnext/buying/dashboard_fixtures.py
index 291abb8..abb858f 100644
--- a/erpnext/buying/dashboard_fixtures.py
+++ b/erpnext/buying/dashboard_fixtures.py
@@ -34,10 +34,10 @@
"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 @@
"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 @@
"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 @@
"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 @@
"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,
diff --git a/erpnext/buying/module_onboarding/buying/buying.json b/erpnext/buying/module_onboarding/buying/buying.json
index 70d6cbb..7de44f0 100644
--- a/erpnext/buying/module_onboarding/buying/buying.json
+++ b/erpnext/buying/module_onboarding/buying/buying.json
@@ -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",
diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
index 011760d..abe9af9 100644
--- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
+++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py
@@ -46,10 +46,13 @@
"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
+ }
}
\ No newline at end of file