Improve auto-taxes
This commit is contained in:
parent
d9d197de1f
commit
4e48469a93
|
|
@ -130,7 +130,7 @@ abstract class CompanyEntity extends Object
|
||||||
hasEInvoiceCertificate: false,
|
hasEInvoiceCertificate: false,
|
||||||
hasEInvoiceCertificatePassphrase: false,
|
hasEInvoiceCertificatePassphrase: false,
|
||||||
eInvoiceCertificatePassphrase: '',
|
eInvoiceCertificatePassphrase: '',
|
||||||
//taxData: TaxDataEntity(),
|
taxData: TaxDataEntity(),
|
||||||
taxConfig: TaxConfigEntity(),
|
taxConfig: TaxConfigEntity(),
|
||||||
groups: BuiltList<GroupEntity>(),
|
groups: BuiltList<GroupEntity>(),
|
||||||
taxRates: BuiltList<TaxRateEntity>(),
|
taxRates: BuiltList<TaxRateEntity>(),
|
||||||
|
|
@ -472,8 +472,8 @@ abstract class CompanyEntity extends Object
|
||||||
@BuiltValueField(wireName: 'tax_data')
|
@BuiltValueField(wireName: 'tax_data')
|
||||||
TaxConfigEntity get taxConfig;
|
TaxConfigEntity get taxConfig;
|
||||||
|
|
||||||
//@BuiltValueField(wireName: 'origin_tax_data')
|
@BuiltValueField(wireName: 'origin_tax_data')
|
||||||
//TaxDataEntity get taxData;
|
TaxDataEntity get taxData;
|
||||||
|
|
||||||
@BuiltValueField(wireName: 'has_e_invoice_certificate')
|
@BuiltValueField(wireName: 'has_e_invoice_certificate')
|
||||||
bool get hasEInvoiceCertificate;
|
bool get hasEInvoiceCertificate;
|
||||||
|
|
@ -787,7 +787,7 @@ abstract class CompanyEntity extends Object
|
||||||
..hasEInvoiceCertificatePassphrase = false
|
..hasEInvoiceCertificatePassphrase = false
|
||||||
..eInvoiceCertificatePassphrase = ''
|
..eInvoiceCertificatePassphrase = ''
|
||||||
..taxConfig.replace(TaxConfigEntity())
|
..taxConfig.replace(TaxConfigEntity())
|
||||||
//..taxData.replace(TaxDataEntity())
|
..taxData.replace(TaxDataEntity())
|
||||||
..systemLogs.replace(BuiltList<SystemLogEntity>())
|
..systemLogs.replace(BuiltList<SystemLogEntity>())
|
||||||
..subscriptions.replace(BuiltList<SubscriptionEntity>())
|
..subscriptions.replace(BuiltList<SubscriptionEntity>())
|
||||||
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
||||||
|
|
|
||||||
|
|
@ -383,6 +383,9 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
'tax_data',
|
'tax_data',
|
||||||
serializers.serialize(object.taxConfig,
|
serializers.serialize(object.taxConfig,
|
||||||
specifiedType: const FullType(TaxConfigEntity)),
|
specifiedType: const FullType(TaxConfigEntity)),
|
||||||
|
'origin_tax_data',
|
||||||
|
serializers.serialize(object.taxData,
|
||||||
|
specifiedType: const FullType(TaxDataEntity)),
|
||||||
'has_e_invoice_certificate',
|
'has_e_invoice_certificate',
|
||||||
serializers.serialize(object.hasEInvoiceCertificate,
|
serializers.serialize(object.hasEInvoiceCertificate,
|
||||||
specifiedType: const FullType(bool)),
|
specifiedType: const FullType(bool)),
|
||||||
|
|
@ -940,6 +943,10 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
specifiedType: const FullType(TaxConfigEntity))
|
specifiedType: const FullType(TaxConfigEntity))
|
||||||
as TaxConfigEntity);
|
as TaxConfigEntity);
|
||||||
break;
|
break;
|
||||||
|
case 'origin_tax_data':
|
||||||
|
result.taxData.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(TaxDataEntity)) as TaxDataEntity);
|
||||||
|
break;
|
||||||
case 'has_e_invoice_certificate':
|
case 'has_e_invoice_certificate':
|
||||||
result.hasEInvoiceCertificate = serializers.deserialize(value,
|
result.hasEInvoiceCertificate = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(bool)) as bool;
|
specifiedType: const FullType(bool)) as bool;
|
||||||
|
|
@ -1863,6 +1870,8 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
@override
|
@override
|
||||||
final TaxConfigEntity taxConfig;
|
final TaxConfigEntity taxConfig;
|
||||||
@override
|
@override
|
||||||
|
final TaxDataEntity taxData;
|
||||||
|
@override
|
||||||
final bool hasEInvoiceCertificate;
|
final bool hasEInvoiceCertificate;
|
||||||
@override
|
@override
|
||||||
final bool hasEInvoiceCertificatePassphrase;
|
final bool hasEInvoiceCertificatePassphrase;
|
||||||
|
|
@ -1995,6 +2004,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
this.stopOnUnpaidRecurring,
|
this.stopOnUnpaidRecurring,
|
||||||
this.calculateTaxes,
|
this.calculateTaxes,
|
||||||
this.taxConfig,
|
this.taxConfig,
|
||||||
|
this.taxData,
|
||||||
this.hasEInvoiceCertificate,
|
this.hasEInvoiceCertificate,
|
||||||
this.hasEInvoiceCertificatePassphrase,
|
this.hasEInvoiceCertificatePassphrase,
|
||||||
this.eInvoiceCertificatePassphrase,
|
this.eInvoiceCertificatePassphrase,
|
||||||
|
|
@ -2205,6 +2215,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
calculateTaxes, r'CompanyEntity', 'calculateTaxes');
|
calculateTaxes, r'CompanyEntity', 'calculateTaxes');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
taxConfig, r'CompanyEntity', 'taxConfig');
|
taxConfig, r'CompanyEntity', 'taxConfig');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(taxData, r'CompanyEntity', 'taxData');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
hasEInvoiceCertificate, r'CompanyEntity', 'hasEInvoiceCertificate');
|
hasEInvoiceCertificate, r'CompanyEntity', 'hasEInvoiceCertificate');
|
||||||
BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificatePassphrase,
|
BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificatePassphrase,
|
||||||
|
|
@ -2335,6 +2346,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
stopOnUnpaidRecurring == other.stopOnUnpaidRecurring &&
|
stopOnUnpaidRecurring == other.stopOnUnpaidRecurring &&
|
||||||
calculateTaxes == other.calculateTaxes &&
|
calculateTaxes == other.calculateTaxes &&
|
||||||
taxConfig == other.taxConfig &&
|
taxConfig == other.taxConfig &&
|
||||||
|
taxData == other.taxData &&
|
||||||
hasEInvoiceCertificate == other.hasEInvoiceCertificate &&
|
hasEInvoiceCertificate == other.hasEInvoiceCertificate &&
|
||||||
hasEInvoiceCertificatePassphrase ==
|
hasEInvoiceCertificatePassphrase ==
|
||||||
other.hasEInvoiceCertificatePassphrase &&
|
other.hasEInvoiceCertificatePassphrase &&
|
||||||
|
|
@ -2459,6 +2471,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
_$hash = $jc(_$hash, stopOnUnpaidRecurring.hashCode);
|
_$hash = $jc(_$hash, stopOnUnpaidRecurring.hashCode);
|
||||||
_$hash = $jc(_$hash, calculateTaxes.hashCode);
|
_$hash = $jc(_$hash, calculateTaxes.hashCode);
|
||||||
_$hash = $jc(_$hash, taxConfig.hashCode);
|
_$hash = $jc(_$hash, taxConfig.hashCode);
|
||||||
|
_$hash = $jc(_$hash, taxData.hashCode);
|
||||||
_$hash = $jc(_$hash, hasEInvoiceCertificate.hashCode);
|
_$hash = $jc(_$hash, hasEInvoiceCertificate.hashCode);
|
||||||
_$hash = $jc(_$hash, hasEInvoiceCertificatePassphrase.hashCode);
|
_$hash = $jc(_$hash, hasEInvoiceCertificatePassphrase.hashCode);
|
||||||
_$hash = $jc(_$hash, eInvoiceCertificatePassphrase.hashCode);
|
_$hash = $jc(_$hash, eInvoiceCertificatePassphrase.hashCode);
|
||||||
|
|
@ -2582,6 +2595,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
..add('stopOnUnpaidRecurring', stopOnUnpaidRecurring)
|
..add('stopOnUnpaidRecurring', stopOnUnpaidRecurring)
|
||||||
..add('calculateTaxes', calculateTaxes)
|
..add('calculateTaxes', calculateTaxes)
|
||||||
..add('taxConfig', taxConfig)
|
..add('taxConfig', taxConfig)
|
||||||
|
..add('taxData', taxData)
|
||||||
..add('hasEInvoiceCertificate', hasEInvoiceCertificate)
|
..add('hasEInvoiceCertificate', hasEInvoiceCertificate)
|
||||||
..add('hasEInvoiceCertificatePassphrase',
|
..add('hasEInvoiceCertificatePassphrase',
|
||||||
hasEInvoiceCertificatePassphrase)
|
hasEInvoiceCertificatePassphrase)
|
||||||
|
|
@ -3140,6 +3154,11 @@ class CompanyEntityBuilder
|
||||||
set taxConfig(TaxConfigEntityBuilder taxConfig) =>
|
set taxConfig(TaxConfigEntityBuilder taxConfig) =>
|
||||||
_$this._taxConfig = taxConfig;
|
_$this._taxConfig = taxConfig;
|
||||||
|
|
||||||
|
TaxDataEntityBuilder _taxData;
|
||||||
|
TaxDataEntityBuilder get taxData =>
|
||||||
|
_$this._taxData ??= new TaxDataEntityBuilder();
|
||||||
|
set taxData(TaxDataEntityBuilder taxData) => _$this._taxData = taxData;
|
||||||
|
|
||||||
bool _hasEInvoiceCertificate;
|
bool _hasEInvoiceCertificate;
|
||||||
bool get hasEInvoiceCertificate => _$this._hasEInvoiceCertificate;
|
bool get hasEInvoiceCertificate => _$this._hasEInvoiceCertificate;
|
||||||
set hasEInvoiceCertificate(bool hasEInvoiceCertificate) =>
|
set hasEInvoiceCertificate(bool hasEInvoiceCertificate) =>
|
||||||
|
|
@ -3307,6 +3326,7 @@ class CompanyEntityBuilder
|
||||||
_stopOnUnpaidRecurring = $v.stopOnUnpaidRecurring;
|
_stopOnUnpaidRecurring = $v.stopOnUnpaidRecurring;
|
||||||
_calculateTaxes = $v.calculateTaxes;
|
_calculateTaxes = $v.calculateTaxes;
|
||||||
_taxConfig = $v.taxConfig.toBuilder();
|
_taxConfig = $v.taxConfig.toBuilder();
|
||||||
|
_taxData = $v.taxData.toBuilder();
|
||||||
_hasEInvoiceCertificate = $v.hasEInvoiceCertificate;
|
_hasEInvoiceCertificate = $v.hasEInvoiceCertificate;
|
||||||
_hasEInvoiceCertificatePassphrase = $v.hasEInvoiceCertificatePassphrase;
|
_hasEInvoiceCertificatePassphrase = $v.hasEInvoiceCertificatePassphrase;
|
||||||
_eInvoiceCertificatePassphrase = $v.eInvoiceCertificatePassphrase;
|
_eInvoiceCertificatePassphrase = $v.eInvoiceCertificatePassphrase;
|
||||||
|
|
@ -3461,6 +3481,7 @@ class CompanyEntityBuilder
|
||||||
stopOnUnpaidRecurring: BuiltValueNullFieldError.checkNotNull(stopOnUnpaidRecurring, r'CompanyEntity', 'stopOnUnpaidRecurring'),
|
stopOnUnpaidRecurring: BuiltValueNullFieldError.checkNotNull(stopOnUnpaidRecurring, r'CompanyEntity', 'stopOnUnpaidRecurring'),
|
||||||
calculateTaxes: BuiltValueNullFieldError.checkNotNull(calculateTaxes, r'CompanyEntity', 'calculateTaxes'),
|
calculateTaxes: BuiltValueNullFieldError.checkNotNull(calculateTaxes, r'CompanyEntity', 'calculateTaxes'),
|
||||||
taxConfig: taxConfig.build(),
|
taxConfig: taxConfig.build(),
|
||||||
|
taxData: taxData.build(),
|
||||||
hasEInvoiceCertificate: BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificate, r'CompanyEntity', 'hasEInvoiceCertificate'),
|
hasEInvoiceCertificate: BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificate, r'CompanyEntity', 'hasEInvoiceCertificate'),
|
||||||
hasEInvoiceCertificatePassphrase: BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificatePassphrase, r'CompanyEntity', 'hasEInvoiceCertificatePassphrase'),
|
hasEInvoiceCertificatePassphrase: BuiltValueNullFieldError.checkNotNull(hasEInvoiceCertificatePassphrase, r'CompanyEntity', 'hasEInvoiceCertificatePassphrase'),
|
||||||
eInvoiceCertificatePassphrase: BuiltValueNullFieldError.checkNotNull(eInvoiceCertificatePassphrase, r'CompanyEntity', 'eInvoiceCertificatePassphrase'),
|
eInvoiceCertificatePassphrase: BuiltValueNullFieldError.checkNotNull(eInvoiceCertificatePassphrase, r'CompanyEntity', 'eInvoiceCertificatePassphrase'),
|
||||||
|
|
@ -3550,6 +3571,8 @@ class CompanyEntityBuilder
|
||||||
|
|
||||||
_$failedField = 'taxConfig';
|
_$failedField = 'taxConfig';
|
||||||
taxConfig.build();
|
taxConfig.build();
|
||||||
|
_$failedField = 'taxData';
|
||||||
|
taxData.build();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new BuiltValueNestedFieldError(
|
throw new BuiltValueNestedFieldError(
|
||||||
r'CompanyEntity', _$failedField, e.toString());
|
r'CompanyEntity', _$failedField, e.toString());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue