feat: update summary items

This commit is contained in:
Shivam Mishra 2020-07-09 10:58:05 +05:30
parent 840550e25f
commit f59d927f73
2 changed files with 2 additions and 3 deletions

View File

@ -147,7 +147,6 @@ def get_report_summary(period_list, asset, liability, equity, provisional_profit
{ {
"value": net_asset, "value": net_asset,
"label": "Total Asset", "label": "Total Asset",
"indicator": "Green",
"datatype": "Currency", "datatype": "Currency",
"currency": currency "currency": currency
}, },
@ -155,14 +154,12 @@ def get_report_summary(period_list, asset, liability, equity, provisional_profit
"value": net_liability, "value": net_liability,
"label": "Total Liability", "label": "Total Liability",
"datatype": "Currency", "datatype": "Currency",
"indicator": "Red",
"currency": currency "currency": currency
}, },
{ {
"value": net_equity, "value": net_equity,
"label": "Total Equity", "label": "Total Equity",
"datatype": "Currency", "datatype": "Currency",
"indicator": "Blue",
"currency": currency "currency": currency
}, },
{ {

View File

@ -65,12 +65,14 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los
"datatype": "Currency", "datatype": "Currency",
"currency": income[-1].get('currency') if income else default_currency "currency": income[-1].get('currency') if income else default_currency
}, },
{ "type": "separator", "value": "-"},
{ {
"value": net_expense, "value": net_expense,
"label": expense_label, "label": expense_label,
"datatype": "Currency", "datatype": "Currency",
"currency": expense[-1].get('currency') if expense else default_currency "currency": expense[-1].get('currency') if expense else default_currency
}, },
{ "type": "separator", "value": "=", "color": "blue"},
{ {
"value": net_profit, "value": net_profit,
"indicator": "Green" if net_profit > 0 else "Red", "indicator": "Green" if net_profit > 0 else "Red",