taxtank-core 0.17.3 → 0.17.6

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.
@@ -2721,6 +2721,14 @@
2721
2721
  };
2722
2722
  return TransactionBase;
2723
2723
  }(AbstractModel));
2724
+ __decorate([
2725
+ classTransformer.Exclude({ toPlainOnly: true }),
2726
+ classTransformer.Type(function () { return Object; }),
2727
+ classTransformer.Transform(function (_b) {
2728
+ var obj = _b.obj;
2729
+ return obj.file;
2730
+ })
2731
+ ], TransactionBase.prototype, "file", void 0);
2724
2732
 
2725
2733
  var Depreciation$1 = /** @class */ (function (_super) {
2726
2734
  __extends(Depreciation, _super);
@@ -4282,7 +4290,7 @@
4282
4290
  * net capital gain tax (includes tax exemptions)
4283
4291
  */
4284
4292
  Property.prototype.calculateNetCGT = function (sale) {
4285
- return this.getCGTExemptionRatio(sale) * sale.cgt;
4293
+ return this.getCGTExemptionRatio(sale) * sale.grossCGT;
4286
4294
  };
4287
4295
  /**
4288
4296
  * guess tax exemption based on property details
@@ -4333,7 +4341,7 @@
4333
4341
  }
4334
4342
  };
4335
4343
  Property.prototype.isOneYearExemptionApplicable = function (sale) {
4336
- return sale.cgt > 0 && this.getOwnershipDuration(sale, 'years') > 0;
4344
+ return sale.grossCGT > 0 && this.getOwnershipDuration(sale, 'years') > 0;
4337
4345
  };
4338
4346
  /**
4339
4347
  * ownership duration from purchase till sale
@@ -5033,14 +5041,6 @@
5033
5041
  __decorate([
5034
5042
  classTransformer.Type(function () { return TransactionAllocation; })
5035
5043
  ], Transaction.prototype, "allocations", void 0);
5036
- __decorate([
5037
- classTransformer.Exclude({ toPlainOnly: true }),
5038
- classTransformer.Type(function () { return Country; }),
5039
- classTransformer.Transform(function (_b) {
5040
- var obj = _b.obj;
5041
- return obj.file;
5042
- })
5043
- ], Transaction.prototype, "file", void 0);
5044
5044
 
5045
5045
  var BankTransaction = /** @class */ (function (_super) {
5046
5046
  __extends(BankTransaction, _super);