taxtank-core 2.1.83 → 2.1.85

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.
@@ -12316,90 +12316,48 @@ class Holding extends AbstractModel {
12316
12316
  }
12317
12317
  }
12318
12318
 
12319
- class HoldingTaxStatementItem {
12319
+ class HoldingTaxStatementItem extends AbstractModel {
12320
12320
  constructor() {
12321
+ super(...arguments);
12321
12322
  this.amount = 0;
12322
12323
  }
12323
12324
  }
12324
12325
 
12325
- class TaxReturnCategory extends TaxReturnCategory$1 {
12326
- }
12327
- __decorate([
12328
- Type(() => Date)
12329
- ], TaxReturnCategory.prototype, "createdAt", void 0);
12330
- __decorate([
12331
- Type(() => Date)
12332
- ], TaxReturnCategory.prototype, "updatedAt", void 0);
12333
- __decorate([
12334
- Type(() => TaxReturnItem)
12335
- ], TaxReturnCategory.prototype, "taxReturnItems", void 0);
12336
- __decorate([
12337
- Type(() => TaxReturnCategory)
12338
- ], TaxReturnCategory.prototype, "parent", void 0);
12339
-
12340
- class TaxReturnItem extends TaxReturnItem$1 {
12341
- // used for business schedule report, the order is important
12342
- static { this.BUSINESS_SCHEDULE_LIST = [
12343
- TaxReturnItemEnum.NO_ABN_GIVEN,
12344
- TaxReturnItemEnum.VOLUNTARY_AGREEMENT,
12345
- TaxReturnItemEnum.LABOUR_HIRE_OR_OTHER,
12346
- TaxReturnItemEnum.OTHER_BUSINESS_INCOME,
12347
- TaxReturnItemEnum.ASSESSABLE_GOVERNMENT_PAYMENTS,
12348
- TaxReturnItemEnum.PURCHASES_AND_OTHER_COSTS,
12349
- TaxReturnItemEnum.COMMISSION_EXPENSES,
12350
- TaxReturnItemEnum.SUPERANNUATION_EXPENSES,
12351
- TaxReturnItemEnum.BAD_DEBTS,
12352
- TaxReturnItemEnum.LEASE_EXPENSES,
12353
- TaxReturnItemEnum.RENT_EXPENSES,
12354
- TaxReturnItemEnum.INTEREST_EXPENSES_WITHIN_AUSTRALIA,
12355
- TaxReturnItemEnum.INTEREST_EXPENSES_OVERSEAS,
12356
- TaxReturnItemEnum.DEPRECIATION_EXPENSES,
12357
- TaxReturnItemEnum.MOTOR_VEHICLE_EXPENSES,
12358
- TaxReturnItemEnum.ALL_OTHER_EXPENSES
12359
- ]; }
12360
- }
12361
- __decorate([
12362
- Type(() => Date)
12363
- ], TaxReturnItem.prototype, "createdAt", void 0);
12364
- __decorate([
12365
- Type(() => Date)
12366
- ], TaxReturnItem.prototype, "updatedAt", void 0);
12367
- __decorate([
12368
- Type(() => TaxReturnCategory)
12369
- ], TaxReturnItem.prototype, "taxReturnCategory", void 0);
12370
- __decorate([
12371
- Type(() => TaxReturn)
12372
- ], TaxReturnItem.prototype, "taxReturns", void 0);
12373
-
12374
- class TaxReturn extends TaxReturn$1 {
12375
- }
12376
- __decorate([
12377
- Type(() => TaxReturnItem)
12378
- ], TaxReturn.prototype, "taxReturnItems", void 0);
12379
-
12380
12326
  class HoldingTaxStatement extends AbstractModel {
12381
12327
  constructor() {
12382
12328
  super(...arguments);
12383
12329
  this.items = [
12384
12330
  // Trust Income (Item 13)
12385
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 155, code: '13', subCode: 'U' }), label: 'Share of net income from trusts' }),
12386
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 157, code: '13', subCode: 'Y' }), label: 'Other deductions relating to non-primary production income' }),
12387
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 200, code: '13', subCode: 'C' }), label: 'Franked distributions from trusts' }),
12388
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 210, code: '13', subCode: 'Q' }), label: 'Share of franking credits from franked dividends' }),
12389
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 211, code: '13', subCode: 'R' }), label: 'TFN withholding credit' }),
12390
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 212, code: '13', subCode: 'S' }), label: 'Credit for tax paid by trustee' }),
12331
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 155, code: '13', subCode: 'U' } }),
12332
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 157, code: '13', subCode: 'Y' } }),
12333
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 200, code: '13', subCode: 'C' } }),
12334
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 210, code: '13', subCode: 'Q' } }),
12335
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 211, code: '13', subCode: 'R' } }),
12336
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 212, code: '13', subCode: 'S' } }),
12391
12337
  // Capital Gains (Item 18)
12392
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 18, code: '18', subCode: 'A' }), label: 'Net capital gain' }),
12393
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 18, code: '18', subCode: 'H' }), label: 'Total current year capital gains' }),
12338
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 235, code: '18', subCode: 'A' } }),
12339
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 236, code: '18', subCode: 'H' } }),
12394
12340
  // Foreign Income (Item 20)
12395
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 234, code: '20', subCode: 'E' }), label: 'Assessable foreign source income' }),
12396
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 226, code: '20', subCode: 'F' }), label: 'Australian franking credits from a NZ company' }),
12397
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 223, code: '20', subCode: 'M' }), label: 'Other net foreign source income' }),
12398
- plainToClass(HoldingTaxStatementItem, { taxReturnItem: plainToClass(TaxReturnItem, { id: 224, code: '20', subCode: 'O' }), label: 'Foreign income tax offset' }),
12341
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 234, code: '20', subCode: 'E' } }),
12342
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 226, code: '20', subCode: 'F' } }),
12343
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 223, code: '20', subCode: 'M' } }),
12344
+ plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 224, code: '20', subCode: 'O' } }),
12399
12345
  ];
12400
12346
  }
12347
+ get itemsCollection() {
12348
+ return new Collection(this.items);
12349
+ }
12401
12350
  get amount() {
12402
- return new Collection(this.items).sumBy('amount');
12351
+ return this.itemsCollection.sumBy('amount');
12352
+ }
12353
+ get cgt() {
12354
+ return this.itemsCollection.filterBy('taxReturnItem.id', 236).sumBy('amount');
12355
+ }
12356
+ get netCgt() {
12357
+ return new Collection(this.items).filterBy('taxReturnItem.id', 235).sumBy('amount');
12358
+ }
12359
+ get cgtDiscount() {
12360
+ return this.cgt - this.netCgt;
12403
12361
  }
12404
12362
  }
12405
12363
  __decorate([
@@ -12411,6 +12369,9 @@ __decorate([
12411
12369
  __decorate([
12412
12370
  Type(() => AppFile)
12413
12371
  ], HoldingTaxStatement.prototype, "file", void 0);
12372
+ __decorate([
12373
+ Type(() => HoldingTaxStatementItem)
12374
+ ], HoldingTaxStatement.prototype, "items", void 0);
12414
12375
 
12415
12376
  var SharesightDetailsMessagesEnum;
12416
12377
  (function (SharesightDetailsMessagesEnum) {
@@ -12758,6 +12719,61 @@ __decorate([
12758
12719
  Type(() => AppFile)
12759
12720
  ], FinancialGoal.prototype, "file", void 0);
12760
12721
 
12722
+ class TaxReturnCategory extends TaxReturnCategory$1 {
12723
+ }
12724
+ __decorate([
12725
+ Type(() => Date)
12726
+ ], TaxReturnCategory.prototype, "createdAt", void 0);
12727
+ __decorate([
12728
+ Type(() => Date)
12729
+ ], TaxReturnCategory.prototype, "updatedAt", void 0);
12730
+ __decorate([
12731
+ Type(() => TaxReturnItem)
12732
+ ], TaxReturnCategory.prototype, "taxReturnItems", void 0);
12733
+ __decorate([
12734
+ Type(() => TaxReturnCategory)
12735
+ ], TaxReturnCategory.prototype, "parent", void 0);
12736
+
12737
+ class TaxReturnItem extends TaxReturnItem$1 {
12738
+ // used for business schedule report, the order is important
12739
+ static { this.BUSINESS_SCHEDULE_LIST = [
12740
+ TaxReturnItemEnum.NO_ABN_GIVEN,
12741
+ TaxReturnItemEnum.VOLUNTARY_AGREEMENT,
12742
+ TaxReturnItemEnum.LABOUR_HIRE_OR_OTHER,
12743
+ TaxReturnItemEnum.OTHER_BUSINESS_INCOME,
12744
+ TaxReturnItemEnum.ASSESSABLE_GOVERNMENT_PAYMENTS,
12745
+ TaxReturnItemEnum.PURCHASES_AND_OTHER_COSTS,
12746
+ TaxReturnItemEnum.COMMISSION_EXPENSES,
12747
+ TaxReturnItemEnum.SUPERANNUATION_EXPENSES,
12748
+ TaxReturnItemEnum.BAD_DEBTS,
12749
+ TaxReturnItemEnum.LEASE_EXPENSES,
12750
+ TaxReturnItemEnum.RENT_EXPENSES,
12751
+ TaxReturnItemEnum.INTEREST_EXPENSES_WITHIN_AUSTRALIA,
12752
+ TaxReturnItemEnum.INTEREST_EXPENSES_OVERSEAS,
12753
+ TaxReturnItemEnum.DEPRECIATION_EXPENSES,
12754
+ TaxReturnItemEnum.MOTOR_VEHICLE_EXPENSES,
12755
+ TaxReturnItemEnum.ALL_OTHER_EXPENSES
12756
+ ]; }
12757
+ }
12758
+ __decorate([
12759
+ Type(() => Date)
12760
+ ], TaxReturnItem.prototype, "createdAt", void 0);
12761
+ __decorate([
12762
+ Type(() => Date)
12763
+ ], TaxReturnItem.prototype, "updatedAt", void 0);
12764
+ __decorate([
12765
+ Type(() => TaxReturnCategory)
12766
+ ], TaxReturnItem.prototype, "taxReturnCategory", void 0);
12767
+ __decorate([
12768
+ Type(() => TaxReturn)
12769
+ ], TaxReturnItem.prototype, "taxReturns", void 0);
12770
+
12771
+ class TaxReturn extends TaxReturn$1 {
12772
+ }
12773
+ __decorate([
12774
+ Type(() => TaxReturnItem)
12775
+ ], TaxReturn.prototype, "taxReturnItems", void 0);
12776
+
12761
12777
  class HomeOfficeClaim extends ObservableModel {
12762
12778
  constructor() {
12763
12779
  super(...arguments);