GPBR_MISC01_VW

(SQL View)
Index Back

Periodic eSocial Miscellaneous

eSocial XML Framework View Table This record is used to generate informations for eSocial layout S-1210 - Periodic eSocial - Miscellaneous Payments TAG-Group infoPgto

SELECT B.GPBR_DRIVER_SEQ , B.GPBR_DRV_SPLIT_SEQ , A.PAYMENT_DT , A.GPBR_PAY_TP , A.GPBR_IND_RESBR , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.COUNTRY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_IND_BENEF ELSE 0 END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_NIF_BENEF ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.NUM1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS2 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS3 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.CITY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.STATE ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.POSTAL ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.INC_TAX_TP_CD_BRA ELSE ' ' END FROM PS_GPBR_STG_MISC01 A , PS_GPBR_STG_MISC M , PS_GPBR_DRIVER_DAT B WHERE M.GPBR_DRIVER_SEQ = A.GPBR_DRIVER_SEQ AND M.GPBR_DRV_SPLIT_SEQ = A.GPBR_DRV_SPLIT_SEQ AND A.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND A.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND B.GPBR_STATUS = 'XRDY' GROUP BY B.GPBR_DRIVER_SEQ, B.GPBR_DRV_SPLIT_SEQ, A.PAYMENT_DT, A.GPBR_PAY_TP, A.GPBR_IND_RESBR, CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.COUNTRY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_IND_BENEF ELSE 0 END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_NIF_BENEF ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.NUM1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS2 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS3 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.CITY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.STATE ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.POSTAL ELSE ' ' END, CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.INC_TAX_TP_CD_BRA ELSE ' ' END UNION SELECT B.GPBR_DRIVER_SEQ , B.GPBR_DRV_SPLIT_SEQ , A.PYMNT_DT , A.GPBR_PAY_TP , A.GPBR_IND_RESBR , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.COUNTRY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_IND_BENEF ELSE 0 END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_NIF_BENEF ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.NUM1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS2 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS3 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.CITY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.STATE ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.POSTAL ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.INC_TAX_TP_CD_BRA ELSE ' ' END FROM PS_GPBR_STG_MISC05 A , PS_GPBR_STG_MISC M , PS_GPBR_DRIVER_DAT B WHERE M.GPBR_DRIVER_SEQ = A.GPBR_DRIVER_SEQ AND M.GPBR_DRV_SPLIT_SEQ = A.GPBR_DRV_SPLIT_SEQ AND A.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND A.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND B.GPBR_STATUS = 'XRDY' GROUP BY B.GPBR_DRIVER_SEQ, B.GPBR_DRV_SPLIT_SEQ, A.PYMNT_DT, A.GPBR_PAY_TP, A.GPBR_IND_RESBR, CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.COUNTRY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_IND_BENEF ELSE 0 END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.GPBR_NIF_BENEF ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.NUM1 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS2 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.ADDRESS3 ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.CITY ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.STATE ELSE ' ' END , CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.POSTAL ELSE ' ' END, CASE WHEN %DateIn(M.GPBR_CAL_PRD_ID %Concat '-01') >= %DateIn('2023-03-01') THEN A.INC_TAX_TP_CD_BRA ELSE ' ' END

# 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 PYMNT_DT Date(10) DATE Date the payment should be sent to the bank for execution
4 GPBR_PAY_TP Character(1) VARCHAR2(1) NOT NULL Patyment TP
0=N/A
1=Payroll
2=Termination
3=Term Non Empl
7=Vacation
5 GPBR_IND_RESBR Character(1) VARCHAR2(1) NOT NULL eSocial Live Abroad
6 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country
7 GPBR_IND_BENEF Number(1,0) SMALLINT NOT NULL eSocial Nif Beneficiary
8 GPBR_NIF_BENEF Character(20) VARCHAR2(20) NOT NULL eSocial Nif Beneficiary
9 ADDRESS1 Character(55) VARCHAR2(55) NOT NULL Address 1
10 NUM1 Character(6) VARCHAR2(6) NOT NULL Number 1
11 ADDRESS2 Character(55) VARCHAR2(55) NOT NULL Address 2
12 ADDRESS3 Character(55) VARCHAR2(55) NOT NULL Address 3
13 CITY Character(30) VARCHAR2(30) NOT NULL City
14 STATE Character(6) VARCHAR2(6) NOT NULL State
15 POSTAL Character(12) VARCHAR2(12) NOT NULL Postal
16 INC_TAX_TP_CD_BRA Character(2) VARCHAR2(2) NOT NULL Income Tax Type Abroad Code.