AX2009_ENUS_PR_07

Page 1

Chapter 7: Payroll Calculations

CHAPTER 7: PAYROLL CALCULATIONS Objectives The objectives are: •

Introduce concepts, process, and procedures for creating and editing calculations by using the Calculation form.

Introduce Payroll module calculation operands, and understand how to add them to a calculation string.

Introduce Payroll module calculation operators, and the procedure to add them to a calculation.

Introduce rounding in Payroll module calculations.

Introduce date differences and a procedure for their use.

Introduce calculation rates, when to incorporate them into calculations, and a procedure to add them.

Introduce calculation conditions and a procedure to add then to a calculation.

Introduce methods and procedures for validating, testing, and verifying calculations.

Introduce calculation variables and a procedure for setting them up

Introduce calculation rate and calculation rate items, and procedures for setting them up.

Provide a sample calculation.

Introduction This course explains the concepts and methods for defining calculations in the Payroll system. Remember from course 6, "Important Setup Concepts", that Payroll implementers and administrators create and use calculations that determine the value of: •

Earnings

Benefit/deductions

Calculated entitlement accruals

Data-based fields in statutory reports

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-1


Microsoft Dynamics® AX Payroll The Payroll module uses its own syntax to define calculations. This syntax is similar to those used in many other systems, such as Microsoft Excel. To define a Payroll calculation, you will use this syntax to express a formula in a calculation string.

FIGURE 7.1 A CALCULATION STRING WITH SYNTAX FOR A ROUNDING OPERATION.

The Calculation Form Use the Calculation form to create, define, and edit the calculations used in the Payroll module. You can use the Overview, General, and Rule tabs to do the following: •

Create or edit the name, type, and effective dates for the calculation

Define the calculation rule

In the form, the Overview tab provides access to the list of existing calculations. This is the where you can either select a calculation to edit or start creating a new calculation.

FIGURE 7.2 CALCULATIONS FORM (OVERVIEW TAB).

7-2

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

On the General tab, you can: •

Identify the calculation with a name (or code) and description.

Specify whether the calculation should be used as either: o o

a final calculation, to be listed as an available calculation in the Rule group calculation and Generated earnings forms; or an intermediate calculation, whose results are contributed for use in a final calculation

Specify effective dates for the calculation.

FIGURE 7.3 CALCULATION FORM (GENERAL TAB)

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-3


Microsoft Dynamics速 AX Payroll Use the Rule tab to define the calculation rule; which you can do by using Payroll module syntax to create a formula in the Calculation string field.

FIGURE 7.4 CALCULATION FORM (RULE TAB)

Create/Edit the Calculation The Calculation form provides access to the list of calculations in Payroll. In this list you can either edit existing calculations or create new calculations. NOTE: Pre-defined calculations for taxes are available for some statutory jurisdictions. If these calculations are available, implementers import them during setup. These calculations have version numbers, and cannot be edited. Follow these steps to create a new calculation. 1. In the Payroll area page, expand Calculations in the Setup area, then click Calculations. 2. Press CTRL+N and enter the calculation name, a short code, and description. If you will be creating many calculations, you may decide to establish naming conventions that distinguish intermediate calculations from final calculations. You may also want to start all calculation names with a common code prefix, to identify them all as calculations. 3. If this is a final calculation (in other words, if you want it to be listed as an available calculation in the Rule group calculation and Generated earnings forms), then select Yes in the Display in list field. Select No if this calculation is an intermediate calculation, which contributes its results for use in a final calculation.

7-4

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations 4. To define the calculation rule (in other words, to create the formula you must have in the calculation string), click the Rule tab and then click the Edit button. The Calculation setup form opens, where you can create the required formula in the Calculation string (see instructions below).

FIGURE 7.5 CALCULATION SETUP FORM.

Follow these steps to view and edit an existing calculation rule. 1. In the Payroll area page, expand Calculations in the Setup area, then click Calculations. 2. Select a calculation in the Overview tab, then click the Rule tab. To edit the calculation rule, click the Edit button. The Calculation setup form opens, where you can edit the formula in the Calculation string (see instructions below). If the calculation has a version number, it is not editable and the Edit button is inactive.

Defining the Calculation String Use the Calculation setup form to use Payroll module syntax to define the formula for a calculation. Write the formula in the Calculation string field. You can also use the Calculation form to select a calculation rate, if applicable (calculation rates are defined later in this course).

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-5


Microsoft Dynamics® AX Payroll

Follow this general process to create a formula for your calculation. 1. Create the formula (see procedure below). 2. Validate the formula by using the Validate button (this will confirm whether your calculation string is syntactically valid - see procedure provided later in this course). 3. Test the formula by using the Test button (you will supply sample inputs to verify that your formula produces the output you expect see procedure provided later in this course). 4. Save the formula by using the Save button (saves your calculation string and calculation rate). 5. Close the form by using the Close button (closing the form does not save your changes). Follow these steps to create a formula in the Calculation string. 1. Select the default "0.00" in the Calculation string field and delete it. 2. If you know the syntax to use for the formula you must have, type it directly into the Calculation string field. 3. If you are uncertain of the syntax you need, then use the Operands, Operators, Rounding, and Date difference controls to add calculation components to the calculation string (see the following procedures for using each of these controls).

Calculation Operands Remember from course 6, "Important Setup Concepts", that a calculation can incorporate these elements: •

flat amounts

accumulators

employee attributes

calculation variables

other calculations

In the Calculation setup form, each of these elements corresponds to an Operand, to which you can add one operand at a time to the right side of the Calculation string field. The general procedure is to enter or select an operand, and then to click the Add operand button. See below for detailed descriptions of each operand.

7-6

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Flat Amounts Operand A flat amount is a fixed numeric value. A calculation itself can be defined as a flat amount, so that the formula that is written in the Calculation string is a single, fixed numeric value. For example, you could define "16.75" in the calculation string as the flat amount deducted from single employees for their dental plan contribution. A calculation can also include flat amounts as components of the formula defined in its Calculation string. For example, the calculation string might include the expression "Net income * 0.02", where Net income is being multiplied by a flat amount of 0.02. Use this procedure to add a flat amount to a calculation string: Either: •

Click in the Calculation string field and type the amount directly; or

Enter the amount in the Flat amount field, then click the Add operand button to add the amount to the right side of the calculation string.

Employee Attributes Operand Employee attributes are values obtained from fields in other Payroll module forms: •

Age is the employee's age at the end of the current calendar year.

Annual salary is the employee's annual wage for the position. If the employee's wage rate is something other than an annual salary, the system will calculate the annual salary. For example, for hourly employees, the system multiplies the Annual hours field for that employee's position by the hourly rate to determine an annual wage.

Hourly rate is the hourly wage for the employee position. If the employee's wage rate is something other than hourly, the system will calculate an hourly rate. For example, for employees with an annual salary, the system divides the annual salary by the Annual hours field for that employee's position to determine an hourly rate.

Number of pay periods is the number of pay periods in the year for the employee's position's pay group. You can define the pay periods for a year in the Date period dates form.

Use this procedure to add an employee attribute to a calculation string.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-7


Microsoft Dynamics® AX Payroll Either: •

Click in the Calculation string field and type the attribute there directly; or

Select the attribute in the Employee attributes field and then click Add operand. This adds the attribute to the right side of the calculation string.

Calculation Variables Operand Remember from course 6, "Important Setup Concepts", that calculation variables are employee-specific values that you define. For example, a calculation variable could store the amount that an employee receives for a car allowance. Employees who receive a car allowance have this calculation variable, and employees who are ineligible to receive the car allowance do not have this calculation variable. When a calculation that includes a calculation variable applies to an employee who does not have this calculation variable, the calculation continues, but uses a value of zero for that calculation variable. To add a calculation variable to the right side of a calculation string, select the calculation variable in the Calculation variables field and then click the Add operand button. Procedures for defining calculation variables appear later in this course.

Accumulators Operand Remember from course 6, "Important Setup Concepts", that for a date period you specify, an accumulator can collect earnings, earning hours, or benefit/deduction contributions for employees, positions, pay groups, or companies. For example, an accumulator could collect the gross pay that an employee receives in a pay period, and another could keep a running total of garnishment amounts withheld. The garnishment accumulator is created for employees, but only for employees for whom garnishments are withheld. If a calculation that includes the garnishment accumulator applies to an employee for whom no garnishment is withheld (and therefore does not have this accumulator), then the calculation continues, but uses a value of zero for the garnishment accumulator. To add an accumulator to the right side of a calculation string, select the accumulator in the Accumulators field and then click the Add operand button.

7-8

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Calculations Operand Calculations can refer to other calculations, so that the result of one (the intermediate calculation) is used as a value in the formula for the other (the final calculation). You might do this to: •

Perform a calculation on the result of looking up a value from a calculation rate.

Separate a component of a calculation to be used by multiple calculations.

Break up a very large calculation to make it more readable.

To add a calculation to the right side of a calculation string, select the calculation in the Calculation field and then click the Add operand button.

Calculation Operators Payroll supports standard mathematical operators: Operator

Purpose

+

Addition

-

Subtraction

/

Division

*

Multiplication

^

Exponents. For example, 5 ^ 2 means 5 to the power of 2, which is 25.

()

Bracketing sections of calculations. For example, to distinguish 6 + 4 / 2, which equals 8, from (6 + 4) / 2, which equals 5. Bracketing is also part of the syntax for operations such as Min, Max, Rounding, and Date differences.

Min

Selects the lesser of two values. The syntax is MIN(FirstValue, SecondValue) where "FirstValue" and "SecondValue" could be any operand or combination of operands and operators, including rounding and date differences. For example, if an employer matches an employee retirement plan contribution, up to $100, the calculation would be MIN(100, Employee Retirement Plan contribution).

Max

Selects the greater of two values. The syntax is MAX(FirstValue, SecondValue).

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-9


Microsoft Dynamics速 AX Payroll Follow these steps to add an operator to a calculation string. Either click in the Calculation string field and type the character there directly, or to add the operator to the right side of the calculation string: 1. Click the operator button that corresponds to the operator you need (in the Operators section of the Calculation setup form). If you clicked the Min or Max button, then "Min(" or "Max(" are added to the calculation string. 2. Add the first value, then click the , button. 3. Add the second value, and then click the ) button.

Rounding Payroll calculations support several rounding options. Rounding direction

Results for 2.4 being rounded to a whole number

Results for 2.6 being rounded to a whole number

Up

3

3

Down

2

2

Nearest

2

3

The rounding parameter is an amount that the result must be evenly divisible by. Rounding parameter

Results for rounding 3.4444 to the nearest number

1

3

0.01

3.44

0.05

3.45

0.25

3.50

10

0

The syntax for rounding is ROUND(RoundingDirection, RoundingParameter, ValueToRound) where "ValueToRound" could be any operand or combination of operands and operators, including rounding and date differences. For example, ROUND(Nearest, 0.0100000000, Union Dues) rounds the results of a calculation called Union Dues to the nearest penny. Alternatively, instead of using a separate calculation for union dues, the calculation could include the operands from which the union dues are calculated a fixed rate and an accumulator called Hours worked: ROUND(Nearest, 0.0100000000, 0.2756605000 * Hours worked)

7-10

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Follow these steps to add rounding to the right side of the calculation string. 1. Select a rounding direction. 2. Enter a rounding parameter. 3. Click Add Rounding. Automatically added to the calculation string are: "Round (", the rounding direction, a comma, the rounding parameter, and another comma. 4. Add the value to be rounded, then click the ) button.

Date Differences Date differences calculate the difference between two dates, in terms of days, months, or years. Date differences are useful in determining seniority, and are often used together with calculation rates, described below. Date from and Date to are the two dates being compared. Date from should be the earlier date. You can enter a specific date, select one of the date types that you created for employee dates, or select one of the following system-defined derived dates: •

System date, which is the user's session date at the time the calculation is invoked.

Hire date

Termination date

Position start date

Position end date

Pay period start date

Pay period end date

The date diff type determines whether the date diff calculation compares years, months, or days and counts the difference. When you compare days, Payroll counts the number of days between the two dates. The difference between Jan. 1 and Jan. 2 of the same year is 1 day. When you compare years, Payroll ignores the months and dates, and simply subtracts the From year from the To year. When you compare months, Payroll ignores dates and counts the number of elapsed months. The difference between any day in January and any day in February of the same year is one month. For example: Date from

Date to

Date diff type

Result

Jan. 1, 2000

Jan. 31, 2000

Days

30

Jan. 31, 2000

Feb. 1, 2000

Days

1

Jan. 1, 2000

Jan. 31, 2000

Months

0

Jan. 31, 2000

Feb. 1, 2000

Months

1

Jan. 31, 2000

Feb. 1, 2001

Months

13

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-11


Microsoft Dynamics速 AX Payroll

Date from

Date to

Date diff type

Result

Jan. 1, 2000

Dec. 31, 2000

Years

0

Jan. 31, 2000

Mar. 1, 2001

Years

1

Dec. 31, 2000

Jan. 1, 2001

Years

1

The syntax for a date difference is as follows: DATEDIFF(ToDate,FromDate,DateType) Where ToDate and FromDate are the names of derived dates or date types or an explicit date in MM.DD.YYYY format, and DateType is one of Days, Months, or Years. For example, DATEDIFF(Pay period end, Hire, Months) is the number of months between an employee's hire date and the end date of the pay period in which the calculation is run. Follow these steps to add a date difference to the right side of the calculation string. 1. 2. 3. 4.

Select Date from. Select Date to. Select Date diff type. Click Add date diff.

The complete date difference calculation component adds to the calculation string.

Calculation Rates Remember from course 6, "Important Setup Concepts", that calculation rates are lookup tables. If you associate a calculation rate with a calculation, then the results of the calculation string are compared to the rows in a Calculation rate table, and the result is either a particular amount from that rate table or the product of the calculation string result and a rate from the rate table. Calculation rate tables are commonly used for taxes that have different rates for different levels of income. To add a calculation rate to a calculation, select it in the Calculation rate field in the Calculation setup form. Procedures for setting up calculation rate tables appear later in this course.

7-12

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Scenario At Contoso, calculation rate tables are used for vacation accruals. Annual vacation accrual is based on seniority in the company. Mia has set up a calculation that calculates how long the employee has worked for Contoso, and that is associated with a vacation calculation rate table that correlates the number years of service to the number of hours of vacation each year. The rate table contains: Minimum amount

Item rate

0 years

120 hours

5 years

160 hours

10 years

200 hours

That calculation produces the following results: Years of seniority, calculated by the calculation string

Calculation result after calculation rate lookup

1

120

7

160

25

200

Calculation Conditions Recall that when you create a new calculation, you write a calculation rule (or formula) to define how the calculation operates. If different conditions exist that require different permutations of the same calculation, then conditions can be used by the Payroll module to manage 'if/then' type statements. For example, calculation conditions may be used to manage different maximum retirement savings contribution limits for employees when their age becomes greater than 60 years old. When building the calculation condition, you can define that if an employees age at the end of the calendar year is greater than 60, a different calculation than the standard defined calculation is used automatically.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-13


Microsoft Dynamics® AX Payroll Creating a Calculation Condition Follow these steps to create a condition on a calculation. 1. Click the Rule tab in the Calculation form, then click to open the Conditions pane (click the + next to Conditions). 2. Click Condition pane's Overview tab, and press CNTL+N to add a new condition. Name the condition, and select the operator type (And or Or). If you want to add multiple conditions which should be considered together when using the calculation result, select the And operator. If your statements should use one condition or the other in the conditions tab, use the Or operator. For example, to set up a condition that uses a different calculation if an employee's age is greater than 60, and they earn more than $20.00, use the operator And. If you want to set up a rule for all employees greater than 70 or less than 18, use the Or operator. 3. Click the Conditions tab. Press CTRL+N and an entry will appear, consisting of fields for two conditions and a comparison operator. To define the conditions, click the pencil icon next to each condition's field and use the Calculation setup form to define the condition. 4. Select the Comparison operator you require, and then click Save. The available operators are: • = represents equals to •

< represents less than

<= represents less than or equal to

> represents greater than

>= represents greater than or equal to

5. When you have completed building the conditions and defining the operator, click the Result tab to enter in the calculation string to use when these conditions are met. Use the same procedure you saw earlier in this course for setting up the Calculation string field in the Calculation setup form. At Contoso, employees pay a life insurance premium of $15.27 each month, until they are 65 years old. When they have reached the age of 65, they no longer pay the premium. Mia creates a calculation of a flat amount of $15.27. She then builds in a condition called Over age 65. She uses the operator of And. In the Conditions tab, she specifies the employee age greater than or equal to 65(AGE >=65). In the Results tab, she enters in a new calculation string of zero. When the life insurance deduction is scheduled to occur, the calculation condition will be used and for employees whose age at the end of the calendar year is greater than or equal to 65, the calculation of zero will be used. For employees who do not meet this condition, the calculation flat amount of $15.27 will be used.

7-14

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Mia tests her calculation on employees that both meet and do not meet these criteria to ensure that her conditions are working as intended.

Testing Calculations When setting up calculations, they must have a valid syntax, return the desired results, and operate as designed in an environment with employees that meet the conditions and rules designed in the calculation. Three methods are used to ensure a calculation is set up to work correctly: •

Validating calculation syntax

Testing the calculation in the calculation rule form

Testing the calculation in a test environment using employees

Validating Calculations When you set up a calculation rule, use the Validate button to ensure that the syntax of your calculation string is valid. Follow these steps to validate calculations. 1. Click the Validate button. 2. If the calculation is valid, a "Validation successful" message will be returned. 3. If a syntax error exists, the Validate button will return an error message. 4. If an error is returned, examine the calculation string and correct the source of the error. Only if the calculation is valid can you use it for processing.

Testing Calculations on the Calculation Rule Form Because valid syntax itself does not ensure accurate results, you must test the string for correct results while it is still in the Calculation rule form. To do so, enter certain values for the operands being used in the calculation. Follow these steps to test your calculation string. 1. In the Calculation setup section of the Calculation setup form, click the Test button. 2. In the Calculation test form, each operand used in the calculation displays. Enter a value in the Flat amount column for each operand, and then click the Calculation button to display the results. 3. Ensure that the results are expected, given the values entered for the calculation operands.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-15


Microsoft Dynamics® AX Payroll In this test, you are only validating that when your operands have certain values, the desired outcome is achieved. This is not a substitute for testing in a test environment and ensuring that these operands populate correctly, and used correctly in the calculation, and that the calculation then produces the desired earning, benefit/deduction, generated earning, or entitlement that it is tied to.

Testing Calculations in a Test Environment After you determine the calculation is valid, produces the desired results in the calculation rule test, and is associated to its applicable benefit/deduction, earning, generated earning, or entitlement, you must run some employees through a test using this calculation to ensure that it works as desired in an environment that represents the live environment. For example, if you are using the calculation to calculate a deduction, you must ensure that: •

The calculation is tied to the correct deduction code for the benefit/deduction rule group in the Benefit/deduction rule group calculation form.

The benefit/deduction is scheduled.

The benefit/deduction code is assigned to the employees identified as representative of all permutations for the calculation. This is because the benefit/deductions are managed at the employee level (use the procedure in course 10, "Set Up Benefit/Deductions", for creating a benefit/deduction).

Scenario Recall that for life insurance, Contoso charges a flat rate premium to all employees whose age is less than 65 years old. To make an accurate test, Mia must choose a number of employees that matches all conditions she has set up in her calculation. Mia will test employees who are less than 65 years old, 65 years old, and greater than 65 years old to ensure that all conditions are met and the desired results generate. She will run through a payment generation in a test environment to ensure that the benefit/deduction is taken, any maximum or minimums as defined in the calculation are met, and the eligible employees receive the correct benefit/deduction amounts.

7-16

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations When testing a calculation associated with an earning, Mia will also further ensure that a test that represents each earning rule group is done for employees. An earning code is tied to a calculation by Earning rule group in the earning rule group calculation form. Once set up, Mia will run employees in each rule group through a test to ensure the earnings generate correctly. She will ensure that employees in the earning rule group who are eligible for the earning receive it, and she further will ensure that employees in any earning rule group not eligible for the earning do not have it calculated. For a more detailed discussion on setting up earnings, see course 9 "Set Up Time and Earnings".

Calculation Variable Setup Remember that a calculation variable is an employee-specific value. You define calculation variables as part of your Payroll configuration, and Payroll users maintain the values appropriate for each employee. Calculation variables are associated with calculation variable items; a calculation variable item can identify a default amount to use when the calculation variable is applied to an employee. If a default amount is used, then if necessary, that amount can be overridden at the employee level when the calculation variable is assigned to the employee. If no override amount is used, than the amount identified on the calculation variable item will be used. Calculation variable items can also identify a rate value. When you assign the calculation variable and item to an employee, you can enter a rate counter. Use this value to multiply the rate counter by the rate to give a total figure for the calculation variable. For example: Calculation Variable Item Rate

Calculation Variable Rate Counter on Employee

Resulting Calculation Variable Used in Calculation String

1000

3

3000

50

2

100

Calculation variables may have only one calculation variable item, or many, depending on how many defaults must be identified and tracked. Follow these steps to set up a calculation variable and its calculation variable items. 1. In the Setup area, click Calculations, then Calculation variables. 2. Press CTRL+N to create a new calculation variable and then click the General tab. 3. Enter the name of the calculation variable, alter the short code if desired, and enter the calculation variable description.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-17


Microsoft Dynamics® AX Payroll 4. Leave the Version, Country and State fields blank. They are used with the import of jurisdiction-specific statutory deduction spreadsheet imports. 5. Confirm the active and expiry date are correct, click on the Setup button, and select Calculation Variable Items. 6. Press CNTL+N to create a new calculation variable item. Click the General tab, then name the item and give it a description. If a default value for the calculation variable exists, identify it here. If the calculation variable will be used together with a rate counter, enter the item rate to be multiplied with the employee specific rate counter. 7. Leave the Country and State fields blank, as they are currently used with the import of jurisdiction-specific statutory deduction spreadsheets.

Calculation Rate Setup A calculation rate defines a tiered table of values (calculation rate items). If you associate a calculation with a calculation rate, then the results of the Calculation string are compared to the rows in a Calculation rate table, and the result is either: •

a particular amount from that rate table; or

the product of the calculation string result and a rate from the rate table.

Follow these steps to set up a calculation rate and its calculation rate items. 1. Expand Calculations in the Setup area of the Payroll area page, then click Calculation rates. 2. Press CTRL+N, then click the General tab. 3. Enter a name and description. 4. Select a rate action: a. Select Single - rate when the incoming value from the calculation must be mapped to one item in the rate table, and the calculation result is the associated value in the rate table multiplied by the incoming value from the calculation. In some jurisdictions, taxes calculate at a single rate that varies depending on income. For example, a rate table contains:

7-18

Minimum amount

Item rate

0

0.05

10,000

0.07

25,000

0.1

Result

1.0 x 25,456.21 = 2,545.621

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

Minimum amount

Item rate

50,000

0.15

100,000

0.25 Result

Result

1.0 x 25,456.21 = 2,545.621

If the incoming value from the calculation string is 25,456.21, then it is more than 25,000 and the appropriate rate is 0.1. Because the rate action is a rate and not an amount, then that rate multiplies by the incoming value and the returned result for the calculation is 2.545.621. b. Select Multiple - rate when the incoming value from the calculation must be mapped to multiple items in the rate table. In such cases the amount that corresponds to the lowest tier must be multiplied by the rate at that tier; then the amount that corresponds to the next tier must be multiplied by the rate for that tier, and so on. The calculation result is the sum of each of the amounts that corresponds to the tiers. In some jurisdictions, taxes calculate at multiple rates. For example, if the same rate table is set up with a rate action of multiple - rate, then an incoming value from the calculation string of 25,456.21 returns the following total: Minimum amount

Item rate

Calculation

0

0.05

0.05 x 10000 = 500

10,000

0.07

0.07 x 15000 = 1050

25,000

0.1

0.1 x 456.21 = 45.621

50,000

0.15

100,000

0.25 Result

500+1050+45.621=1595.621

If the incoming value from the calculation string is 25,456.21, that is more than 25,000, so the appropriate rate is 0.1. Because the rate action is a rate, not an amount, that rate multiplies by the incoming value, and the returned result for the calculation is 2.545.621.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-19


Microsoft Dynamics速 AX Payroll c. Select Full - rate when the incoming value from the calculation must be mapped to multiple items in the rate table, and the full incoming amount must be multiplied by the rate at each relevant tier. The calculation result is the sum of each of those tiers. In some jurisdictions, taxes calculate at multiple rates. For example, if you set up the following rate table with a rate action of Full rate, then an incoming value from the calculation string of 25,456.21 returns the following total: Minimum amount

Item rate

Calculation

0

0.05

0.05 x 25,456.21 = 1,272.8105

10,000

0.02

0.02 x 25,456.21 = 509.1242

25,000

0.03

0.03 x 25,456.21 = 763.6863

50,000

0.05

100,000

0.1 Result

1.0 x 25,456.21 = 2,545.621

d. Select Single - amount when the incoming value from the calculation must be mapped to one item in the rate table, and the calculation result is the associated value in the rate table. For example, Mia uses this rate action to look up an employee's annual vacation accrual hours based on the employee's years of employment. If the following rate table is set up with a rate action of Single - amount, then an incoming value from the calculation string of 7 returns the following total: Minimum amount

Item rate

0

120

5

160

10

200 Result

7-20

Calculation 160 160

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

e. Select Multiple - amount when the incoming value from the calculation must be mapped to multiple items in the rate table, and the calculation result is the sum of the associated values in the rate table. For example, if the following rate table is set up with a rate action of Multiple - amount, then an incoming value from the calculation string of 7 returns the following total: Minimum amount

Item rate

Calculation

0

120

120

5

40

40

10

40 Result

160

5. Select an adjustment type: a. Use Apply adjustment before if the calculation rate item includes an adjustment amount that must be added to the value coming from the calculation string, and the result is used to look up the appropriate tiers in the rate table. b. Use Apply adjustment after if the calculation rate item includes an adjustment amount that must add to the result calculated from the lookup. 6. To create the rate items associated with your new calculation rate, click the Setup button in the Calculation rate form, then click Calculation rate items. 7. Press CTRL+N to create a new row. In the Item amount column, enter the minimum amount for this tier. Most rate item tables will include a row with an item amount of 0. Enter an adjustment amount, if applicable. Enter the item rate. Repeat this step for each tier that you need in the calculation rate table.

Sample Calculation: Retirement Ravings Plan Contribution At Contoso, employees can have retirement savings plan contributions deducted from their pay. Employees can specify the percentage of their taxable earnings to contribute and the maximum contribution they want to make in a year. Mia has a calculation, called Retirement sav contr, which calculates the amount to withhold from each payment. It multiplies the employee's taxable income for that payment by the employee's contribution percentage, and ensures that the total contribution does not exceed the employee's annual maximum.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-21


Microsoft Dynamics速 AX Payroll That calculation needs two employee-specific pieces of information, which are stored in two calculation variables called Retirement Sav Max and Retirement Sav Pct. If an employee wants five percent withheld, Mia enters 5 in that employee's calculation variable. The calculation also needs two accumulators, Retirement Savgs YTD, which contains the retirement savings contribution total for the current year, and Taxable Inc, which contains the taxable income for the pay period that has not yet been included on a payment. (The taxable income accumulator's Read type is Incremental amount. The year-to-date accumulator's Read type is Full amount.). The part of the calculation that determines the base retirement savings contribution is: Taxable Inc * Retirement Sav Pct / 100 To ensure that employees do not exceed their annual total, the calculation first determines how much each employee has left to contribute before reaching that maximum by subtracting what has already been withheld for that employee from the employee's maximum: Retirement Sav Max - Retirement Sav YTD The calculation selects the lesser of either the base retirement savings contribution or the amount that the employee has left to pay before reaching the maximum: MIN(Retirement Sav Max - Retirement Sav YTD, Taxable Inc * Retirement Sav Pct / 100) Finally, it is possible for an employee's actual contributions in a year to exceed his or her stated maximum, perhaps because the employee asked to have the maximum lowered to an amount below what had already been contributed, or perhaps because the employee requested that a contribution be set manually to be higher than the calculated amount. In that case, the Retirement Sav Max Retirement Sav YTD part of the equation would return a negative value, and that negative value would be the lower value in the equation, and the result would be a negative value benefit, which would increase the employee's pay. To prevent negative results, the final element of the equation uses the MAX operand to return either the calculated amount or zero, whichever is greater: MAX(MIN(Retirement Sav Max - Retirement Sav YTD, Taxable Inc * Retirement Sav Pct / 100),0.00)

7-22

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations Test Your Knowledge If Mia enters a Retirement Sav Pct calculation variable for an employee, but does not give the employee a Retirement Sav Max calculation variable, what will happen?

Maximum Contribution Most employees have a maximum contribution of $9,000. Mia would like the calculation to automatically use this amount, unless she specifies otherwise. How can this be accomplished? Select all that apply. (Select all that apply) ( ) Leave the main calculation unchanged. Add a condition: Condition: Retirement Sav Max = 0 Result: same as the main calculation, but replace Retirement Sav Max with 9000 ( ) Replace Retirement Sav Max in the calculation with MAX(Retirement Sav Max,9000) ( ) Create an interim calculation that sends Retirement Sav Max to a rate table with tiers of 0 and 0.01 that multiplies by 1 and, for the 0 tier, has a 9000 adjustment. ( ) Set the default value for the Retirement Sav Max calculation variable to 9000.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-23


Microsoft Dynamics® AX Payroll

Summary Use calculations to determine the value of: •

Earnings

Benefit/deductions

Calculated entitlement accruals

Data-based fields in statutory reports

When creating and using calculations, you use Payroll module syntax to express formulae in calculation strings. Operand buttons are provided in the Calculations form to simplify adding these common components to your calculation: •

flat amounts

accumulators

employee attributes

calculation variables

other calculations

You can use calculation rates, calculation conditions, and date differences to further define your calculation. You can test the syntax and logic of your calculation by using the button provided in the Calculations form. Before using the calculation for actual payroll calculations, you must also test it in a suitable test environment.

7-24

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

Test Your Knowledge 1. What kinds of calculations are not editable, and how can you identify them? ( ) All statutory deduction calculations. ( ) Benefit/deduction calculations. ( ) Pre-defined calculations for taxes, available for some statutory jurisdictions. They are imported with a version number that appears in the Calculations form. ( ) Intermediate calculations. 2. Briefly describe when calculation conditions you can use, and provide an example.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-25


Microsoft Dynamics速 AX Payroll 3. What is the difference between an intermediate calculation and a final calculation, and where to do you specify which of these types you want your calculation to be?

4. Which three statements about date differences are correct? ( ) Date differences calculate the difference between two dates, in terms of days, months, or years. ( ) The date diff type determines whether the date diff calculation compares pay periods or active/expiry dates . ( ) Date differences are often used in conjunction with calculation rates. ( ) Date differences are very useful in determining seniority.

7-26

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

Quick Interaction: Lessons Learned Take a moment and write down three key points you have learned from this chapter 1.

2.

3.

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement

7-27


Microsoft Dynamics® AX Payroll

Solutions Sample Calculation: Retirement Ravings Plan Contribution 1. If Mia enters a Retirement Sav Pct calculation variable for an employee, but does not give the employee a Retirement Sav Max calculation variable, what will happen? MODEL ANSWER: The employee will not have retirement savings contributions withheld from his or her pay check because the calculation will consider the employee's Retirement Sav Max to be zero, so any contribution would exceed that maximum. 2. Most employees have a maximum contribution of $9,000. Mia would like the calculation to automatically use this amount, unless she specifies otherwise. How can this be accomplished? Select all that apply. (Select all that apply) (√) Leave the main calculation unchanged. Add a condition: Condition: Retirement Sav Max = 0 Result: same as the main calculation, but replace Retirement Sav Max with 9000 ( ) Replace Retirement Sav Max in the calculation with MAX(Retirement Sav Max,9000) (√) Create an interim calculation which that sends Retirement Sav Max to a rate table with tiers of 0 and 0.01 that multiplies by 1 and, for the 0 tier, has a 9000 adjustment. ( ) Set the default value for the Retirement Sav Max calculation variable to 9000.

Test Your Knowledge 1. What kinds of calculations are not editable, and how can you identify them? ( ) All statutory deduction calculations. ( ) Benefit/deduction calculations. (•) Pre-defined calculations for taxes, available for some statutory jurisdictions. They are imported with a version number that appears in the Calculations form. ( ) Intermediate calculations.

7-28

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement


Chapter 7: Payroll Calculations

2. Briefly describe when calculation conditions you can use, and provide an example. MODEL ANSWER: If different conditions exist that require different permutations of the same calculation, then conditions can be used by the Payroll module to manage 'if/then' type statements. For example, calculation conditions may be used to manage different maximum retirement savings contribution limits for employees when their age becomes greater than 60 years old. When building the calculation condition, we you can define that if an employees age at the end of the calendar year is greater than 60, use a differenta calculation different than the standard defined calculation is used. 3. What is the difference between an intermediate calculation and a final calculation, and where to do you specify which of these types you want your calculation to be? MODEL ANSWER: A final calculation is tomust be listed as an available calculation in the Rule group calculation and Generated earnings forms. An intermediate calculation contributes its results for use in a final calculation. To specify which one a calculation is going to be, use the Display in list field in the General tab of the Calculation form. 4. Which three statements about date differences are correct? (√) Date differences calculate the difference between two dates, in terms of days, months, or years. ( ) The date diff type determines whether the date diff calculation compares pay periods or active/expiry dates. (√) Date differences are often used in conjunction with calculation rates. (√) Date differences are very useful in determining seniority.

Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement

7-29


Microsoft Dynamics速 AX Payroll

7-30

Microsoft Official Training Materials for Microsoft Dynamics 速 Your use of this content is subject to your current services agreement


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.