Add base amount column for invoices in reports #5622
This commit is contained in:
parent
e4fc802b7b
commit
4b2d0ff02c
|
|
@ -114,10 +114,10 @@ ReportResult creditReport(
|
|||
value = credit.balance;
|
||||
break;
|
||||
case CreditReportFields.converted_amount:
|
||||
value = credit.amount * credit.exchangeRate;
|
||||
value = credit.amount * 1 / credit.exchangeRate;
|
||||
break;
|
||||
case CreditReportFields.converted_balance:
|
||||
value = credit.balance * credit.exchangeRate;
|
||||
value = credit.balance * 1 / credit.exchangeRate;
|
||||
break;
|
||||
case CreditReportFields.client:
|
||||
value = client?.listDisplayName ?? '';
|
||||
|
|
|
|||
|
|
@ -122,10 +122,10 @@ ReportResult invoiceReport(
|
|||
value = invoice.balance;
|
||||
break;
|
||||
case InvoiceReportFields.converted_amount:
|
||||
value = invoice.amount * invoice.exchangeRate;
|
||||
value = invoice.amount * 1 / invoice.exchangeRate;
|
||||
break;
|
||||
case InvoiceReportFields.converted_balance:
|
||||
value = invoice.balance * invoice.exchangeRate;
|
||||
value = invoice.balance * 1 / invoice.exchangeRate;
|
||||
break;
|
||||
case InvoiceReportFields.client:
|
||||
value = client?.displayName ?? '';
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ ReportResult quoteReport(
|
|||
value = quote.amount;
|
||||
break;
|
||||
case QuoteReportFields.converted_amount:
|
||||
value = quote.amount * quote.exchangeRate;
|
||||
value = quote.amount * 1 / quote.exchangeRate;
|
||||
break;
|
||||
case QuoteReportFields.number:
|
||||
value = quote.number;
|
||||
|
|
|
|||
|
|
@ -1202,9 +1202,6 @@ class ReportResult {
|
|||
});
|
||||
}
|
||||
|
||||
print('## TOTALS: $totals');
|
||||
print('## Keys: $keys');
|
||||
|
||||
List<String> allFields = [];
|
||||
keys.forEach((currencyId) {
|
||||
final values = totals[currencyId];
|
||||
|
|
@ -1222,7 +1219,6 @@ class ReportResult {
|
|||
DataCell(Text(values['count'].toInt().toString())),
|
||||
];
|
||||
|
||||
print('## FIELDs: $allFields');
|
||||
allFields.forEach((field) {
|
||||
final amount = values[field];
|
||||
if (field != 'count') {
|
||||
|
|
@ -1243,7 +1239,7 @@ class ReportResult {
|
|||
}
|
||||
});
|
||||
|
||||
print('## Add row with cells: ${cells.length}');
|
||||
print('## Total Rows: ${cells.length}');
|
||||
rows.add(DataRow(cells: cells));
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue