fix: dashboard fixtures and FAR chart

This commit is contained in:
Saqib Ansari
2020-05-11 15:49:18 +05:30
committed by Nabin Hait
parent ecddf3358d
commit 3882939fd9
3 changed files with 5 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ def get_charts():
"name": "Location-wise Asset Value", "name": "Location-wise Asset Value",
"chart_name": "Location-wise Asset Value", "chart_name": "Location-wise Asset Value",
"chart_type": "Report", "chart_type": "Report",
"report_name": "Location-wise Asset Value", "report_name": "Fixed Asset Report",
"is_custom": 1, "is_custom": 1,
"x_field": "location", "x_field": "location",
"timeseries": 0, "timeseries": 0,

View File

@@ -11,6 +11,6 @@
"modified_by": "Administrator", "modified_by": "Administrator",
"name": "Introduction to Assets", "name": "Introduction to Assets",
"owner": "Administrator", "owner": "Administrator",
"title": "Introduction to Fixed Asset Management", "title": "Introduction to Assets",
"video_url": "https://www.youtube.com/watch?v=I-K8pLRmvSo" "video_url": "https://www.youtube.com/watch?v=I-K8pLRmvSo"
} }

View File

@@ -92,9 +92,9 @@ def get_data(filters):
def prepare_chart_data(data): def prepare_chart_data(data):
labels, asset_values, depreciated_amounts = [], [], [] labels, asset_values, depreciated_amounts = [], [], []
for d in data: for d in data:
labels.append(d.asset_id) labels.append(d.get("asset_id"))
asset_values.append(d.asset_value) asset_values.append(d.get("asset_value"))
depreciated_amounts.append(d.depreciated_amount) depreciated_amounts.append(d.get("depreciated_amount"))
return { return {
"data" : { "data" : {