mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-13 16:22:42 +02:00
feat: clean up yearly overview by removing 0 values
This commit is contained in:
@@ -139,15 +139,16 @@ def yearly_overview(request, year: int):
|
|||||||
"balance_paid",
|
"balance_paid",
|
||||||
"balance_total",
|
"balance_total",
|
||||||
]:
|
]:
|
||||||
result[month][field].append(
|
if entry[field] != 0:
|
||||||
{
|
result[month][field].append(
|
||||||
"code": currency_code,
|
{
|
||||||
"prefix": prefix,
|
"code": currency_code,
|
||||||
"suffix": suffix,
|
"prefix": prefix,
|
||||||
"decimal_places": decimal_places,
|
"suffix": suffix,
|
||||||
"amount": entry[field],
|
"decimal_places": decimal_places,
|
||||||
}
|
"amount": entry[field],
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Fill in missing months with empty lists
|
# Fill in missing months with empty lists
|
||||||
for month in all_months:
|
for month in all_months:
|
||||||
|
|||||||
Reference in New Issue
Block a user