Skip to content

Commit

Permalink
fix: use socialRentYearly in lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-hh-aa committed Jan 21, 2025
1 parent db33a69 commit 98d2c4c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/models/Lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export interface LifetimeData {
depreciatedHouseResaleValueMediumMaintenance: number;
depreciatedHouseResaleValueHighMaintenance: number;
fairholdLandPurchaseResaleValue: number;
socialRentMonthlyLand: number;
socialRentMonthlyHouse: number;
socialRentYearlyLand: number;
socialRentYearlyHouse: number;
houseAge: number;
[key: number]: number;
}
Expand Down Expand Up @@ -111,8 +111,8 @@ export class Lifetime {

/** Resale value increases with `ForecastParameters.constructionPriceGrowthPerYear` */
let fairholdLandPurchaseResaleValueIterative = params.fairholdLandPurchase.discountedLandPrice;
let socialRentMonthlyLandIterative = params.household.tenure.socialRent.socialRentMonthlyLand;
let socialRentMonthlyHouseIterative = params.household.tenure.socialRent.socialRentMonthlyHouse;
let socialRentYearlyLandIterative = params.household.tenure.socialRent.socialRentMonthlyLand * 12;
let socialRentYearlyHouseIterative = params.household.tenure.socialRent.socialRentMonthlyHouse * 12;

/** Initialises as user input house age and increments by one */
let houseAgeIterative = params.property.age;
Expand Down Expand Up @@ -155,8 +155,8 @@ export class Lifetime {
depreciatedHouseResaleValueMediumMaintenance: depreciatedHouseResaleValueMediumMaintenanceIterative,
depreciatedHouseResaleValueHighMaintenance: depreciatedHouseResaleValueHighMaintenanceIterative,
fairholdLandPurchaseResaleValue: fairholdLandPurchaseResaleValueIterative,
socialRentMonthlyHouse: socialRentMonthlyHouseIterative,
socialRentMonthlyLand: socialRentMonthlyLandIterative,
socialRentYearlyHouse: socialRentYearlyHouseIterative,
socialRentYearlyLand: socialRentYearlyLandIterative,
houseAge: houseAgeIterative,
gasBillExistingBuildYearly: gasBillExistingBuildIterative,
gasBillNewBuildOrRetrofitYearly: gasBillNewBuildOrRetrofitIterative
Expand Down Expand Up @@ -252,8 +252,8 @@ export class Lifetime {
}).discountedLandPriceOrRent;

// Increase monthly social rent by the average inflation adjustment (2.83%)
socialRentMonthlyHouseIterative *= 1.0283;
socialRentMonthlyLandIterative *= 1.0283;
socialRentYearlyHouseIterative *= 1.0283;
socialRentYearlyLandIterative *= 1.0283;

lifetime.push({
incomeYearly: incomeYearlyIterative,
Expand All @@ -273,8 +273,8 @@ export class Lifetime {
depreciatedHouseResaleValueMediumMaintenance: depreciatedHouseResaleValueMediumMaintenanceIterative,
depreciatedHouseResaleValueHighMaintenance: depreciatedHouseResaleValueHighMaintenanceIterative,
fairholdLandPurchaseResaleValue: fairholdLandPurchaseResaleValueIterative,
socialRentMonthlyHouse: socialRentMonthlyHouseIterative,
socialRentMonthlyLand: socialRentMonthlyLandIterative,
socialRentYearlyHouse: socialRentYearlyHouseIterative,
socialRentYearlyLand: socialRentYearlyLandIterative,
houseAge: houseAgeIterative,
gasBillExistingBuildYearly: gasBillExistingBuildIterative,
gasBillNewBuildOrRetrofitYearly: gasBillNewBuildOrRetrofitIterative
Expand Down

0 comments on commit 98d2c4c

Please sign in to comment.