GPBR_MISC04_VW(SQL View) |
Index Back |
---|---|
Periodic eSocial MiscellaneouseSocial XML Framework View Table This record is used to generate informations for eSocial layout S-1210 - Periodic eSocial - Miscellaneous Payments TAG-Group penAlim |
SELECT M03.GPBR_DRIVER_SEQ ,M03.GPBR_DRV_SPLIT_SEQ ,M03.PYMNT_DT ,C.GPBR_PAY_TP ,M03.GPBR_PER_REF ,M03.GPBR_IDE_DMDEV ,M03.GPBR_PIN_NUM_ITEN ,NID.NATIONAL_ID ,REID.BIRTHDATE ,REID.NAME_FORMAL ,SUM(GPBR_RSLT_ERN_WAGE) FROM PS_GPBR_STG_MISC03 M03 , PS_GPBR_RECBEN_REL RE , PS_GPBR_REC_INFO REID , PS_GPBR_REC_NID NID , PS_GPBR_DRIVER_DAT B ,PS_GPBR_STG_MISC01 C WHERE REID.RECIPIENT_ID = RE.RECIPIENT_ID AND NID.RECIPIENT_ID = RE.RECIPIENT_ID AND NID.COUNTRY = 'BRA' AND NID.NATIONAL_ID_TYPE = 'CPF' AND (RE.DEPENDENT_BENEF = USER_FLD1 OR RE.DEPENDENT_BENEF = USER_FLD2 OR RE.DEPENDENT_BENEF = USER_FLD3 OR RE.DEPENDENT_BENEF = USER_FLD4 OR RE.DEPENDENT_BENEF = USER_FLD5) AND RE.RECIPIENT_ID = REID.RECIPIENT_ID AND RE.EMPLID = M03.EMPLID AND RE.EFFDT = ( SELECT MAX(RE2.EFFDT) FROM PS_GPBR_RECBEN_REL RE2 WHERE M03.EMPLID = RE2.EMPLID AND M03.EMPL_RCD = RE2.EMPL_RCD AND RE2.DEPENDENT_BENEF = RE.DEPENDENT_BENEF AND RE2.EFFDT <= M03.PYMNT_DT) AND M03.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND M03.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND M03.GPBR_DRIVER_SEQ = C.GPBR_DRIVER_SEQ AND M03.GPBR_DRV_SPLIT_SEQ = C.GPBR_DRV_SPLIT_SEQ AND M03.EMPLID = C.EMPLID AND M03.EMPL_RCD = C.EMPL_RCD AND M03.GPBR_IDE_DMDEV = %Sql(FUNCLIB_HR_CHAR,C.KEY_SIGN_NUM_01) AND C.PAYMENT_DT = M03.PYMNT_DT AND B.GPBR_STATUS = 'XRDY' AND M03.gpbr_ir_type IN ( '51', '52', '53', '54', '55' ) GROUP BY M03.GPBR_DRIVER_SEQ ,M03.GPBR_DRV_SPLIT_SEQ ,M03.PYMNT_DT ,C.GPBR_PAY_TP ,M03.GPBR_PER_REF ,M03.GPBR_IDE_DMDEV ,M03.GPBR_PIN_NUM_ITEN ,NID.NATIONAL_ID ,REID.BIRTHDATE ,REID.NAME_FORMAL |
# | 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_PER_REF | Character(7) | VARCHAR2(7) NOT NULL | eSocial Reference Period |
6 | GPBR_IDE_DMDEV | Character(30) | VARCHAR2(30) NOT NULL | eSocial Unique payment identifier. |
7 | GPBR_PIN_NUM_ITEN | Character(30) | VARCHAR2(30) NOT NULL | eSocial Wage Code |
8 | NATIONAL_ID | Character(20) | VARCHAR2(20) NOT NULL | National ID |
9 | BIRTHDATE | Date(10) | DATE | Date of Birth |
10 | GPBR_PERS_NAME | Character(70) | VARCHAR2(70) NOT NULL | Used to keep a person name. |
11 | GPBR_VLREC | Number(17,2) | DECIMAL(16,2) NOT NULL | eSocial Payment |