GPBR_TERM_VW(SQL View) |
Index Back |
---|---|
eSocial Termination EventeSocial XML Framework View Table This record is used to generate informations for eSocial layout S-2299 - Labor Event Termination - TAG evtDeslig S-2399 - Labor Event - Workers who have no employment relationship End TAG - evtTSVTermino |
SELECT B.GPBR_DRIVER_SEQ , B.GPBR_DRV_SPLIT_SEQ , B.GPBR_EVENT_ID , A.GPBR_RECT , B.GPBR_EVENT_CD , A.GPBR_RECEIPT_NUM , A.GPBR_TP_ENV , A.GPBR_ISSUER , CASE WHEN ( SELECT C.GPBR_VERSION FROM %Table(GPBR_EVNT_SETUP) C WHERE C.GPBR_EVENT_CD = B.GPBR_EVENT_CD AND %EffdtCheck(GPBR_EVNT_SETUP C1, C, %CurrentDateIn)) IS NOT NULL THEN ( SELECT C.GPBR_VERSION FROM %Table(GPBR_EVNT_SETUP) C WHERE C.GPBR_EVENT_CD = B.GPBR_EVENT_CD AND %EffdtCheck(GPBR_EVNT_SETUP C1, C, %CurrentDateIn)) ELSE ' ' END ,A.GPBR_COMP_INS_TYPE ,A.ESTAB_ID_BRA ,A.NATIONAL_ID ,A.GPBR_NAT_ID ,A.GPBR_REG_ESOCIAL ,A.GPBR_COD_CATEG_TSV ,A.GPBR_ACTION_ABS ,A.TERMINATION_DT ,A.GPBR_TERM_IND ,A.GPBR_TERM_NOTIF ,CASE WHEN A.GPBR_COD_CATEG = 722 OR A.GPBR_COD_CATEG = 901 THEN ' ' ELSE CASE WHEN C.GPBR_ALIMONY_IND IS NULL THEN '0' ELSE C.GPBR_ALIMONY_IND END END ,CASE WHEN A.GPBR_COD_CATEG = 722 OR A.GPBR_COD_CATEG = 901 THEN 0 ELSE CASE WHEN C.GPBR_ALIMONY_IND = '1' OR C.GPBR_ALIMONY_IND = '3' THEN C.GPBR_FAC_ERN_WAGE ELSE 0 END END ,CASE WHEN A.GPBR_COD_CATEG = 722 OR A.GPBR_COD_CATEG = 901 THEN 0 ELSE CASE WHEN C.GPBR_ALIMONY_IND = '2' OR C.GPBR_ALIMONY_IND = '3' THEN C.GPBR_RSLT_ERN_WAGE ELSE 0 END END ,A.GPBR_TERM_CERT ,A.GPBR_TERM_NUM ,A.GPBR_NOTICE_COMPL ,A.GPBR_TERM_OBS ,A.GPBR_IND_MV ,A.GPBR_ESTAB_IN_TYPE ,A.GPBR_CNPJ_SUC ,A.ASO_DT_BRA ,A.GPBR_MED_CRM ,A.GPBR_STATE ,A.GPBR_VOLUNT_LAYOFF FROM %Table(GPBR_STG_TERM) A ,%Table(GPBR_DRIVER_DAT) B LEFT OUTER JOIN PS_GPBR_TERMA_VW C ON B.GPBR_DRIVER_SEQ = C.GPBR_DRIVER_SEQ AND B.GPBR_DRV_SPLIT_SEQ = C.GPBR_DRV_SPLIT_SEQ WHERE A.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND A.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND B.GPBR_STATUS = 'XRDY' |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | GPBR_DRIVER_SEQ | Number(30,0) | DECIMAL(30) NOT NULL | Driver Sequence |
2 | GPBR_DRV_SPLIT_SEQ | Number(20,0) | DECIMAL(20) NOT NULL | eSocial - Split Sequence |
3 | GPBR_EVENT_ID | Character(40) | VARCHAR2(40) NOT NULL | eSocial - Generate ID Number Governant |
4 | GPBR_RECT | Number(30,0) | DECIMAL(30) NOT NULL | eSocial Ind Calculation |
5 | GPBR_EVENT_CD | Character(6) | VARCHAR2(6) NOT NULL | eSocial - Event Code |
6 | GPBR_RECEIPT_NUM | Character(40) | VARCHAR2(40) NOT NULL | Receipt Num |
7 | GPBR_TP_ENV | Character(1) | VARCHAR2(1) NOT NULL | eSocial Environment Identification |
8 | GPBR_ISSUER | Number(1,0) | SMALLINT NOT NULL | eSocial Issuer |
9 | GPBR_VERSION | Character(9) | VARCHAR2(9) NOT NULL | eSocial version |
10 | GPBR_COMP_INS_TYPE | Character(1) | VARCHAR2(1) NOT NULL | eSocial Company Inscription Type |
11 | ESTAB_ID_BRA | Character(20) | VARCHAR2(20) NOT NULL | Establishment ID Brazil |
12 | NATIONAL_ID | Character(20) | VARCHAR2(20) NOT NULL | National ID |
13 | GPBR_NAT_ID | Character(11) | VARCHAR2(11) NOT NULL | eSocial National ID Number |
14 | GPBR_REG_ESOCIAL | Character(30) | VARCHAR2(30) NOT NULL | eSocial eSocial Register |
15 | GPBR_COD_CATEG_TSV | Number(3,0) | SMALLINT NOT NULL | Category TSV |
16 | GPBR_ACTION_ABS | Character(2) | VARCHAR2(2) NOT NULL |
Absence Type Action Brazil
01=Close 02=Continue After Return |
17 | TERMINATION_DT | Date(10) | DATE | Termination Date |
18 | GPBR_TERM_IND | Character(1) | VARCHAR2(1) NOT NULL |
Termination Indicator (Employee Status)
1=Active Employees 2=Inactive Employees |
19 | GPBR_TERM_NOTIF | Date(10) | DATE | Termination Notification |
20 | GPBR_ALIMONY_IND | Character(1) | VARCHAR2(1) NOT NULL |
Alimony Indicator
0=No Alimony 1=Percentage 2=Amount 3=Percentage and Amount |
21 | GPBR_TERM_PERC | Number(8,2) | DECIMAL(7,2) NOT NULL | eSocial Term Percent |
22 | GPBR_ALIMONY_AMT | Number(17,2) | DECIMAL(16,2) NOT NULL | Alimony Amount |
23 | GPBR_TERM_CERT | Character(32) | VARCHAR2(32) NOT NULL | eSocial Death Certificate |
24 | GPBR_TERM_NUM | Character(20) | VARCHAR2(20) NOT NULL | eSocial Termination Num |
25 | GPBR_NOTICE_COMPL | Character(1) | VARCHAR2(1) NOT NULL |
Prior Notice Compliance information.
0=Full Compliance 1=Partial Compliance by Employee 2=Partial Compliance by Employer 3=Partial Compliance Oth reasons |
26 | GPBR_TERM_OBS | Character(254) | VARCHAR2(254) NOT NULL | eSocial Termination Obs |
27 | GPBR_IND_MV | Number(1,0) | SMALLINT NOT NULL | eSocial Ind Discount |
28 | GPBR_ESTAB_IN_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
eSocial Establishment Inscription Type
1=CNPJ 3=CAEPF 4=CNO |
29 | GPBR_CNPJ_SUC | Character(14) | VARCHAR2(14) NOT NULL | CNPJ Successor |
30 | ASO_DT_BRA | Date(10) | DATE | ASO date. |
31 | GPBR_MED_CRM | Character(8) | VARCHAR2(8) NOT NULL | eSocial CRM |
32 | GPBR_STATE | Character(2) | VARCHAR2(2) NOT NULL | State Code |
33 | GPBR_VOLUNT_LAYOFF | Character(1) | VARCHAR2(1) NOT NULL | Voluntary Layoff Indicator. |