Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Andrew:
- document.getElementById("TotalIncome").value;
- var WeeklyIncome = TotalIncome / 52;
- var TaxableWeeklyIncome = WeeklyIncome - 183;
- var WeeklyNI = TaxableWeeklyIncome * 0.12;
- if (TotalIncome < 8632) WeeklyNI = 0;
- var NetIncome = 12500 + (TotalIncome - 12500) * 0.8 - WeeklyNI * 52;
- var RoundedNetIncome = NetIncome.toFixed(2);
- Me:
- document.getElementById("TotalIncome").value;
- var TaxableIncome = TotalIncome > 12500 ? TotalIncome - 12500 : 0;
- var NIIncome = TotalIncome > 9500 ? TotalIncome - 9500 : 0;
- var NetIncome = TotalIncome - (TaxableI come * 0.2) - (NIIncome * 0.12);
- var RoundedNetIncome = NetIncome.toFixed(2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement