taxtank-core 0.30.111 → 0.30.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ import moment from 'moment';
21
21
  import { DateRange } from 'moment-range';
22
22
  import intersection from 'lodash/intersection';
23
23
  import range from 'lodash/range';
24
- import { Validators, UntypedFormGroup, UntypedFormControl, UntypedFormArray, FormArray, FormGroup, FormControl } from '@angular/forms';
24
+ import { Validators, UntypedFormGroup, UntypedFormControl, UntypedFormArray, FormControl, FormArray, FormGroup } from '@angular/forms';
25
25
  import compact from 'lodash/compact';
26
26
  import concat from 'lodash/concat';
27
27
  import cloneDeep$1 from 'lodash/cloneDeep';
@@ -4656,46 +4656,6 @@ class DepreciationReceipt extends DepreciationReceipt$1 {
4656
4656
  }
4657
4657
  }
4658
4658
 
4659
- class SoleBusinessAllocation extends SoleBusinessAllocation$1 {
4660
- }
4661
- __decorate([
4662
- Type(() => BankAccount)
4663
- ], SoleBusinessAllocation.prototype, "bankAccount", void 0);
4664
- __decorate([
4665
- Type(() => SoleBusiness)
4666
- ], SoleBusinessAllocation.prototype, "business", void 0);
4667
- __decorate([
4668
- Transform(({ value }) => value || 100),
4669
- Expose()
4670
- ], SoleBusinessAllocation.prototype, "percent", void 0);
4671
-
4672
- class SoleBusinessLossOffsetRule extends SoleBusinessLossOffsetRule$1 {
4673
- }
4674
- __decorate([
4675
- Type(() => SoleBusinessLossOffsetRule)
4676
- ], SoleBusinessLossOffsetRule.prototype, "parent", void 0);
4677
-
4678
- /**
4679
- * If a sole trader business makes a tax loss in a current year, you can generally carry forward that loss and offset profit in future years.
4680
- * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4641357930/Rules+when+a+business+makes+a+loss+Tax+Summary#Offsetting-current-year-business-losses
4681
- */
4682
- class SoleBusinessLoss extends SoleBusinessLoss$1 {
4683
- constructor() {
4684
- super(...arguments);
4685
- this.openBalance = 0;
4686
- this.financialYear = new FinancialYear().year;
4687
- }
4688
- get hasOffset() {
4689
- return !!this.offsetRule;
4690
- }
4691
- }
4692
- __decorate([
4693
- Type(() => SoleBusiness)
4694
- ], SoleBusinessLoss.prototype, "business", void 0);
4695
- __decorate([
4696
- Type(() => SoleBusinessLossOffsetRule)
4697
- ], SoleBusinessLoss.prototype, "offsetRule", void 0);
4698
-
4699
4659
  var MyAccountHistoryInitiatedByEnum;
4700
4660
  (function (MyAccountHistoryInitiatedByEnum) {
4701
4661
  MyAccountHistoryInitiatedByEnum[MyAccountHistoryInitiatedByEnum["OWNER"] = 0] = "OWNER";
@@ -4745,6 +4705,46 @@ const USER_ROLES = {
4745
4705
  class UserToRegister {
4746
4706
  }
4747
4707
 
4708
+ class SoleBusinessAllocation extends SoleBusinessAllocation$1 {
4709
+ }
4710
+ __decorate([
4711
+ Type(() => BankAccount)
4712
+ ], SoleBusinessAllocation.prototype, "bankAccount", void 0);
4713
+ __decorate([
4714
+ Type(() => SoleBusiness)
4715
+ ], SoleBusinessAllocation.prototype, "business", void 0);
4716
+ __decorate([
4717
+ Transform(({ value }) => value || 100),
4718
+ Expose()
4719
+ ], SoleBusinessAllocation.prototype, "percent", void 0);
4720
+
4721
+ class SoleBusinessLossOffsetRule extends SoleBusinessLossOffsetRule$1 {
4722
+ }
4723
+ __decorate([
4724
+ Type(() => SoleBusinessLossOffsetRule)
4725
+ ], SoleBusinessLossOffsetRule.prototype, "parent", void 0);
4726
+
4727
+ /**
4728
+ * If a sole trader business makes a tax loss in a current year, you can generally carry forward that loss and offset profit in future years.
4729
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4641357930/Rules+when+a+business+makes+a+loss+Tax+Summary#Offsetting-current-year-business-losses
4730
+ */
4731
+ class SoleBusinessLoss extends SoleBusinessLoss$1 {
4732
+ constructor() {
4733
+ super(...arguments);
4734
+ this.openBalance = 0;
4735
+ this.financialYear = new FinancialYear().year;
4736
+ }
4737
+ get hasOffset() {
4738
+ return !!this.offsetRule;
4739
+ }
4740
+ }
4741
+ __decorate([
4742
+ Type(() => SoleBusiness)
4743
+ ], SoleBusinessLoss.prototype, "business", void 0);
4744
+ __decorate([
4745
+ Type(() => SoleBusinessLossOffsetRule)
4746
+ ], SoleBusinessLoss.prototype, "offsetRule", void 0);
4747
+
4748
4748
  class SoleInvoiceItem extends SoleInvoiceItem$1 {
4749
4749
  constructor() {
4750
4750
  super(...arguments);
@@ -5155,6 +5155,9 @@ __decorate([
5155
5155
  __decorate([
5156
5156
  Type(() => IncomeSource)
5157
5157
  ], SoleBusiness.prototype, "incomeSource", void 0);
5158
+ __decorate([
5159
+ Transform(({ value }) => value || false)
5160
+ ], SoleBusiness.prototype, "isPrimaryProduction", void 0);
5158
5161
 
5159
5162
  class SoleBusinessActivity extends SoleBusinessActivity$1 {
5160
5163
  }
@@ -18466,7 +18469,8 @@ class SoleBusinessForm extends AbstractForm {
18466
18469
  name: new UntypedFormControl(business.name, Validators.required),
18467
18470
  activity: new UntypedFormControl(business.activity, Validators.required),
18468
18471
  description: new UntypedFormControl(business.description),
18469
- website: new UntypedFormControl(business.website)
18472
+ website: new UntypedFormControl(business.website),
18473
+ isPrimaryProduction: new FormControl(business.isPrimaryProduction),
18470
18474
  }, business);
18471
18475
  this.business = business;
18472
18476
  // User have to create income source with new business.