GPES_TAX2_SM_VW

(SQL View)
Index Back

Tax View

Tax View

SELECT A.EMPLID , A.EMPL_RCD , A.GPES_YEAR , A.GPES_MONTH , A.COMPANY , A.GPES_TAX_LOCATION , A.GPES_FISCAL_KEY , A.GPES_FISCAL_SUBKEY , A.GPES_YEAR_RETRO , SUM( B.GPES_SALARY_INCOME + B.GPES_SAL_INC_ADJ) , SUM (B.GPES_TAX_INC_VR1 + B.GPES_TAX_INC_VR2 + B.GPES_TAX_INC_VR3 + B.GPES_TAX_INCVR_ADJ) , SUM( B.GPES_SALARY_WITHLD + B.GPES_SAL_WITH_ADJ) , SUM( B.GPES_INKIND_INCOME + B.GPES_INK_INC_ADJ) , SUM( B.GPES_INKIND_WITHLD + B.GPES_INK_WITH_ADJ) , SUM( B.GPES_INK_WITHLD_EE + B.GPES_INKWITHEE_ADJ) , SUM( B.GPES_REDUCTIONS + B.GPES_REDCTIONS_ADJ) , SUM( B.GPES_GARN_SPOUSE + B.GPES_GARN_SPSE_ADJ) , SUM( B.GPES_GARN_CHILDREN + B.GPES_GARN_CHLD_ADJ) , SUM( B.GPES_SSTC_CT_EE + B.GPES_SS_CT_EE_ADJ) , MAX( A.GPES_CEUTA_MELILLA) FROM PS_GPES_TAX2_RSLT A , PS_GPES_TAX2_RSLT B WHERE A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND A.CAL_ID = ( SELECT MAX(CAL_ID) FROM PS_GPES_TAX2_RSLT WHERE EMPLID = A.EMPLID AND EMPL_RCD = A.EMPL_RCD AND GPES_YEAR = A.GPES_YEAR AND GPES_MONTH = A.GPES_MONTH AND GPES_FISCAL_KEY = A.GPES_FISCAL_KEY AND GPES_FISCAL_SUBKEY = A.GPES_FISCAL_SUBKEY AND A.GPES_TAX_TYPE = 'R') AND A.RSLT_SEG_NUM = ( SELECT MAX(RSLT_SEG_NUM) FROM PS_GPES_TAX2_RSLT WHERE EMPLID = A.EMPLID AND EMPL_RCD = A.EMPL_RCD AND CAL_RUN_ID = A.CAL_RUN_ID AND GP_PAYGROUP = A.GP_PAYGROUP AND CAL_ID = A.CAL_ID AND ORIG_CAL_RUN_ID = A.ORIG_CAL_RUN_ID AND GPES_YEAR = A.GPES_YEAR AND GPES_MONTH = A.GPES_MONTH) AND A.COMPANY = B.COMPANY AND A.GPES_TAX_LOCATION = B.GPES_TAX_LOCATION AND A.GPES_YEAR = B.GPES_YEAR AND B.GPES_MONTH <= A.GPES_MONTH AND A.GPES_FISCAL_KEY = B.GPES_FISCAL_KEY AND A.GPES_FISCAL_SUBKEY = B.GPES_FISCAL_SUBKEY AND A.GPES_YEAR_RETRO = B.GPES_YEAR_RETRO AND A.GPES_MONTH_RETRO = B.GPES_MONTH_RETRO AND %Sql(GPES_TX_MAX_VER_REV_NUM, PS_GPES_TAX2_RSLT, A) AND %Sql(GPES_TX_MAX_VER_REV_NUM, PS_GPES_TAX2_RSLT, B) GROUP BY A.EMPLID, A.EMPL_RCD, A.GPES_YEAR, A.GPES_MONTH, A.COMPANY, A.GPES_TAX_LOCATION, A.GPES_FISCAL_KEY, A.GPES_FISCAL_SUBKEY, A.GPES_YEAR_RETRO

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID

Prompt Table: GPES_EMP_ORG_VW

2 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record

Prompt Table: EMPLOYMENT

3 GPES_YEAR Number(4,0) SMALLINT NOT NULL Year
4 GPES_MONTH Number(2,0) SMALLINT NOT NULL Month
5 COMPANY Character(3) VARCHAR2(3) NOT NULL Company

Prompt Table: COMPANY_TBL

6 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.

Prompt Table: GPES_TAX_LOCATN

7 GPES_FISCAL_KEY Character(2) VARCHAR2(2) NOT NULL Fiscal key. Used to identify the earnings.

Prompt Table: GPES_PERCEP_KEY

8 GPES_FISCAL_SUBKEY Character(2) VARCHAR2(2) NOT NULL Fiscal sub-key. Used to identify the earnings.

Prompt Table: GPES_PERCP_SKEY

9 GPES_YEAR_RETRO Number(4,0) SMALLINT NOT NULL Year Retro
10 GPES_SALARY_INCOME Signed Number(17,2) DECIMAL(15,2) NOT NULL Salary Income.
11 GPES_TAX_INC_VR Signed Number(17,2) DECIMAL(15,2) NOT NULL Variable income total
12 GPES_SALARY_WITHLD Signed Number(17,2) DECIMAL(15,2) NOT NULL Salary Withholding.
13 GPES_INKIND_INCOME Signed Number(17,2) DECIMAL(15,2) NOT NULL Total amount earned as in kind income.
14 GPES_INKIND_WITHLD Signed Number(17,2) DECIMAL(15,2) NOT NULL Contribution (payee + employer) as in-kind withholding.
15 GPES_INK_WITHLD_EE Signed Number(17,2) DECIMAL(15,2) NOT NULL Contribution (payee) as in-kind withholding.
16 GPES_REDUCTIONS Number(16,2) DECIMAL(15,2) NOT NULL Taxes reductions
17 GPES_GARN_SPOUSE Number(16,2) DECIMAL(15,2) NOT NULL Amount paid by the payee in concept of garnishment for spouse alimony.
18 GPES_GARN_CHILDREN Number(16,2) DECIMAL(15,2) NOT NULL Amount paid by the payee in concept of garnishment for children alimony.
19 GPES_SSTC_CT_EE Signed Number(17,2) DECIMAL(15,2) NOT NULL Employee Social Security Contributions. This field is used to populate the GP Write Array, which is used to generate the FAN File.
20 GPES_CEUTA_MELILLA Character(1) VARCHAR2(1) NOT NULL Payee is working in Spanish cities Ceuta or Melilla. This cities has a special tax status.

Y/N Table Edit