where Income Tax = [base * Applicable Rate]. Note is that the Tax Rate is cummulative i.e. if one earns 35,000 they will pay the rate on the amount at each band.
I had the question the other day and the only thing that came to my mind was having the same amount of Salary Component as the Tax Rate you have. For example: Tax Rate - 15 Tax Rate - 20
And so on.
Then, in the Salary Structure, you will set the formula for every component. Validating that the gross amount is in the range that you’re working with.
Ex. in the condition field you will have something like this for the first one (15%): base > 10000 && base < 20000
And in the formula you will calculate the value: base * .15
Have in mind that not every component that is in the Salary Structure will appear in the Salary Slip. Will appear those which the condition is met. So, you don’t have to worry about having Tax Rate - 15, Tax Rate - 20, Tax Rate - 25, etc. with empty values.
If you don’t like that approach, then the last solution will be setting up a python script and connect it using the hooks. This is more a developer approach!
I’ve had some success with your suggestion, yefritavarez, thanks alot.
I created Tax Band 1, Band 2, Band 3 and so on to do the evaluation. However if you have about 15 bands to deal with and each requiring two rules (only a single formula can be applied per rule so you must evaluate twice for true and false - which is very tedious by the way), you end up having about 15 Salary Components on the payslip.
Isn’t there an elegant way of aggregating the bands into one e.g. Total Taxes = X given that Total Taxes will be calculated using the Tax Bands above?
Unfortunately you will have to do in separate rows for now since against each condition there can be one formula. You can raise a github issue though, we will take it up as and when possible.
@Chude_Osiegbu insteading of breaking it down into slabs,if we use a formula like this PAYE =IF(CI<=0=1%G,IF(CI<=300000=CI7%,IF(CI<=600000= 21000+11%(CI-300000),IF(CI<=1100000=54000+15%(CI-600000),IF(CI<=1600000=129000+19%(CI-1100000),IF(CI<=3200000=224000+21%(CI-1600000),IF(CI>3200000=560000+24%*(CI-3200000)))))))) which work well in excel but refuse to work in the salary structure because of syntax (,) i think it will be better.Since this is your intiatiave kindly make any formula that excel accepts to be acceptable in the salary structure formula or condition.Appreciate your quick action