Quantity column in Invoice Item report shows currency symbol

This commit is contained in:
Hillel Coren 2021-07-26 18:43:37 +03:00
parent 77c54e186f
commit 046213c44d
2 changed files with 7 additions and 0 deletions

View File

@ -180,6 +180,8 @@ ReportResult lineItemReport(
if (value.runtimeType == bool) {
row.add(invoice.getReportBool(value: value));
} else if (column == InvoiceItemReportFields.quantity) {
row.add(invoice.getReportDouble(value: value));
} else if (value.runtimeType == double || value.runtimeType == int) {
row.add(invoice.getReportDouble(
value: value, currencyId: client.currencyId));

View File

@ -1491,6 +1491,11 @@ class ReportNumberValue extends ReportElement {
@override
String renderText(BuildContext context, String column) {
if (currencyId == null) {
return formatNumber(value, context,
formatNumberType: FormatNumberType.double);
}
return formatNumber(value, context,
currencyId: currencyId, formatNumberType: formatNumberType);
}