Fix demo data

This commit is contained in:
Hillel Coren 2020-02-23 10:03:10 +02:00
parent e6392c5f4b
commit 1a33cc36e2
4 changed files with 12 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -156,6 +156,7 @@ abstract class ClientEntity extends Object
@BuiltValueField(wireName: 'balance')
double get balance;
@nullable
@BuiltValueField(wireName: 'credit_balance')
double get creditBalance;

View File

@ -120,9 +120,6 @@ class _$ClientEntitySerializer implements StructuredSerializer<ClientEntity> {
'balance',
serializers.serialize(object.balance,
specifiedType: const FullType(double)),
'credit_balance',
serializers.serialize(object.creditBalance,
specifiedType: const FullType(double)),
'paid_to_date',
serializers.serialize(object.paidToDate,
specifiedType: const FullType(double)),
@ -207,6 +204,12 @@ class _$ClientEntitySerializer implements StructuredSerializer<ClientEntity> {
..add(serializers.serialize(object.lastUpdatedActivities,
specifiedType: const FullType(int)));
}
if (object.creditBalance != null) {
result
..add('credit_balance')
..add(serializers.serialize(object.creditBalance,
specifiedType: const FullType(double)));
}
if (object.countryId != null) {
result
..add('country_id')
@ -1034,9 +1037,6 @@ class _$ClientEntity extends ClientEntity {
if (balance == null) {
throw new BuiltValueNullFieldError('ClientEntity', 'balance');
}
if (creditBalance == null) {
throw new BuiltValueNullFieldError('ClientEntity', 'creditBalance');
}
if (paidToDate == null) {
throw new BuiltValueNullFieldError('ClientEntity', 'paidToDate');
}

View File

@ -148,14 +148,14 @@ class ReportsScreen extends StatelessWidget {
//kReportActivity,
//kReportAging,
kReportClient,
kReportCredit,
kReportDocument,
kReportExpense,
//kReportCredit,
//kReportDocument,
//kReportExpense,
kReportInvoice,
kReportPayment,
kReportProduct,
//kReportProfitAndLoss,
kReportTask,
//kReportTask,
//kReportTaxRate,
//kReportQuote,
]