Report fixes
This commit is contained in:
parent
857113cfed
commit
887ab0cdc6
|
|
@ -151,6 +151,7 @@ class EntityPresenter {
|
|||
'age_group_120',
|
||||
'stock_quantity',
|
||||
'notification_threshold',
|
||||
'partial',
|
||||
].contains(field);
|
||||
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -182,14 +182,14 @@ ReportResult invoiceReport(
|
|||
value = invoice.id;
|
||||
break;
|
||||
case InvoiceReportFields.amount:
|
||||
value = invoice.isCancelled ? 0 : invoice.amount;
|
||||
value = invoice.isCancelled ? 0.0 : invoice.amount;
|
||||
break;
|
||||
case InvoiceReportFields.balance:
|
||||
value = invoice.isCancelled ? 0 : invoice.balanceOrAmount;
|
||||
value = invoice.isCancelled ? 0.0 : invoice.balanceOrAmount;
|
||||
break;
|
||||
case InvoiceReportFields.converted_amount:
|
||||
value = invoice.isCancelled
|
||||
? 0
|
||||
? 0.0
|
||||
: round(invoice.amount * 1 / invoice.exchangeRate, 2);
|
||||
break;
|
||||
case InvoiceReportFields.converted_balance:
|
||||
|
|
@ -313,13 +313,13 @@ ReportResult invoiceReport(
|
|||
value = invoice.isDeleted;
|
||||
break;
|
||||
case InvoiceReportFields.tax_amount:
|
||||
value = invoice.isCancelled ? 0 : invoice.taxAmount;
|
||||
value = invoice.isCancelled ? 0.0 : invoice.taxAmount;
|
||||
break;
|
||||
case InvoiceReportFields.net_amount:
|
||||
value = invoice.isCancelled ? 0 : invoice.netAmount;
|
||||
value = invoice.isCancelled ? 0.0 : invoice.netAmount;
|
||||
break;
|
||||
case InvoiceReportFields.net_balance:
|
||||
value = invoice.isCancelled ? 0 : invoice.netBalanceOrAmount;
|
||||
value = invoice.isCancelled ? 0.0 : invoice.netBalanceOrAmount;
|
||||
break;
|
||||
case InvoiceReportFields.exchange_rate:
|
||||
value = invoice.exchangeRate;
|
||||
|
|
|
|||
|
|
@ -1450,9 +1450,10 @@ class ReportResult {
|
|||
for (var j = 0; j < row.length; j++) {
|
||||
final cell = row[j];
|
||||
final column = columns[j];
|
||||
final canTotal = cell is ReportNumberValue ||
|
||||
cell is ReportDurationValue ||
|
||||
cell is ReportAgeValue;
|
||||
final canTotal = (cell is ReportNumberValue ||
|
||||
cell is ReportDurationValue ||
|
||||
cell is ReportAgeValue) &&
|
||||
!column.contains('_rate');
|
||||
|
||||
String currencyId = '';
|
||||
if (canTotal) {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/superlistapp/super_editor.git
|
||||
path: super_editor
|
||||
ref: 631_paint-multiple-selections
|
||||
html2md: ^1.2.5
|
||||
printing: ^5.8.0
|
||||
image_cropper: ^2.0.2
|
||||
|
|
|
|||
|
|
@ -1227,8 +1227,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: super_editor
|
||||
ref: HEAD
|
||||
resolved-ref: "1b4da8e9c197564795aadee7c231cf18bf904418"
|
||||
ref: typing-fade-prototype
|
||||
resolved-ref: b081a314ed3acfd1a40b6291832f36603229ceed
|
||||
url: "https://github.com/superlistapp/super_editor.git"
|
||||
source: git
|
||||
version: "0.2.0"
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/superlistapp/super_editor.git
|
||||
path: super_editor
|
||||
ref: typing-fade-prototype
|
||||
html2md: ^1.2.5
|
||||
printing: ^5.8.0
|
||||
image_cropper: ^2.0.2
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/superlistapp/super_editor.git
|
||||
path: super_editor
|
||||
ref: typing-fade-prototype
|
||||
html2md: ^1.2.5
|
||||
printing: ^5.8.0
|
||||
image_cropper: ^2.0.2
|
||||
|
|
|
|||
Loading…
Reference in New Issue