HRMTaxIDEditWithSearchType

HRM Tax Id Edit with Search Type

Minor Business Rule

Object Name: N0800274

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

Purpose

This function is to be used from the address book master business function.  It will edit the tax id 

for search types of A,E,X,Q based on Country and Search Type.


Setup Notes and Prerequisites

Address Number is required for this function.


Special Logic


Technical Specification


Parameters:

Data Item Data StructureDescriptionI/ORequiredNotes

AN8mnAddressNumberI/OYes

AT1szSearchTypeIYes

DTAIszErrorCodeONoSends back number of Error Code to be 

called.

EV01cSuppressErrorINoInput 1 for no error calls within BSFN

SSNszSocialSecurityNumberIYes

CTRszCountryIYes



Processing:


BF szErrorCode = ""

// ******************************************************************************

// Only edit on HR search Types

// ******************************************************************************

If BF szSearchType is equal to "A,E,Q,X" 

// ******************************************************************************

// If the address book application is not called from P0801, the country code is

// blank.  If  this is the case use the country for payroll retrieved from the

// F060116

// ******************************************************************************

If BF szCountry is equal to  

VA evt_TableHandleF060116_HF06 = F060116.Open Handle

F060116(VA evt_TableHandleF060116_HF06).Fetch Single

F060116(VA evt_TableHandleF060116_HF06).Close

End If

// ******************************************************************************

// Editing Based on Country

// ******************************************************************************

If BF szCountry is equal to "US" Or BF szCountry is equal to  

// ******************************************************************************

// US

// ******************************************************************************

HRM Tax ID Edit - USA

If VA evt_cUSTaxEditError_EV01 is equal to "1" 

// Blanks Error

If BF szSocialSecurityNumber is equal to  Or BF szSocialSecurityNumber is equal to  

Or BF szSocialSecurityNumber is equal to  

// ******************************************************************************

// Editing Based on Search Type - Blanks allowed for all but E,X

// ******************************************************************************

If BF szSearchType is equal to "E,X" 

If BF cSuppressError is equal to "1" 

     BF szErrorCode = "046D"

Else

            Set NER Error(046D, BF szSocialSecurityNumber)

End If

End If

Else

// Length Error

If BF cSuppressError is equal to "1" 

BF szErrorCode = "2104"

Else

Set NER Error("2104", BF szSocialSecurityNumber)

End If

End If

End If

Else

// ******************************************************************************

// Canada

// ******************************************************************************

If BF szCountry is equal to "CA" 

HRM Tax ID Edit - CA

If VA evt_cCATaxEditError_EV01 is equal to "1" 

// Blank Error

If BF szSocialSecurityNumber is equal to  Or BF szSocialSecurityNumber is 

equal to  Or BF szSocialSecurityNumber is equal to  

// ******************************************************************************

// Editing Based on Search Type - Blanks allowed for all but E,X

// ******************************************************************************

If BF szSearchType is equal to "E,X" 

If BF cSuppressError is equal to "1" 

 BF szErrorCode = "046D"

Else

Set NER Error(046D, BF szSocialSecurityNumber)

End If

End If

Else

// Length Error

If BF cSuppressError is equal to "1" 

BF szErrorCode = "2104"

Else

Set NER Error("2104", BF szSocialSecurityNumber)

End If

End If

Else

// Check Digit Error

If VA evt_cCATaxEditError_EV01 is equal to "2" 

If BF cSuppressError is equal to "1" 

BF szErrorCode = "2189"

Else

Set NER Error("2189", BF szSocialSecurityNumber)

End If

End If

End If

Else

If BF szCountry is equal to "AU,NZ"


BF szSocialSecurityNumber = ""

Else

// ******************************************************************************

// Other - Localization

// ******************************************************************************

N0800015 - Plug and Play

End If

End If

End If

End If


Data Structure

D0800274 - HRM Tax Id Edit with Search Type

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAddressNumberAN8MATH_NUMERICREQINPUT

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

szSearchTypeAT1charREQINPUT

A user defined code (01/ST) that specifies the kind of address book record to search for. Examples include: E Employees   X Ex-employees  
V Suppliers   C Customers  P    Prospects M Mail distribution lists   TAX Tax authorities

szSocialSecurityNumberSSNcharOPTBOTH

A number that indicates the tax ID. In the United States, the tax ID is the social security number. In Canada, it is the social insurance number. 
If you add employee information for a non-US or non-Canadian company, you can leave this field blank. However, if the international code is 
set to Y and the default company is non-Canadian and non-United States, you can enter a 16-character number for the tax ID. The system 
does not permit duplicate tax ID numbers. Also, the number cannot include dashes. For example, if a social security number of nn-nn-nnnn is 
used, the number should be entered as follows: 123456789.

szCountryCTRcharOPTINPUT

A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion. The Address Book system 
uses the country code for data selection and address formatting.

cSuppressErrorEV01charOPTINPUT

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

szErrorCodeDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

Related Functions

None

Related Tables

None