diff --git a/lib/data/models/invoice_model.dart b/lib/data/models/invoice_model.dart index 266f63420..ce04fa503 100644 --- a/lib/data/models/invoice_model.dart +++ b/lib/data/models/invoice_model.dart @@ -247,6 +247,7 @@ abstract class InvoiceEntity extends Object dueDateDays: 'terms', saveDefaultTerms: false, saveDefaultFooter: false, + taxData: '', ); } @@ -594,6 +595,9 @@ abstract class InvoiceEntity extends Object @BuiltValueField(wireName: 'auto_bill_enabled') bool get autoBillEnabled; + @BuiltValueField(wireName: 'tax_data') + String get taxData; + @nullable String get filename; @@ -1516,7 +1520,8 @@ abstract class InvoiceEntity extends Object ..saveDefaultTerms = false ..saveDefaultFooter = false ..autoBillEnabled = false - ..subscriptionId = ''; + ..subscriptionId = '' + ..taxData = ''; static Serializer get serializer => _$invoiceEntitySerializer; } diff --git a/lib/data/models/invoice_model.g.dart b/lib/data/models/invoice_model.g.dart index 208bf7533..3749ab9b4 100644 --- a/lib/data/models/invoice_model.g.dart +++ b/lib/data/models/invoice_model.g.dart @@ -263,6 +263,9 @@ class _$InvoiceEntitySerializer implements StructuredSerializer { 'auto_bill_enabled', serializers.serialize(object.autoBillEnabled, specifiedType: const FullType(bool)), + 'tax_data', + serializers.serialize(object.taxData, + specifiedType: const FullType(String)), 'line_items', serializers.serialize(object.lineItems, specifiedType: const FullType( @@ -667,6 +670,10 @@ class _$InvoiceEntitySerializer implements StructuredSerializer { result.autoBillEnabled = serializers.deserialize(value, specifiedType: const FullType(bool)) as bool; break; + case 'tax_data': + result.taxData = serializers.deserialize(value, + specifiedType: const FullType(String)) as String; + break; case 'filename': result.filename = serializers.deserialize(value, specifiedType: const FullType(String)) as String; @@ -1544,6 +1551,8 @@ class _$InvoiceEntity extends InvoiceEntity { @override final bool autoBillEnabled; @override + final String taxData; + @override final String filename; @override final BuiltList recurringDates; @@ -1641,6 +1650,7 @@ class _$InvoiceEntity extends InvoiceEntity { this.invoiceId, this.recurringId, this.autoBillEnabled, + this.taxData, this.filename, this.recurringDates, this.lineItems, @@ -1744,6 +1754,7 @@ class _$InvoiceEntity extends InvoiceEntity { nextSendDate, r'InvoiceEntity', 'nextSendDate'); BuiltValueNullFieldError.checkNotNull( autoBillEnabled, r'InvoiceEntity', 'autoBillEnabled'); + BuiltValueNullFieldError.checkNotNull(taxData, r'InvoiceEntity', 'taxData'); BuiltValueNullFieldError.checkNotNull( lineItems, r'InvoiceEntity', 'lineItems'); BuiltValueNullFieldError.checkNotNull( @@ -1833,6 +1844,7 @@ class _$InvoiceEntity extends InvoiceEntity { invoiceId == other.invoiceId && recurringId == other.recurringId && autoBillEnabled == other.autoBillEnabled && + taxData == other.taxData && filename == other.filename && recurringDates == other.recurringDates && lineItems == other.lineItems && @@ -1913,6 +1925,7 @@ class _$InvoiceEntity extends InvoiceEntity { _$hash = $jc(_$hash, invoiceId.hashCode); _$hash = $jc(_$hash, recurringId.hashCode); _$hash = $jc(_$hash, autoBillEnabled.hashCode); + _$hash = $jc(_$hash, taxData.hashCode); _$hash = $jc(_$hash, filename.hashCode); _$hash = $jc(_$hash, recurringDates.hashCode); _$hash = $jc(_$hash, lineItems.hashCode); @@ -1993,6 +2006,7 @@ class _$InvoiceEntity extends InvoiceEntity { ..add('invoiceId', invoiceId) ..add('recurringId', recurringId) ..add('autoBillEnabled', autoBillEnabled) + ..add('taxData', taxData) ..add('filename', filename) ..add('recurringDates', recurringDates) ..add('lineItems', lineItems) @@ -2262,6 +2276,10 @@ class InvoiceEntityBuilder set autoBillEnabled(bool autoBillEnabled) => _$this._autoBillEnabled = autoBillEnabled; + String _taxData; + String get taxData => _$this._taxData; + set taxData(String taxData) => _$this._taxData = taxData; + String _filename; String get filename => _$this._filename; set filename(String filename) => _$this._filename = filename; @@ -2412,6 +2430,7 @@ class InvoiceEntityBuilder _invoiceId = $v.invoiceId; _recurringId = $v.recurringId; _autoBillEnabled = $v.autoBillEnabled; + _taxData = $v.taxData; _filename = $v.filename; _recurringDates = $v.recurringDates?.toBuilder(); _lineItems = $v.lineItems.toBuilder(); @@ -2519,6 +2538,7 @@ class InvoiceEntityBuilder invoiceId: invoiceId, recurringId: recurringId, autoBillEnabled: BuiltValueNullFieldError.checkNotNull(autoBillEnabled, r'InvoiceEntity', 'autoBillEnabled'), + taxData: BuiltValueNullFieldError.checkNotNull(taxData, r'InvoiceEntity', 'taxData'), filename: filename, recurringDates: _recurringDates?.build(), lineItems: lineItems.build(), diff --git a/lib/data/models/product_model.dart b/lib/data/models/product_model.dart index b3d7eeb1f..73e667a3e 100644 --- a/lib/data/models/product_model.dart +++ b/lib/data/models/product_model.dart @@ -102,6 +102,7 @@ abstract class ProductEntity extends Object stockNotification: true, imageUrl: '', maxQuantity: 0, + taxId: 0, documents: BuiltList(), ); } @@ -179,6 +180,9 @@ abstract class ProductEntity extends Object @BuiltValueField(wireName: 'max_quantity') int get maxQuantity; + @BuiltValueField(wireName: 'tax_id') + int get taxId; + BuiltList get documents; @override @@ -362,7 +366,8 @@ abstract class ProductEntity extends Object ..stockNotification = true ..stockNotificationThreshold = 0 ..imageUrl = '' - ..maxQuantity = 0; + ..maxQuantity = 0 + ..taxId = 0; static Serializer get serializer => _$productEntitySerializer; } diff --git a/lib/data/models/product_model.g.dart b/lib/data/models/product_model.g.dart index 86b055313..fb7aff253 100644 --- a/lib/data/models/product_model.g.dart +++ b/lib/data/models/product_model.g.dart @@ -177,6 +177,8 @@ class _$ProductEntitySerializer implements StructuredSerializer { 'max_quantity', serializers.serialize(object.maxQuantity, specifiedType: const FullType(int)), + 'tax_id', + serializers.serialize(object.taxId, specifiedType: const FullType(int)), 'documents', serializers.serialize(object.documents, specifiedType: const FullType( @@ -317,6 +319,10 @@ class _$ProductEntitySerializer implements StructuredSerializer { result.maxQuantity = serializers.deserialize(value, specifiedType: const FullType(int)) as int; break; + case 'tax_id': + result.taxId = serializers.deserialize(value, + specifiedType: const FullType(int)) as int; + break; case 'documents': result.documents.replace(serializers.deserialize(value, specifiedType: const FullType( @@ -601,6 +607,8 @@ class _$ProductEntity extends ProductEntity { @override final int maxQuantity; @override + final int taxId; + @override final BuiltList documents; @override final bool isChanged; @@ -643,6 +651,7 @@ class _$ProductEntity extends ProductEntity { this.stockNotification, this.imageUrl, this.maxQuantity, + this.taxId, this.documents, this.isChanged, this.createdAt, @@ -690,6 +699,7 @@ class _$ProductEntity extends ProductEntity { imageUrl, r'ProductEntity', 'imageUrl'); BuiltValueNullFieldError.checkNotNull( maxQuantity, r'ProductEntity', 'maxQuantity'); + BuiltValueNullFieldError.checkNotNull(taxId, r'ProductEntity', 'taxId'); BuiltValueNullFieldError.checkNotNull( documents, r'ProductEntity', 'documents'); BuiltValueNullFieldError.checkNotNull( @@ -732,6 +742,7 @@ class _$ProductEntity extends ProductEntity { stockNotification == other.stockNotification && imageUrl == other.imageUrl && maxQuantity == other.maxQuantity && + taxId == other.taxId && documents == other.documents && isChanged == other.isChanged && createdAt == other.createdAt && @@ -768,6 +779,7 @@ class _$ProductEntity extends ProductEntity { _$hash = $jc(_$hash, stockNotification.hashCode); _$hash = $jc(_$hash, imageUrl.hashCode); _$hash = $jc(_$hash, maxQuantity.hashCode); + _$hash = $jc(_$hash, taxId.hashCode); _$hash = $jc(_$hash, documents.hashCode); _$hash = $jc(_$hash, isChanged.hashCode); _$hash = $jc(_$hash, createdAt.hashCode); @@ -804,6 +816,7 @@ class _$ProductEntity extends ProductEntity { ..add('stockNotification', stockNotification) ..add('imageUrl', imageUrl) ..add('maxQuantity', maxQuantity) + ..add('taxId', taxId) ..add('documents', documents) ..add('isChanged', isChanged) ..add('createdAt', createdAt) @@ -903,6 +916,10 @@ class ProductEntityBuilder int get maxQuantity => _$this._maxQuantity; set maxQuantity(int maxQuantity) => _$this._maxQuantity = maxQuantity; + int _taxId; + int get taxId => _$this._taxId; + set taxId(int taxId) => _$this._taxId = taxId; + ListBuilder _documents; ListBuilder get documents => _$this._documents ??= new ListBuilder(); @@ -970,6 +987,7 @@ class ProductEntityBuilder _stockNotification = $v.stockNotification; _imageUrl = $v.imageUrl; _maxQuantity = $v.maxQuantity; + _taxId = $v.taxId; _documents = $v.documents.toBuilder(); _isChanged = $v.isChanged; _createdAt = $v.createdAt; @@ -1032,6 +1050,7 @@ class ProductEntityBuilder stockNotification: BuiltValueNullFieldError.checkNotNull(stockNotification, r'ProductEntity', 'stockNotification'), imageUrl: BuiltValueNullFieldError.checkNotNull(imageUrl, r'ProductEntity', 'imageUrl'), maxQuantity: BuiltValueNullFieldError.checkNotNull(maxQuantity, r'ProductEntity', 'maxQuantity'), + taxId: BuiltValueNullFieldError.checkNotNull(taxId, r'ProductEntity', 'taxId'), documents: documents.build(), isChanged: isChanged, createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, r'ProductEntity', 'createdAt'),