mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
refactor: change sequence for profit and loss statement
This commit is contained in:
@@ -59,13 +59,6 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los
|
|||||||
expense_label = _("Total Expense")
|
expense_label = _("Total Expense")
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
|
||||||
"value": net_profit,
|
|
||||||
"indicator": "Green" if net_profit > 0 else "Red",
|
|
||||||
"label": profit_label,
|
|
||||||
"datatype": "Currency",
|
|
||||||
"currency": net_profit_loss.get("currency") if net_profit_loss else default_currency
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"value": net_income,
|
"value": net_income,
|
||||||
"label": income_label,
|
"label": income_label,
|
||||||
@@ -77,6 +70,13 @@ def get_report_summary(period_list, periodicity, income, expense, net_profit_los
|
|||||||
"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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": net_profit,
|
||||||
|
"indicator": "Green" if net_profit > 0 else "Red",
|
||||||
|
"label": profit_label,
|
||||||
|
"datatype": "Currency",
|
||||||
|
"currency": net_profit_loss.get("currency") if net_profit_loss else default_currency
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user