!!Overview This document describes the set up requirements to have P2K store Earnings and/or Hours into a Pay by Unit. There is no way to obtain the earnings from individual Pay Components, so this method provides a way to have Values stored into individual Pay Components, based on the Group or Unit that is associated with the individual pay lines. With this information stored, the values in these Pay Components are then available to Usercalcs encountered subsequent to the storage of these components in the same pay. The storage is invoked by a single usercalc whose sole purpose is to store the values by pay component and make them available to subsequent Usercalcs for calculation of Union Dues, etc. by Unit. This is a ‘Custom Function’ supplied by P2K. This Usercalc created with this ‘Custom Function’ will then be placed on the Pay Points after all earning have been calculated and will make the values available to other usercalcs in the Pay. !!User Fields User fields must be attached to the ‘Unit Details’ table in pairs. For example: User Field Name: PPE-Earnings 1 (PPE – Element to obtain the value, for example Gross) PPC-Earnings 1 (PPC – PC to store the value obtained from PPE-Earnings 1)) PPE-Time 1 (PPE – Element to obtain the value, for example Gross) PPC-Time 1 (PPC – PC to store the value obtained from PPE-Time1) The first User field contains the Element (PEL) to be used to obtain the value, and the second to obtain the Pay Component (PPC) to be used to store the value. These sets can have any purpose, and there can be any number of sets defined. !!User Field Values The Pay Component to be used to store the value is entered as User Field Values on the Unit Details record. The example below illustrates how the User Fields from the previous page would be entered. !!Days Worked Take Note of the two User Fields ‘DW-PPC-DAYS’ and ‘DW-PEL-DAYS’. These two are required to store the actual number of days worked by Unit. For example, if an employee worked on Monday, Tuesday, and Wednesday, the number of days worked would be three regardless of the number of hours. This takes place because of the previous set ups, an additional entry will be made into the DW-PPC-Days user field, when unit has this set up. !!Write Usercalc A Usercalc is required to execute the ‘Custom Function’ named ‘UNIT VALUES’. This is where the actual work is done to store the values. This Usercalc should be placed on a Pay Point (IPPP), after the earnings have been processed. The Values that are stored in Pay Components, and are then available to subsequent Usercalcs for calculation Union Dues etc, by Unit. The variable “result” must be set up as a char type.