!!!BE - 401K Maximum !Requirement For the 401K deduction, employees may only contribute $9,000 or 25% of their annual earnings, which ever is less. !!401K Maximum Amount This UserCalc is step one in determining the maximum 401K deduction for an employee by looking at actual and forecasted earnings. ;Statement Determine the maximum of the 401K deduction each employee, stored in a Statistic (401K Max). ;Set up |[IMVR]|User Variable| |Pays this Year|Numeric |27 |401K Max Prc|Numeric |25 |401K Max Amt|Numeric| 9000 |[IMUC]|Variables| |Pays Remaining|Numeric| 0 |BW |WageNumeric |0 |Total Earnings|Numeric| 0 |Max Perc|Numeric| 0 |[IPPC]|Pay Components | |9014|401K Max Amt|Statistic attached to Stat 401K Max Amt |[IDSC]|Statistic Components| | |401K Max Amt|Replace !UserCalc Product:PR\\ Type:Calculation ||Line||CMD||OT||Operand 1||OPER||OT||Operand2||OT||Operand3||If Goto||Else GoTo |00010|LET|V|PAYS REMAINING|SUB|$C|PAYS THIS YEAR|DB|PPP.PAY_OF_YEAR|00020| |00020|LET|V|BW WAGE|WAGE|WB|BW| | |00030| |00030|LET|V|TOTAL EARNINGS|MLT|V|PAYS REMIANING|V|BW EARNINGS|00040| |00040|LET|V|TOTAL EARNINGS|ADD|V|TOTAL EARNINGS|EC|GROSS PAY| 00050| |00050|LET|V|TOTAL EARNINGS|ADD|V|TOTAL EARNINGS|EY|GROSS PAY| 00100| |00100|LET|V|MAX PERC|MLT|V|TOTAL EARNINGS|$C|401K MAX PRC|00200| |00200|IF|V|MAX PERC|LT|$C|401K MAX AMT| | |00300|00400 |00300|LET|PC|9014|RDN|V|MAX PRC|N|.01|99999| |00400|LET|PC|9014|EQ|$C|401K MAX AMT| | |99999| |99999|EXIT| | | | | | | | | !Completion After publishing this UserCalc, attach it to the Pay Point prior to the 401K Benefit being executed. ---- !!401K Maximum Deduction This UserCalc is step two in determining the maximum 401K deduction for an employee. ;Statement:Determine if the employee deduction for 401K is to be taken fully or if the 401K maximum has been reached. ;Set up |[IMUC] | UserCalc| | |401K Maximum Amount | |[IMUC]| Variables| |Deduction | Numeric| 0 | |Total Deduction Numeric| 0 |Message | Char| |Max Amount | Char| |[IPPC] | Pay Components | |3015 | 401k Deduction | ;UserCalc |Product| BE |Type| Function |Return Value| Number ||Line||CMD||OT||Operand 1||OPER||OT||Operand2||OT||Operand3||If Goto||Else GoTo |00010| LET| V| DEDUCTION| EQ| $P| NUMBER-PARAMETER| | |00020| |00020 |LET| V| TOTAL DEDUCTION |ADD| PY| 3015| V| DEDUCTION| 00030 | |00030| LET| V| MAX AMOUNT| CHAR| PC| 9014| | |00100| |00100| IF| PY| 3015| GE| PC| 9014| | |00110|00200 |00110| LET| V| DEDUCTION| EQ| N| 0| | |00120| |00120| LET|V|MESSAGE|EQ|A|No 401K taken\\EE over max of |V|MAX AMOUNT|09000| |00200| IF| V| TOTAL DEDUCTION |GT| PC| 9014| | |00210| 99999 |00210| LET| V| DEDUCTION| SUB| PC| 9014| PY| 3015| 00220| |00220| LET|V|MESSAGE|EQ|A|EE has reached 401K Max Ded of|V|MAX AMOUNT|00230| |00230| LET|V|MESSAGE|EQ|V|MESSAGE|A|401K Ded. Reduced - PC 3015|09000 | |09000| MSG|V|MESSAGE| | | | | |99999| |99999| RET|V|DEDUCTION| | | | | |99999| ;Completion:After publishing this UserCalc attach it to Benefit Component 1010 - Deduction Method. The Benefits Component does not have to be Rule 00 - UserCalc Only. Users may choose the appropriate rule and then by placing the UserCalc in the UserCalc field it will be executed. ---- ![Notes|Edit:Internal.BE_SAMPLE_USERCALC] [{InsertPage page='Internal.BE_SAMPLE_USERCALC' default='Click to create a new notes page'}]