Hi everyone, I am not a programmer. I am still trying to figure out phyton coding… How can I set the formula in Salary Component like below:

When wages exceed RM800 but not exceed RM900, contribution amount is RM1.70
When wages exceed RM900 but not exceed RM1,000, contribution amount is RM1.90
When wages exceed RM1,000 but not exceed RM1,100, contribution amount is RM2.10
.
.
.
When wages exceed RM4,000, contribution amount is RM7.90

Above mentioned wages is the total of basic salary, overtime pay, allowance, incentive and bonuses.

So you do not need any python coding for this. You can simply add a condition and formula in the salary components itself. Just check the box “Amount based on formula”. Screenshot attached:

Hi, you can fill in your salary components (basic salary, overtime pay, allowance, incentive and bonuses) in the “earning” table and apply formulae as required (make sure the “amount based on formula” checkbox is checked). Since contribution is a deduction, it should be written in the “deduction” table and then write the amount in the “amount” column. You can then type the following “condition” for “when wages exceed RM800 but not exceed RM900, contribution amount is RM1.70” Condition: B>=800 and B<=900
(assuming the contribution is based on the Basic (B) component)
Similarly for other conditions…
Please check the attached screenshots for further clarification.

What if i have 2 type of shift (normal & overtime), and i want to pay my employee based on their total working hour per week/per month.

At current system I set 2 shift type, normal (8-17) and overtime (17-24) and i thought i would use the late entry and late exit to adjust their working hour (if overtime end past 24 or before 24 or something like that).

Problem is i find the working hour on Attendance report is 0 even though i already set the shift type to the employee.

Look at the problem above, i thought i don’t have Base Salary for my employee? Since their salary is paid based on Total working hour. Am i right?

Hello Michele,
I’m getting this error when using the formula (adapted) as you posted: Syntax error in formula or condition: unexpected EOF while parsing (, line 1)
Does the system changed the way to implement this since you posted?
Thanks in advance.

why Amount showing 0.00 and also I’ve used the same formula but when I generate salary slip…it is still not updating to original amount. any suggestions?

somewhere formula or conditions are not working.
Faced the same issue:
The base salary was fixed for some and formula-based for others
Had to create 2 components

One amount in the component was 0, while I added amounts 12,000 or 15,000 depending for the employee while creating a salary structure for the employee designation

In Amount based on formula GS*.6 (60% of gross salary- GS component was a statistical component)