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",
"chart_name": "Location-wise Asset Value",
"chart_type": "Report",
"report_name": "Location-wise Asset Value",
"report_name": "Fixed Asset Report",
"is_custom": 1,
"x_field": "location",
"timeseries": 0,

View File

@ -11,6 +11,6 @@
"modified_by": "Administrator",
"name": "Introduction to Assets",
"owner": "Administrator",
"title": "Introduction to Fixed Asset Management",
"title": "Introduction to Assets",
"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):
labels, asset_values, depreciated_amounts = [], [], []
for d in data:
labels.append(d.asset_id)
asset_values.append(d.asset_value)
depreciated_amounts.append(d.depreciated_amount)
labels.append(d.get("asset_id"))
asset_values.append(d.get("asset_value"))
depreciated_amounts.append(d.get("depreciated_amount"))
return {
"data" : {