I want to add this condition:- 1000 if B >= 18000 else 500 in Medical Componant.

If i write this whole condition in Formula section then if i calculate salary for employee {Who took Leave Without Pay} then this condition doesn’t work.

So how do i write this in Condition Section??

In medical component, unselect depends on payment days checkbox so that Employees who have taken LWP are not affected.

Did that but even then it shows medical allowance as 1000 even though employee basic amount is less than 18000.

Is your basic based on payment days? Also how is the basic calculated? Via formula or is it a fixed amount?

This is the Formula for Calculating Basic Salary:

((base-1800)* .8) if ((base/1.096) < (base-1800)) else ((base/1.096)* .8)

And Yes Its based on payment days.

and my condition block is empty.

This is earning part:-

This is deduction:–

It works fine if employee doesnt take leaves but when i consider leaves in salary calculation whole structure breaks down.

Also Basic, HRA, Special Allowance, Provident Fund and E Provident Fund all depends on Payment days.

Yes, since Basic depends on Payment Days, basic value will change depending on leaves taken. Now, since medical is dependent on basic, medical value is affected. The only way you can avoid this to uncheck “Depends on Payment Days” for Basic.

Hope this helps!

But how to add condition for PF ? PF will deduct after 1 year from joining date.

You can make an assistant component to relay on it as leave your base to be depends on payment days and make a duplicate component but unmark depends on so you can use it to your formula and check as statistical component