GPBR_MISC02_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 detPgtoFl |
SELECT B.GPBR_DRIVER_SEQ , B.GPBR_DRV_SPLIT_SEQ , A.PAYMENT_DT , A.GPBR_PAY_TP , CASE WHEN A.GPBR_PAY_TP='1' OR A.GPBR_PAY_TP='2' OR A.GPBR_PAY_TP='3' OR A.GPBR_PAY_TP='5' THEN CASE WHEN A.GPBR_ES_PERIOD_TP2 = '1' OR A.GPBR_PAY_TP='2' OR A.GPBR_PAY_TP='3' THEN %Sql(GPBR_YEAR_OF_DATE,A.PERIOD_BEGIN_DT) %Concat '-' %Concat %Sql(GPBR_MONTH_OF_DATE,A.PERIOD_BEGIN_DT) ELSE %Sql(GPBR_YEAR_OF_DATE,A.PERIOD_BEGIN_DT) END ELSE ' ' END , %Sql(FUNCLIB_HR_CHAR, A.KEY_SIGN_NUM_01) , MAX('S') , CASE WHEN SUM(A.GPBR_NET_ERN_VAL) < 0 THEN 0 ELSE SUM(A.GPBR_NET_ERN_VAL) END , MAX(CASE WHEN E.GPBR_RECEIPT_NUM IS NOT NULL THEN E.GPBR_RECEIPT_NUM ELSE ' ' END) , A.GPBR_DATE1 FROM %Table(GPBR_STG_MISC01) A LEFT OUTER JOIN %Table(GPBR_DRIVER_DAT) E ON A.GPBR_PRE_DRV_SEQ = E.GPBR_DRIVER_SEQ , %Table(GPBR_DRIVER_DAT) B , %Table(GPBR_DRVCMP_XRF) XRF WHERE A.GPBR_DRIVER_SEQ = B.GPBR_DRIVER_SEQ AND A.GPBR_DRV_SPLIT_SEQ = B.GPBR_DRV_SPLIT_SEQ AND XRF.GPBR_DRIVER_SEQ = A.GPBR_DRIVER_SEQ AND B.GPBR_EVENT_CD = 'S-1210' AND B.GPBR_STATUS = 'XRDY' AND A.GPBR_PAY_TP <> '9' GROUP BY B.GPBR_DRIVER_SEQ, B.GPBR_DRV_SPLIT_SEQ, A.PAYMENT_DT, A.GPBR_PAY_TP, CASE WHEN A.GPBR_PAY_TP = '1' OR A.GPBR_PAY_TP = '2' OR A.GPBR_PAY_TP = '3' OR A.GPBR_PAY_TP = '5' THEN CASE WHEN A.GPBR_ES_PERIOD_TP2 = '1' OR A.GPBR_PAY_TP = '2' OR A.GPBR_PAY_TP = '3' THEN %Sql(GPBR_YEAR_OF_DATE,A.PERIOD_BEGIN_DT) %Concat '-' %Concat %Sql(GPBR_MONTH_OF_DATE,A.PERIOD_BEGIN_DT) ELSE %Sql(GPBR_YEAR_OF_DATE,A.PERIOD_BEGIN_DT) END ELSE ' ' END, A.PERIOD_BEGIN_DT, %Sql(FUNCLIB_HR_CHAR, A.KEY_SIGN_NUM_01), A.GPBR_DATE1 HAVING CASE WHEN SUM(A.GPBR_NET_ERN_VAL) < 0 THEN 0 ELSE SUM(A.GPBR_NET_ERN_VAL) END >= 0 |
# | 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_PAYROLL_TP | Character(1) | VARCHAR2(1) NOT NULL |
Payroll TP
0=N/A 1=Monthly 2=Annual |
8 | GPBR_NET_ERN_VAL | Number(17,2) | DECIMAL(16,2) NOT NULL | Net Earned Value. |
9 | GPBR_REC_FILE | Character(40) | VARCHAR2(40) NOT NULL | eSocial File Receipt |
10 | GPBR_DATE1 | Date(10) | DATE | Date 1 |