diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index a5a95a4b2..a085d380c 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -725,6 +725,7 @@ class ReportResult { for (var i = 0; i < data.length; i++) { final row = data[i]; + bool countedRow = false; for (var j = 0; j < row.length; j++) { final cell = row[j]; final column = columns[j]; @@ -734,6 +735,10 @@ class ReportResult { if (!totals.containsKey(currencyId)) { totals[currencyId] = {'count': 0}; } + if (!countedRow) { + totals[currencyId]['count']++; + countedRow = true; + } if (!totals[currencyId].containsKey(column)) { totals[currencyId][column] = 0; } @@ -747,7 +752,7 @@ class ReportResult { DataCell(Text( store.state.staticState.currencyMap[currencyId]?.listDisplayName ?? '')), - DataCell(Text(values.toString())), + DataCell(Text(values['count'].toInt().toString())), ]; final List fields = values.keys.toList()