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