Former Member

### complex conditioning

Dear All

I am challenged by this daunting task. I need to create a PCR to calculate this complex logic

If employee age < 18

then

if he earns >= 0.10 and <= 166.26

he pays 6.62

if he earns >166.26

he pays 10% of his basic salary

end if

How do you go about all this?

Regards

Paul

10|10000 characters needed characters exceeded

• Former Member
Oct 31, 2015 at 06:36 AM

A couple of queries:

1) Which wage type do you want to access to check what he earns? In the below PCR, have assumed this to be monthly gross /101.
You can change this accordingly.

2) Which wage type should be updated with the calculated deduction? You can create a new wage type for this if not already done.

Try the below PCR, we can change it based on your answer to the above queries:

*

/101

CPAGE 18M     (To compare the age of the employee with 18)

*

<

AMT?0.1

*

AMT?166.26

*

AMT=6.62

>

AMT=E 1000 (assuming 1000 is your wage type for basic)

AMT%10

<

You can call this PCR using PIT <pcr><blank> NOAB

Call it in the appropriate place in the schema

10|10000 characters needed characters exceeded
• Former Member Former Member