From c3d15336b7b25b596b7439519142c43c03340a68 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 21 Mar 2022 15:07:55 +0200 Subject: [PATCH] Correct quantity formatting in reports --- lib/ui/reports/invoice_item_report.dart | 5 ++++- lib/ui/reports/quote_item_report.dart | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ui/reports/invoice_item_report.dart b/lib/ui/reports/invoice_item_report.dart index f55406c3b..3d16eb7d2 100644 --- a/lib/ui/reports/invoice_item_report.dart +++ b/lib/ui/reports/invoice_item_report.dart @@ -195,7 +195,10 @@ ReportResult lineItemReport( row.add(invoice.getReportBool(value: value)); } else if (value.runtimeType == double || value.runtimeType == int) { row.add(invoice.getReportDouble( - value: value, currencyId: client.currencyId)); + value: value, + currencyId: column == InvoiceItemReportFields.quantity + ? null + : client.currencyId)); } else { row.add(invoice.getReportString(value: value)); } diff --git a/lib/ui/reports/quote_item_report.dart b/lib/ui/reports/quote_item_report.dart index de1570a50..69d21f500 100644 --- a/lib/ui/reports/quote_item_report.dart +++ b/lib/ui/reports/quote_item_report.dart @@ -191,7 +191,10 @@ ReportResult lineItemReport( row.add(invoice.getReportBool(value: value)); } else if (value.runtimeType == double || value.runtimeType == int) { row.add(invoice.getReportDouble( - value: value, currencyId: client.currencyId)); + value: value, + currencyId: column == QuoteItemReportFields.quantity + ? null + : client.currencyId)); } else { row.add(invoice.getReportString(value: value)); }