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() + ')';
|
value = value + ' (' + values['count'].floor().toString() + ')';
|
||||||
} else if (columnType == ReportColumnType.number) {
|
} else if (columnType == ReportColumnType.number) {
|
||||||
|
final currencyId = values['${column}_currency_id'];
|
||||||
value = formatNumber(values[column], context,
|
value = formatNumber(values[column], context,
|
||||||
formatNumberType: column == 'quantity'
|
formatNumberType: column == 'quantity'
|
||||||
? FormatNumberType.double
|
? FormatNumberType.double
|
||||||
: FormatNumberType.money,
|
: FormatNumberType.money,
|
||||||
currencyId: values['${column}_currency_id'].round().toString());
|
currencyId:
|
||||||
|
currencyId == null ? null : currencyId.round().toString());
|
||||||
} else if (columnType == ReportColumnType.duration) {
|
} else if (columnType == ReportColumnType.duration) {
|
||||||
value = formatDuration(Duration(seconds: values[column].toInt()));
|
value = formatDuration(Duration(seconds: values[column].toInt()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -617,7 +617,7 @@ GroupTotals calculateReportTotals({
|
||||||
totals[group][column] = 0;
|
totals[group][column] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell is ReportNumberValue) {
|
if (cell is ReportNumberValue && cell.currencyId != null) {
|
||||||
totals[group]['${column}_currency_id'] = parseDouble(cell.currencyId);
|
totals[group]['${column}_currency_id'] = parseDouble(cell.currencyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue