-
Notifications
You must be signed in to change notification settings - Fork 0
/
stamp_duty.ts
32 lines (27 loc) · 1 KB
/
stamp_duty.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
/* Copyright(c) 2014-2023 Phil Mulholland (www.shincbm.com)
SPDX-License-Identifier: MIT
Housing Cost Model
*/
import { Params } from "./param";
import { Expense } from "./expense";
export class StampDuty extends Expense {
static SA_STAMP_BASE = 11330; //
static SA_STAMP_VAR = 5; // pct
static SA_STAMP_VAR_OFFSET = 300000; // $
constructor(params: Params) {
super("Stamp Duty",
"The one off tax that needs to be paid when the property is purchased.");
let amount = 0;
switch (params.config.state) {
case "SA" :
if (params.property.value <= StampDuty.SA_STAMP_VAR_OFFSET)
amount = StampDuty.SA_STAMP_BASE;
else
amount = StampDuty.SA_STAMP_BASE
+ ((params.property.value
- StampDuty.SA_STAMP_VAR_OFFSET)
* StampDuty.SA_STAMP_VAR)/100;
this.update_upfront(amount);
}
}
}