-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFHBAS.ts
93 lines (87 loc) · 2.18 KB
/
FHBAS.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import type { EligibilityResult } from "../calculators/loan";
import type { FormResponse, State } from "../defaults";
export const dutyConcessionConfig: Record<State, any> = {
NSW: {
// https://www.revenue.nsw.gov.au/grants-schemes/first-home-buyer/assistance-scheme
"new-property": {
max: 1_000_000,
concessional: 800_000,
text: "new or off-the-plan homes",
},
existing: {
max: 1_000_000,
concessional: 800_000,
text: "existing homes",
},
"vacant-land": {
max: 450_000,
concessional: 350_000,
text: "vacant land",
},
},
VIC: {
"new-property": {
max: 750_000,
concessional: 600_000,
text: "new or off-the-plan homes",
},
existing: {
max: 750_000,
concessional: 600_000,
text: "existing homes",
},
"vacant-land": {
max: 750_000,
concessional: 600_000,
text: "vacant land",
},
},
QLD: {
existing: {
max: 550_000,
concessional: 505_000,
text: "existing homes",
},
"vacant-land": {
max: 400_000,
concessional: 250_000,
text: "vacant land",
},
},
ACT: {},
NT: {},
SA: {},
WA: {},
};
export function qualifiesForDutyConcession(
purchasePrice: number,
{ propertyType, state }: FormResponse
): EligibilityResult {
const result: EligibilityResult = {
scheme: "FHBAS",
reason: "",
eligible: false,
};
if (!dutyConcessionConfig[state][propertyType]) {
return {
...result,
reason: `Not available for ${propertyType.replace("-", " ")} purchases in ${state}`,
};
}
if (purchasePrice >= dutyConcessionConfig[state][propertyType].max) {
return {
...result,
eligible: false,
reason: `Purchase price can not exceed $${dutyConcessionConfig[state][propertyType].max.toLocaleString()} for ${
dutyConcessionConfig[state][propertyType].text
}`,
};
}
if (
purchasePrice >= dutyConcessionConfig[state][propertyType].concessional &&
purchasePrice < dutyConcessionConfig[state][propertyType].max
) {
return { ...result, eligible: true, type: "concessional" };
}
return { ...result, eligible: true, type: "full" };
}