Skip to content

Commit

Permalink
Reports: show "-" instead of "0,00€"
Browse files Browse the repository at this point in the history
By using "-" instead, reports appear less crowded. Months/quarters
with transactions in a category stand out more.
  • Loading branch information
humdingerb committed Nov 21, 2024
1 parent 9d61eeb commit 2d4590c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file modified documentation/en/images/reports.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/CashFlowReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ ReportWindow::_ComputeCashFlow()
Fixed f;

incomegrid.ValueAt(columnindex, i, f);
gCurrentLocale.CurrencyToString(f, temp);
if (f == 0)
temp = "-";
else
gCurrentLocale.CurrencyToString(f, temp);

BStringField* amountfield = new BStringField(temp.String());
row->SetField(amountfield, columnindex + 1);
Expand Down Expand Up @@ -279,7 +282,10 @@ ReportWindow::_ComputeCashFlow()
Fixed f;

expensegrid.ValueAt(columnindex, i, f);
gCurrentLocale.CurrencyToString(f, temp);
if (f == 0)
temp = "-";
else
gCurrentLocale.CurrencyToString(f, temp);

BStringField* amountfield = new BStringField(temp.String());
row->SetField(amountfield, columnindex + 1);
Expand Down

0 comments on commit 2d4590c

Please sign in to comment.