1 Reply Latest reply on Apr 10, 2013 1:31 PM by dchabot

    Calculation Not Working Sort of

    dchabot

      Hi,

      I got this great calculation from David Jondreau for use in a Payroll file.

      It calculates taxable wages based on a maximum amount.

      For example: FICA Wages taxable currently max at 113,700.

       

      The calculation works fine until a person gets to the max, then the next paycheck starts deducting a fica tax from

      the YTD. Can anyone see what might be going wrong?

       

      Here's the calc for FICA WAGES TAXABLE:

       

      Let([

       

       

      //Gross Pay YTD is the sum of all pay including this week's. So let's subtract this week's pay and get all pay up until this one.

       

       

      prevPay = Gross Pay YTD - Gross Pay ;

       

       

      //what wiggle room do we have between our old pay and max wages?

       

       

      availablePay = 113700 - prevPay ;

       

       

      //but let's not let that number be less than zero

       

       

      availablePay = Max ( availablePay ; 0 ) ;

       

       

      //which is less, available or actual pay?

       

       

      taxable = Min ( availablePay ; Gross Pay )

       

       

      ];

       

       

      taxable

       

       

      ) //End Let

       

       

      Thanks so much!

       

      Deb Chabot

      FM 11A on MacsML