-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathirish_tax.el
More file actions
33 lines (27 loc) · 1.04 KB
/
irish_tax.el
File metadata and controls
33 lines (27 loc) · 1.04 KB
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
(defun ros_round(mon_val)
"Round a value to two decimal places according to ROS rules."
(/ (float (ceiling (* 100 mon_val))) 100)
)
(defun weekly_threshold(week yearly_val)
"Work out weekly thresholds, given the week-number and the yearly threshold"
(* week (ros_round (/ yearly_val 52)))
)
(defun paye(per std cred paytd taxtd paytp)
"Calculate PAYE for a given pay period"
(interactive "nPeriod: \nnStandard Cut Off: \nnTax Credits: \nnPay To Date: \nnTax To Date: \nnGross Pay TP: \n")
(setq w_std (weekly_threshold per std))
(setq w_cred (weekly_threshold per cred))
(setq pay (+ paytd paytp))
(setq pay_lower (min w_std pay))
(setq pay_upper (- (max w_std pay) w_std))
(insert (number-to-string (ros_round (- (- (+ (* pay_lower 0.20) (* pay_upper 0.41)) w_cred) taxtd))))
)
(defun prsi_ee(paytp, prsi_class)
"Calculate Employee(EE) PRSI for a pay period"
)
(defun prsi_er(paytp, prsi_class)
"Calculate Employer(ER) PRSI for a pay period"
)
(defun usc(per paytd usctd paytp)
"Calculate EE PRSI for a pay period"
)