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) ?? '';
|
String url = WebUtils.browserUrl ?? prefs.getString(kSharedPrefUrl) ?? '';
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
url = kAppStagingUrl;
|
//url = kAppStagingUrl;
|
||||||
}
|
}
|
||||||
//url = kAppProductionUrl;
|
//url = kAppProductionUrl;
|
||||||
//url = kAppDemoUrl;
|
//url = kAppDemoUrl;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ ReportResult lineItemReport(
|
||||||
for (var entry in invoiceMap.entries) {
|
for (var entry in invoiceMap.entries) {
|
||||||
final invoice = entry.value;
|
final invoice = entry.value;
|
||||||
final client = clientMap[invoice.clientId];
|
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) {
|
if (invoice.isDeleted || client.isDeleted) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -179,12 +180,9 @@ ReportResult lineItemReport(
|
||||||
|
|
||||||
if (value.runtimeType == bool) {
|
if (value.runtimeType == bool) {
|
||||||
row.add(invoice.getReportBool(value: value));
|
row.add(invoice.getReportBool(value: value));
|
||||||
} else if (value.runtimeType == double) {
|
} else if (value.runtimeType == double || value.runtimeType == int) {
|
||||||
row.add(invoice.getReportDouble(
|
row.add(invoice.getReportDouble(
|
||||||
value: value, currencyId: client.currencyId));
|
value: value, currencyId: client.currencyId));
|
||||||
} else if (value.runtimeType == int) {
|
|
||||||
row.add(invoice.getReportInt(
|
|
||||||
value: value, currencyId: client.currencyId));
|
|
||||||
} else {
|
} else {
|
||||||
row.add(invoice.getReportString(value: value));
|
row.add(invoice.getReportString(value: value));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ ReportResult lineItemReport(
|
||||||
for (var entry in invoiceMap.entries) {
|
for (var entry in invoiceMap.entries) {
|
||||||
final invoice = entry.value;
|
final invoice = entry.value;
|
||||||
final client = clientMap[invoice.clientId];
|
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) {
|
if (invoice.isDeleted || client.isDeleted) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -175,12 +176,9 @@ ReportResult lineItemReport(
|
||||||
|
|
||||||
if (value.runtimeType == bool) {
|
if (value.runtimeType == bool) {
|
||||||
row.add(invoice.getReportBool(value: value));
|
row.add(invoice.getReportBool(value: value));
|
||||||
} else if (value.runtimeType == double) {
|
} else if (value.runtimeType == double || value.runtimeType == int) {
|
||||||
row.add(invoice.getReportDouble(
|
row.add(invoice.getReportDouble(
|
||||||
value: value, currencyId: client.currencyId));
|
value: value, currencyId: client.currencyId));
|
||||||
} else if (value.runtimeType == int) {
|
|
||||||
row.add(invoice.getReportInt(
|
|
||||||
value: value, currencyId: client.currencyId));
|
|
||||||
} else {
|
} else {
|
||||||
row.add(invoice.getReportString(value: value));
|
row.add(invoice.getReportString(value: value));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue