taxtank-core 2.1.103 → 2.1.105

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.
@@ -6736,8 +6736,11 @@ class Property extends Property$1 {
6736
6736
  get corelogicNextDate() {
6737
6737
  return this.corelogicLastRequest ? new Date(this.corelogicLastRequest.getTime() + Property.corelogicCooldown) : new Date();
6738
6738
  }
6739
+ isForeign() {
6740
+ return !this.address.country.isAustralia();
6741
+ }
6739
6742
  isCorelogicAvailable() {
6740
- return this.address.country.isAustralia() && (this.corelogicLastRequest < new Date(Date.now() - Property.corelogicCooldown));
6743
+ return !this.isForeign() && (this.corelogicLastRequest < new Date(Date.now() - Property.corelogicCooldown));
6741
6744
  }
6742
6745
  getGrowth() {
6743
6746
  return this.valuation.marketValue - this.purchasePrice;
@@ -28254,9 +28257,7 @@ class PropertyEditForm extends AbstractForm {
28254
28257
 
28255
28258
  class PropertyValuationForm extends AbstractForm {
28256
28259
  constructor(valuation = plainToClass(PropertyValuation, {}), property) {
28257
- // @TODO Vladimir test and fix
28258
- // const marketValue = valuation.id ? valuation.marketValue ?? property?.marketValue : 0;
28259
- const marketValue = valuation.marketValue ?? property?.marketValue;
28260
+ const marketValue = property?.isForeign() && !valuation.id ? 0 : valuation.marketValue ?? property?.marketValue;
28260
28261
  super({
28261
28262
  // corelogic available only for new valuations if request cooldown has passed
28262
28263
  isCorelogic: new FormControl(property?.isCorelogicAvailable() && !valuation.id),