HRMS Pension

It is about ordinary death benefit calculation (ODB). I have a problem on my sqr. It is calculated using the formula
x=a+(b(n-12)/12)
a= salary till last month of work from beginning of final year.
b=yearly salary of prior year
n=number of months worked in final year.
x=final yearly salary

If an employee died on May 02, 2012 then a= salary from january to may 02 of 2012.
b=annual salary of 2011
n=5 because he worked till may
x=yearly salary of 2012. which cannot be greater than 110% of average of previous two years salary. i.e (salary of 2010+salary of 2011)*110%

ODB= x.c+z
where z=contribution+interest. contribution is 3% of x and interest is 5% of contribution.
c= number of years and maximum is 3 years. IF the employee is more than 60 then ODM will be decrease by 4% till the age 70.
In my sqr the ODB is not calculated correctly. THe final year salary is wrong, can you guys figure out the problem? thank you!

! Formerly, this INSERT populated PA_CONS_ARRAY.ERN_PRD_AMT with adjusted amount #ar_wrk_amt_adj
! (the same value used to populate PA_CONS_ARRAY.ERN_ADJ_AMT). Now, this occurance of #ar_wrk_amt_adj
! has been commented out and replaced with the actual earned amount #ar_ern_prd_amt.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.