VertexTaxCalculation

Vertex Tax Calculations

Major Business Rule

Object Name: B0700010

Parent DLL: CPAY

Location: Client/Server

Language: C

Functional Description
B0700010Vertex Tax Calculations


Purpose

Main driver to set employee tax information, calculate taxes, and create tax detail records (F07353).


Setup Notes and Prerequisites

The Perform Tax Calculations routine is called from the Do section of the UBE (R07200).  





Technical Specification


Parameters:

  szCheckControlNoCacheName

  szVertexCacheName

  szDBACacheName

  szTimecardCacheName

  szPayrollID                  

  mnAddressNumber

  szTaxAreaWork                   

  szTaxAreaResidence              

  szTaxId                   

  cMaritalStatusTax                   

  szCompanyHome                    

  szPayPeriodNumber                

  cPayFrequency                       

  jdDatePayCheck                      

  jdDateUpdated                       

  mnTimeLastUpdated                   

  szProgramId                    

  szWorkStationId                 

  szUserId                        

  cTaxCalcMethod  

  cEICStatus                          

  cWorkTaxSource                      

  cSUISource                          

  cResidencyStatus                    

  mnSchoolDistrictCode 


Related Tables

none

Related Business Functions

Source Name       Function Name
B0700004Set Tax Calculation Inputs

B0700009Create Tax Detail records

B0700008Perform Tax Calculations

B0700058Establish connection to Vertex


Processing 


1.0   Initialize Check Control number cache

2.0Initialize data structures for:

• Set Tax Calculations (B0700004)
• Check Control number
• Employee handle
• Payroll Id
• Address Number
• Timecard Cache Name
• DBA Cache Name
• Vertex Cache Name
• Tax Area Work
• Tax Area Residence
• Tax Id
• Home Company 
• Pay period number
• Pay Frequency
• Pay Check date

3.0Perform Tax Calculations (B0700008)

• Connection handle "Connects to the Vertex database"
• Employee handle

4.0Create Tax Detail Records (B0700009)

• Check Control number
• Employee handle
• Address Number
• Date Updated
• Time Last Updated
• Program Id
• Work Station Id
• User Id

5.0Create an Employee Information Handle VprtInitEmpHdl (Data Handle)


6.0Loop through Check Control cache records.  We need to calculate taxes separately  for 

each unique Check Control number.

• Get Check Control number from Check Control cache

• Call object B0700004 "Set Tax Calculations"
• Send in the Data Structure

• Call object B0700008 "Perform Tax Calculations"
• Send in the Data Structure

• Call object B0700009 "Create Tax Detail Records"






^

Data Structure

D0700010 - Vertex Tax Calculation

Parameter NameData ItemData TypeReq/OptI/O/Both
szCheckControlNoCacheNamePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

szVertexCacheNamePID1charOPTNONE

Program ID - 01

szDBACacheNamePID2charOPTNONE

Program ID - 02

szTimecardCacheNamePID3charOPTNONE

Program ID - 03

szPayrollIDPAYDcharOPTNONE

A code that identifies a group of employees for whom you are processing payroll. Use this ID to process each step of the payroll 
cycle. This code is also used to identify the interim ID that you select when you enter interim payments.

mnAddressNumberAN8MATH_NUMERICOPTNONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szTaxAreaWorkTARAcharOPTNONE

A code that identifies a geographical location and the tax authorities for an employee work site, including employee and employer statutory 
requirements. In the Vertex payroll tax calculation software, the tax area code is synonymous with GeoCode. To determine the valid codes 
for your location, refer to the documentation for the tax calculation software that you are using.

szTaxAreaResidenceTARRcharOPTNONE

A code that identifies both the geographical location and the tax authorities for the employee's residence. Authorities include employee 
and employer statutory requirements. This code is synonymous with GeoCode. Refer to Vertex System's Master GeoCode File for valid codes 
for your locations.

szTaxIdTAXXcharOPTNONE

A number that identifies your company to the tax authority. This number can include the tax ID number for an individual, a federal or state 
corporate tax ID, a sales tax number, and so on. This number has specifically been established for the Payroll system to handle the 
requirements of taxing authorities that require more than 9 positions for the tax identification number. Do not enter hyphens (dashes), slashes, spaces, or 
other punctuation in the tax identification number.

cMaritalStatusTaxMSTXcharOPTNONE

A user defined code (system 06, type MS) that specifies the employees' federal marital status code as retrieved from the W-4 form. This 
code is used in the computation of all federal income tax.  You can add codes if needed.

szCompanyHomeHMCOcharOPTNONE

The company number where the employee records generally reside.

szPayPeriodNumberPPNBcharOPTNONE

The number of the pay period from the beginning of the year. For instance, a monthly payroll cycle beginning in January has a total of 12 
periods with October being the 10th period. Typical values are:        001-052 (Weekly Payroll Cycle)        001-026 (Biweekly Payroll Cycle)        
001-024 (Semimonthly Payroll Cycle)        001-012 (Monthly Payroll Cycle)        001-004 (Quarterly Payroll Cycle)        001-001 (Annual Payroll Cycle)

cPayFrequencyPFRQcharOPTNONE

A user defined code (07/PF) that indicates how often an employee is paid. Valid codes are: B Biweekly   W Weekly   S Semimonthly  
M Monthly   A Annually   C European Annualized  The system uses the value in the Description-2 field on user defined codes to calculate the amount per 
pay period for a salaried employee.

jdDatePayCheckCKDTJDEDATEOPTNONE

The date associated with the various types of net pay instructions. This date relates to a payroll check, an interim payment, a bank 
automatic-deposit advice slip, a payslip (cash), or a claim reimbursement.

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

mnTimeLastUpdatedUPMTMATH_NUMERICOPTNONE

The time that specifies when the program executed the last update to this record.

szProgramIdPID4charOPTNONE

Program ID - 04

szWorkStationIdJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

szUserIdUSERcharOPTNONE

The code that identifies a user profile.

cTaxCalcMethodFICMcharOPTNONE

A code that specifies the tax method that the Vertex payroll-tax calculation system uses to calculate certain taxes. The codes are defined in 
UDC 07/TM. This code can also determine the form that the employee receives for year-end tax reporting. For example, when you enter C, 
a contract employee receives IRS Form 1099-M rather than IRS Form W-2. If a form is not specified in Description 2, the system generates 
IRS Form W-2. For employees who are paid multiple times within one pay period, the system should review previous payments within the same 
pay period and then adjust tax amounts. To specify this function, enter S. If a tax method exists for an employee in addition to the normal tax 
method that is set up in the Employee Master Information table (F060116), the system can use the alternative tax method to interactively 
process interim payments. To specify this function, enter Z. Some values, such as S and Z, might require additional setup in the UDC table.

cEICStatusEICcharOPTNONE

A code that specifies whether the employee qualifies for the earned income credit and elects for the employer to give him or her the 
advance. Valid values are:    N The employee does not qualify (default).    Y The employee qualifies and the employee is single/head of 
household.    M The employee qualifies and is married without spouse filing certificate.     B The employee qualifies and his or her spouse also 
qualifies.

cWorkTaxSourceNScharOPTNONE

This code is used to determine the source for obtaining the tax area code for the employee's work location.    N Use time entry, job master, 
employee labor rules or employee master to determine Tax Area.    E Always use the Work Tax Area from the employee master on time 
record. When blank the system assumes N.

cSUISourceSUIcharOPTNONE

Use this field to specify the work tax area that is used for SUI reporting. You can specify that the system use either the resident state or the 
work state, regardless of where the employee worked. FUI is calculated in the same state where SUI is calculated. Weeks Worked are the 
number of weeks the employee worked in the taxed state.  Valid values are:    N   Use the work tax area in the time entry record to determine 
SUI. This is the default value.    R   Always use residence tax area from Employee Master table even if the time entry record is different.    W  
Always use work tax area from Employee Master table even if the time entry record is different.

cResidencyStatusWSPScharOPTNONE

A value that identifies out-of-state employees for whom an employer must withhold tax for the state of residence. Valid values are: N 
(Default) The system uses the employee residence state to calculate taxes. Because the work state has a reciprocal agreement with the employee 
state of residence, the system uses the employee residence state from the Employee Master Information table (F060116).  W The system 
uses only the work state to calculate taxes.

mnSchoolDistrictCodeSCDCMATH_NUMERICOPTNONE

A user-defined code in UDC 06/SD that determines the school district tax for taxation purposes. Vertex automatically calculates the school 
district tax. This feature is primarily used by the public sector.

cPayrollTypePATYcharOPTNONE

An option that specifies whether the payroll cycle includes interim payments only. Valid values are:    On Yes, the payroll cycle includes 
interim payments only.    Off No, the payroll cycle includes regular payments instead of or in addition to interim payments.

cPrintVertexReportEV01charOPTNONE

An option that specifies the type of processing for an event.

cWorkStateTaxMSTIcharOPTNONE

The employee's "Work" state marital status code as retrieved from the state W-4. This code is used in the computation of all state payroll 
taxes associated with the state in which the employee performed work. If you leave this field blank, the Federal status is used.

cResStateTaxRMSTcharOPTNONE

A user defined code (system 06, type MS) that specifies the marital status code for the state of residence. It is used for tax computations. 
This code is related to specific VERTEX system codes (see the VERTEX Tax Manual for their explanation). Also, two special codes have 
been provided: one designates single for Federal and married for State, and the other designates married for Federal and single for State.

cLocalAreaTaxLMSTcharOPTNONE

The employee's Local marital status code as retrieved from the locality's W-4. This code is used in the computation of all local (city, county) 
payroll taxes associated with the state in which the employee performed work. If you leave this field blank, the Federal status is used.

cVacationFactorAAFcharOPTNONE

A value in this field represents the number of pay periods that this check is to cover. This is used by the Payroll system to direct the Vertex 
payroll tax program to treat the pay as a vacation advance. The computed taxes are automatically averaged over the number of pay periods. 
See the Vertex system manual for an explanation of the method of calculating tax on vacation advances.

jdDateOfBirthDOBJDEDATEOPTNONE

The employee's date of birth.

szCountryCodeCCPRcharOPTNONE

A user defined code list 00/CN that indicates the country in which the employee resides.

szUnemploymentRatesCacheNamePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

szTaxDetailCacheNamePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

jdDtWorkJulianDWKJDEDATEOPTNONE

The date used as the actual work date or pay-period ending date.

jdDatePayPeriodEndingPPEDJDEDATEOPTNONE

The last day of a processing period (pay period, month, quarter or year).

szTaxOverrideCachePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cBypassVoidwithSpecialTaxesBPVDcharOPTNONE

A code that indicates whether you want to bypass or process voided payments if those payments contain special taxes. Valid values 
are: 0 Process voided payments with special taxes.  1 Bypass voided payments with special taxes.

szDBADetailCacheNamePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

iNumberOfPayPeriodsINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cLastPeriodOfMonthEV01charOPTNONE

An option that specifies the type of processing for an event.

Related Functions

B0700004 Set Tax Calculation Inputs
B0700008 Perform Tax Calculations
B0700009 Create Tax Detail Records
B0700058 Establish Connection to Vertex

Related Tables

None