Fix grouping in reports
This commit is contained in:
parent
5ba6f2f192
commit
6bb9f92c9d
|
|
@ -1338,11 +1338,13 @@ class ReportResult {
|
|||
}
|
||||
value = value + ' (' + values['count'].floor().toString() + ')';
|
||||
} else if (columnType == ReportColumnType.number) {
|
||||
final currencyId = values['${column}_currency_id'];
|
||||
value = formatNumber(values[column], context,
|
||||
formatNumberType: column == 'quantity'
|
||||
? FormatNumberType.double
|
||||
: FormatNumberType.money,
|
||||
currencyId: values['${column}_currency_id'].round().toString());
|
||||
currencyId:
|
||||
currencyId == null ? null : currencyId.round().toString());
|
||||
} else if (columnType == ReportColumnType.duration) {
|
||||
value = formatDuration(Duration(seconds: values[column].toInt()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ GroupTotals calculateReportTotals({
|
|||
totals[group][column] = 0;
|
||||
}
|
||||
|
||||
if (cell is ReportNumberValue) {
|
||||
if (cell is ReportNumberValue && cell.currencyId != null) {
|
||||
totals[group]['${column}_currency_id'] = parseDouble(cell.currencyId);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue