taxtank-core 2.1.84 → 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.
@@ -12344,8 +12344,20 @@ class HoldingTaxStatement extends AbstractModel {
12344
12344
  plainToClass(HoldingTaxStatementItem, { taxReturnItem: { id: 224, code: '20', subCode: 'O' } }),
12345
12345
  ];
12346
12346
  }
12347
+ get itemsCollection() {
12348
+ return new Collection(this.items);
12349
+ }
12347
12350
  get amount() {
12348
- 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;
12349
12361
  }
12350
12362
  }
12351
12363
  __decorate([