GPES_EXPT_EE_VW(SQL View) |
Index Back |
---|---|
Expatriates' IncomeExpatriate Employee Income |
SELECT A.EMPLID ,A.EMPL_RCD ,A.COMPANY ,A.GPES_TAX_LOCATION ,A.GPES_DAY ,A.GPES_MONTH ,A.GPES_YEAR ,A.GPES_EARNING_TYPE ,A.GPES_FISCAL_KEY ,A.GPES_FISCAL_SUBKEY ,MAX(B.FIRST_NAME) ,MAX(B.LAST_NAME) ,MAX(B.SECOND_LAST_NAME) ,' ' ,SUM(A.GPES_SALARY_INCOME+ A.GPES_SAL_INC_ADJ) ,SUM(A.GPES_SALARY_WITHLD+ A.GPES_SAL_WITH_ADJ) ,0 ,SUM(A.GPES_INK_WITHLD_EE+ A.GPES_INKWITHEE_ADJ) FROM PS_GPES_EXPT_RSLT A , PS_PERSON_NAME B WHERE A.EMPLID = B.EMPLID AND A.EMPLID = ( SELECT X.EMPLID FROM PS_GPES_EXPT_RSLT X WHERE X.EMPLID = A.EMPLID AND X.EMPL_RCD = A.EMPL_RCD AND X.COMPANY = A.COMPANY AND X.GPES_TAX_LOCATION = A.GPES_TAX_LOCATION AND X.GPES_YEAR = A.GPES_YEAR AND %Sql(GPES_TX_MAX_VER_REV_NUM, PS_GPES_EXPT_RSLT, X) GROUP BY EMPLID HAVING SUM(GPES_SALARY_INCOME+ GPES_SAL_INC_ADJ) + SUM(GPES_SALARY_WITHLD+ GPES_SAL_WITH_ADJ) <> 0) AND %Sql(GPES_TX_MAX_VER_REV_NUM, PS_GPES_EXPT_RSLT, A) GROUP BY A.EMPLID,A.EMPL_RCD,A.COMPANY ,A.GPES_TAX_LOCATION ,A.GPES_DAY ,A.GPES_MONTH ,A.GPES_YEAR ,A.GPES_EARNING_TYPE ,A.GPES_FISCAL_KEY ,A.GPES_FISCAL_SUBKEY HAVING SUM(A.GPES_SALARY_INCOME+ A.GPES_SAL_INC_ADJ) + SUM(A.GPES_SALARY_WITHLD+ A.GPES_SAL_WITH_ADJ) <> 0 |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | EMPLID | Character(11) | VARCHAR2(11) NOT NULL | Employee ID |
2 | EMPL_RCD | Number(3,0) | SMALLINT NOT NULL | Empl Record |
3 | COMPANY | Character(3) | VARCHAR2(3) NOT NULL | Company |
4 | GPES_TAX_LOCATION | Character(5) | VARCHAR2(5) NOT NULL | Fiscal Territory. This field is used to populate the GP Write Array, which is used to generate the Tax Reports. |
5 | GPES_DAY | Number(2,0) | SMALLINT NOT NULL | Payment Day |
6 | GPES_MONTH | Number(2,0) | SMALLINT NOT NULL | Month |
7 | GPES_YEAR | Number(4,0) | SMALLINT NOT NULL | Year |
8 | GPES_EARNING_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
Earning Type
D=Monetary E=In kind |
9 | GPES_FISCAL_KEY | Character(2) | VARCHAR2(2) NOT NULL | Fiscal key. Used to identify the earnings. |
10 | GPES_FISCAL_SUBKEY | Character(2) | VARCHAR2(2) NOT NULL | Fiscal sub-key. Used to identify the earnings. |
11 | FIRST_NAME | Character(30) | VARCHAR2(30) NOT NULL | First Name |
12 | LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Last Name |
13 | SECOND_LAST_NAME | Character(30) | VARCHAR2(30) NOT NULL | Second Last Name |
14 | GPES_RESID_COUNTRY | Character(3) | VARCHAR2(3) NOT NULL | Country of Residence |
15 | GPES_SALARY_INCOME | Signed Number(17,2) | DECIMAL(15,2) NOT NULL | Salary Income. |
16 | GPES_SALARY_WITHLD | Signed Number(17,2) | DECIMAL(15,2) NOT NULL | Salary Withholding. |
17 | GPES_TAX_PCT | Number(6,2) | DECIMAL(5,2) NOT NULL | Withholding percentage calculated. This field is used to populate the GP Write Array, which is used to generate the Tax Reports. |
18 | GPES_INK_WITHLD_EE | Signed Number(17,2) | DECIMAL(15,2) NOT NULL | Contribution (payee) as in-kind withholding. |