!!! Example of Converting Sundry Lines Sundry Lines are payroll transactions for a specific employee that re-occur on a set frequency. Since they are payroll transactions, they can be deductions, earnings or any other type of transactions that can be entered through the payroll transaction screen [IPSN]. One requirement of Sundry Lines is that the [pay component|PAY COMPONENTS] that is being loaded and converted must have the [Enter Sundry|ENTER_SUNDRY_LINES] toggle in the PC Rules section of the [IPPC] screen turned on. Sundry Lines are stored in the database as a header/detail set of records. The tables that the converted records are converted into are actually [P2K_PR_SUNDRY_LINES] and [P2K_PR_SUNDRY_LINE_DETAILS]. The interface table where the records are loaded into combines these two records together in order to group them more easily. Since each Sundry Line can have several Sundry Line Details, it is best to build the interface records following this grouping. As a minimum, each Sundry Line needs one Sundry Line Detail. The following table is a list of the columns in the [INF_CV_SUNDRYLINES]: ||Name ||Null? ||Type|| Notes |[ENTITY_CODE]| NOT NULL| VARCHAR2(16)| Used to derive link to EMPLOYMENT record |[PERSON_CODE]| NOT NULL| VARCHAR2(16)| Used to derive link to EMPLOYMENT record |[EMPLOYMENT_TYPE]| |VARCHAR2(30)| Used to derive link to EMPLOYMENT record |[HIRE_DATE|DATE]| | | Used to derive link to EMPLOYMENT record |[FREQUENCY_CODE] | NOT NULL| VARCHAR2(16)| Must be a valid Pay Frequency on [IPPF] |[SUNDRY_LINE_TYPE]| NOT NULL| VARCHAR2(30)| Must be valid lexicon entry. Typically 01 or Sundry |[START_DATE]| NOT NULL| DATE| First day that Sundry records need to be processed by payroll |[END_DATE]| NOT NULL| DATE| Last day Sundry record will be processed |[PC_CODE_HEADER|PC_CODE]| NOT NULL| NUMBER(4)| Must be a valid [PC Code|PC_CODE] from the [IPPC] screen |[UNIT_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[GROUP_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[POSITION_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[JOB_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[LEAVE_TYPE_CODE]| | VARCHAR2(16)| not used at this time |[PLAN_CODE]| | VARCHAR2(16)| Not used at this time |[USER_CALC_CODE]| | VARCHAR2(16)| Identifies the user calc to execute when sundry line is processed. |[COUNTRY_CODE] | | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[STATE_PROVINCE_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[GEO_CODE]| | VARCHAR2(16)| A valid is only needed if this is not the employees prime assignment value |[ASSIGNMENT_START_DATE]| | DATE| Used to derive link to ASSIGNMENT record |[ASSIGNMENT_CODE]| NOT NULL| VARCHAR2(16)| Used to derive link to ASSIGNMENT record |[TIMES_REMAINING]| | NUMBER(5)| The number of time the sundry line needs to be processed. |[PAY_POINT_TYPE]| | VARCHAR2(30)| |[PAY_POINT_TASK]| | VARCHAR2(30)| |[PAY_POINT_SEQUENCE]| | NUMBER(5)| |[TIME_ENTERED]| | NUMBER(18,6)| Value associated to the [PC Code|PC_CODE] of this Sundry Line |[TIME_BASIS]| | VARCHAR2(30)| Must be a valid lexicon entry. Typically 15 or $ |[WCB_CLASS]| | VARCHAR2(30)| |[DISTRIBUTION_MASK] | | VARCHAR2(50) | |[REFERENCE_INFO]| | VARCHAR2(50) | |[PC_CODE_DETAILS|PC_CODE]| | NUMBER(4)| Must be a valid [PC Code|PC_CODE] from the [IPPC] screen |[PC_ACTION]| NOT NULL| VARCHAR2(30)| Must be a valid lexicon entry. Typically A or Accumulate |[PC_DETAIL_TYPE]| NOT NULL| VARCHAR2(30)| Must be a valid lexicon entry. Typically 20 or 'Entered Value' |[ELEMENT_CODE]| |VARCHAR2(16)| |[USER_VARIABLE_CODE] | |VARCHAR2(16)| |[PC_CALC_METHOD]| | VARCHAR2(30)| Must be a valid lexicon entry. Typically 00 or 'EV: Entered Value' |[DESCRIPTION]| | VARCHAR2(50) | |[WAGE_RATE]| |NUMBER(18,6)| A valid is only needed if this is not the employees prime assignment value |[WAGE_RATE_OVERRIDE] | | NUMBER(18,6)| |[RATE_BASIS] | | VARCHAR2(30)| A valid is only needed if this is not the employees prime assignment value |[RATE_BASIS_OVERRIDE] | |VARCHAR2(30)| |[AMOUNT] | |NUMBER(18,6)| Value associated to the [PC Code|PC_CODE] of this Sundry Line Detail |[AMOUNT_OVERRIDE] | |NUMBER(18,6)| |[USER_VARIABLE_OVERRIDE]| |NUMBER(18,6) | |[DISTRIBUTION_DR_MASK] | |VARCHAR2(50) | |[DISTRIBUTION_CR_MASK] | |VARCHAR2(50)| |[PC_RATE_SOURCE] | |VARCHAR2(30)| |[HIGHER_OF_RATE] | |VARCHAR2(4)| |USER_FIELD_VALUE_01| |VARCHAR2(2000)| If needed a custom script can be used to populate some of the field in the INF_CV_SUNDRYLINES table based on the setup of the [PC Code|PC_CODE] and the employee’s primary assignment record. The FIX_SUNDRYLINES.SQL script will set the [UNIT_CODE], [GROUP_CODE], [JOB_CODE] and [POSITION_CODE] on the INF record if these fields are loaded with a NULL value. It will also look up the [PAY_POINT_TYPE] value from the Pay Rules section of the [IPPC] screen for the [PC Code|PC_CODE] in the [PC_CODE] Header column and set this in the record. This script can be downloaded from the support FTP server, or is included on the application installation CD. Simple records in the INF_CV_SUNDRYLINES table will only have one record. An example of this type of sundry line would be United Way deductions or uniform allowances. Since this type of record will cause the same value to be processed by payroll, there is no need for any other PC Codes to track information of the transaction. These single record sundry lines will have the same [PC Code|PC_CODE] in both the [PC_CODE] Header and [PC_CODE] Detail columns. More complex sundry lines, such as garnishments, will require additional records to track the additional information in order to make the correct calculations. For example, a garnishment deduction will need to track the amount to be taken each pay period as well as the current balance of the deduction. In this example the INF_CV_SUNDRYLINES will need to have two records loaded for these two values. The first record will have the [pay component|PAY COMPONENTS] in the [PC_CODE] Header and [PC_CODE] Detail columns set to the deduction [PC Code|PC_CODE], while the second record will have the [PC_CODE] Header set to this same [PC Code|PC_CODE] and the [PC_CODE] Detail will be set to the declining balance [PC Code|PC_CODE]. The first record will have the amount of the pay period deduction entered into the [AMOUNT] column and the second record will have the balance at the time of the conversion in its [AMOUNT] column. The two records for the same employee and the same [PC_CODE] Header will create one record in the [P2K_PR_SUNDRY_LINES]. However, these two records will create two separate records in the [P2K_PR_SUNDRY_LINE_DETAILS]. Both of these records can be seen in the [IPSN] screen of the application after they have been converted by selecting the Details tab in the lower right side of the screen.