Skip to content

Commit 2d4590c

Browse files
committed
Reports: show "-" instead of "0,00€"
By using "-" instead, reports appear less crowded. Months/quarters with transactions in a category stand out more.
1 parent 9d61eeb commit 2d4590c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
5.98 KB
Loading

src/CashFlowReport.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ ReportWindow::_ComputeCashFlow()
249249
Fixed f;
250250

251251
incomegrid.ValueAt(columnindex, i, f);
252-
gCurrentLocale.CurrencyToString(f, temp);
252+
if (f == 0)
253+
temp = "-";
254+
else
255+
gCurrentLocale.CurrencyToString(f, temp);
253256

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

281284
expensegrid.ValueAt(columnindex, i, f);
282-
gCurrentLocale.CurrencyToString(f, temp);
285+
if (f == 0)
286+
temp = "-";
287+
else
288+
gCurrentLocale.CurrencyToString(f, temp);
283289

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

0 commit comments

Comments
 (0)