taxtank-core 0.7.0 → 0.7.1

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.
@@ -4743,7 +4743,6 @@
4743
4743
  * gross capital gain tax: sale costs - cost base
4744
4744
  */
4745
4745
  Property.prototype.calculateCGT = function (sale) {
4746
- console.log(sale.price, sale.saleCostsTotalAmount, sale.capitalLoss, this.calculateCostBase(sale));
4747
4746
  return sale.price - sale.saleCostsTotalAmount - sale.capitalLoss - this.calculateCostBase(sale);
4748
4747
  };
4749
4748
  /**
@@ -4786,7 +4785,9 @@
4786
4785
  return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
4787
4786
  // main residence become investment (exemption for home office percent usage)
4788
4787
  case TaxExemptionEnum.PPR_TO_INVESTMENT:
4789
- return metadata.getClaimPercent() / 100;
4788
+ // 1 year CGT discount can still apply (on the income producing % if used for 12 months or more)
4789
+ var ratio = this.getOwnershipDuration(sale, 'years') >= 1 ? 0.5 : 1;
4790
+ return metadata.getClaimPercent() / 100 * ratio;
4790
4791
  // full exemption
4791
4792
  case TaxExemptionEnum.PPR:
4792
4793
  case TaxExemptionEnum.SIX_YEARS_RULE: