Skip to Content
0
Mar 31, 2023 at 05:17 AM

Business rule for calculating value having circular Reference

212 Views

Hi,

I have a requirement for India payroll calculation in EC, where the value of one pay component (Special Allowance) is dependent on another (PF) and vice - versa because which it is causing a circular reference the example for which along with the formula is below.

Example

CTC = 275000

Gross Pay = 216890 (CTC - Performance Incentive)*89.61963%

Basic = 75908 (Gross Pay *35%)

HRA = 37954 (Basic*50%)

Bonus = 25579 Fixed Value

Performance Incentive = 33000 Fixed Value

PF = 21471 (Basic+ Bonus+ Special Allowance) > 180000 then 21600 or else (Basic+ Bonus+ Special Allowance)*12%. In this case it will be the else condition since the total of (Basic+ Bonus+ Special Allowance) is less than 1800000

Gratuity = 3651 (Basic*4.81%)

Special Allowance = 77437 (CTC- Basic - HRA - Bonus - Performance Incentive - PF)

Since the PF value has a dependency on Special Allowance and at the same time the Special Allowance has a dependency on PF it is causing a circular reference.

Looking for a workaround or solution to achieve the same.

Regards

Pradeep