PIRAMIDADO Earning Calculation
After the system determines that a gross-up is required, it starts the calculation by treating the PIRAMIDADOS accumulator as if it is the lower value that PIRAMIDADO + EXC PIRAMID can take, and the 160 percent PIRAMIDADOS accumulator as the upper value that earnings PIRAMIDADO + EXC PIRAMID can take.
The system processes the limits that are being changed to ensure that they enclose the target value for the EXC PIRAMID earnings element. It validates the upper amount, deducting taxes, to get a new net amount—the upper net—and verifies that the target net is between the lower net and upper net. The same validation is made if the lower limit is the one that is changing.
If the validation returns a value of false, the system is searching in the wrong range, and the lower and upper limit values must be redefined.
EXC PIRAMID takes its value during each iteration of the formula:
((Lower Limit) + (Upper Limit)) / 2 − PIRAMIDADOS
Because of the tax deduction, the actual net doesn't match the target net. Using the difference between actual and target net in a formula, the system calculates a new upper or lower limit, deducts the taxes from it, and arrives at a new actual net, which it compares to the target net. The iterations—or loops—continue, with the actual net coming closer to the target net with each loop, until the actual and target net are the same.