Add client number to reports
This commit is contained in:
parent
48db632c17
commit
873c13a463
|
|
@ -18,6 +18,7 @@ enum CreditReportFields {
|
|||
converted_amount,
|
||||
converted_balance,
|
||||
client,
|
||||
client_number,
|
||||
client_balance,
|
||||
client_address1,
|
||||
client_address2,
|
||||
|
|
@ -325,6 +326,9 @@ ReportResult creditReport(
|
|||
case CreditReportFields.client_shipping_country:
|
||||
value = staticState.countryMap[client.shippingCountryId]?.name ?? '';
|
||||
break;
|
||||
case CreditReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ enum InvoiceReportFields {
|
|||
converted_amount,
|
||||
converted_balance,
|
||||
client,
|
||||
client_number,
|
||||
client_balance,
|
||||
client_address1,
|
||||
client_address2,
|
||||
|
|
@ -378,6 +379,9 @@ ReportResult invoiceReport(
|
|||
case InvoiceReportFields.client_shipping_country:
|
||||
value = staticState.countryMap[client.shippingCountryId]?.name ?? '';
|
||||
break;
|
||||
case InvoiceReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import 'package:invoiceninja_flutter/utils/enums.dart';
|
|||
|
||||
enum TaxRateReportFields {
|
||||
client,
|
||||
client_number,
|
||||
number,
|
||||
amount,
|
||||
date,
|
||||
|
|
@ -126,6 +127,9 @@ ReportResult taxReport(
|
|||
value = staticState.currencyMap[client.currencyId]?.name ??
|
||||
staticState.currencyMap[client.settings.currencyId]?.name;
|
||||
break;
|
||||
case TaxRateReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
@ -157,7 +161,8 @@ ReportResult taxReport(
|
|||
for (var creditId in creditMap.keys) {
|
||||
final credit = creditMap[creditId];
|
||||
if (!credit.isDeleted && credit.isSent) {
|
||||
final client = clientMap[credit.clientId];
|
||||
final client =
|
||||
clientMap[credit.clientId] ?? ClientEntity(id: credit.clientId);
|
||||
final precision =
|
||||
staticState.currencyMap[client.currencyId]?.precision ?? 2;
|
||||
final taxes = credit.getTaxes(precision);
|
||||
|
|
@ -201,6 +206,9 @@ ReportResult taxReport(
|
|||
value = staticState.currencyMap[client.currencyId]?.name ??
|
||||
staticState.currencyMap[client.settings.currencyId]?.name;
|
||||
break;
|
||||
case TaxRateReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ enum QuoteReportFields {
|
|||
amount,
|
||||
converted_amount,
|
||||
client,
|
||||
client_number,
|
||||
client_balance,
|
||||
client_address1,
|
||||
client_address2,
|
||||
|
|
@ -318,6 +319,9 @@ ReportResult quoteReport(
|
|||
case QuoteReportFields.client_shipping_country:
|
||||
value = staticState.countryMap[client.shippingCountryId]?.name ?? '';
|
||||
break;
|
||||
case QuoteReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ enum RecurringInvoiceReportFields {
|
|||
amount,
|
||||
converted_amount,
|
||||
client,
|
||||
client_number,
|
||||
client_balance,
|
||||
client_address1,
|
||||
client_address2,
|
||||
|
|
@ -363,6 +364,9 @@ ReportResult recurringInvoiceReport(
|
|||
? localization.endless
|
||||
: '${invoice.remainingCycles}';
|
||||
break;
|
||||
case RecurringInvoiceReportFields.client_number:
|
||||
value = client.number;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ReportResult.matchField(
|
||||
|
|
|
|||
Loading…
Reference in New Issue