Report changes
This commit is contained in:
parent
0e9f4865c7
commit
5b0c524596
|
|
@ -131,7 +131,7 @@ Future<AppState> _initialState(bool isTesting) async {
|
|||
|
||||
String url = WebUtils.browserUrl ?? prefs.getString(kSharedPrefUrl) ?? '';
|
||||
if (!kReleaseMode) {
|
||||
url = kAppStagingUrl;
|
||||
//url = kAppStagingUrl;
|
||||
}
|
||||
//url = kAppProductionUrl;
|
||||
//url = kAppDemoUrl;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ ReportResult lineItemReport(
|
|||
for (var entry in invoiceMap.entries) {
|
||||
final invoice = entry.value;
|
||||
final client = clientMap[invoice.clientId];
|
||||
final precision = staticState.currencyMap[client.currencyId].precision;
|
||||
final precision =
|
||||
staticState.currencyMap[client.currencyId]?.precision ?? 2;
|
||||
|
||||
if (invoice.isDeleted || client.isDeleted) {
|
||||
continue;
|
||||
|
|
@ -179,12 +180,9 @@ ReportResult lineItemReport(
|
|||
|
||||
if (value.runtimeType == bool) {
|
||||
row.add(invoice.getReportBool(value: value));
|
||||
} else if (value.runtimeType == double) {
|
||||
} else if (value.runtimeType == double || value.runtimeType == int) {
|
||||
row.add(invoice.getReportDouble(
|
||||
value: value, currencyId: client.currencyId));
|
||||
} else if (value.runtimeType == int) {
|
||||
row.add(invoice.getReportInt(
|
||||
value: value, currencyId: client.currencyId));
|
||||
} else {
|
||||
row.add(invoice.getReportString(value: value));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ ReportResult lineItemReport(
|
|||
for (var entry in invoiceMap.entries) {
|
||||
final invoice = entry.value;
|
||||
final client = clientMap[invoice.clientId];
|
||||
final precision = staticState.currencyMap[client.currencyId].precision;
|
||||
final precision =
|
||||
staticState.currencyMap[client.currencyId]?.precision ?? 2;
|
||||
|
||||
if (invoice.isDeleted || client.isDeleted) {
|
||||
continue;
|
||||
|
|
@ -175,12 +176,9 @@ ReportResult lineItemReport(
|
|||
|
||||
if (value.runtimeType == bool) {
|
||||
row.add(invoice.getReportBool(value: value));
|
||||
} else if (value.runtimeType == double) {
|
||||
} else if (value.runtimeType == double || value.runtimeType == int) {
|
||||
row.add(invoice.getReportDouble(
|
||||
value: value, currencyId: client.currencyId));
|
||||
} else if (value.runtimeType == int) {
|
||||
row.add(invoice.getReportInt(
|
||||
value: value, currencyId: client.currencyId));
|
||||
} else {
|
||||
row.add(invoice.getReportString(value: value));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue