EX_PY_ADV_VW

(SQL View)
Index Back

Payroll advances view

Payroll advances view

SELECT A.ADVANCE_ID ,B.EX_PYRL_STATUS ,A.ADVANCE_NAME ,A.EMPLID ,A.CREATION_DT ,A.CREATION_DT ,B.REJECTED_REASON ,SUM(B.PAID_AMT) ,B.CURRENCY_PYMNT ,'A' FROM PS_EX_ADV_HDR A , PS_EX_ADVNCE_PYMNT B WHERE A.ADVANCE_ID = B.ADVANCE_ID AND B.EX_PYMNT_TYPE = 'A' AND B.EX_PYMNT_DEST = 'P' AND B.SEQ_NBR = ( SELECT MAX(X.SEQ_NBR) FROM PS_EX_ADVNCE_PYMNT X WHERE X.ADVANCE_ID = A.ADVANCE_ID AND X.EX_PYMNT_TYPE = 'A' AND X.EX_PYMNT_DEST = 'P') GROUP BY A.ADVANCE_ID ,B.EX_PYRL_STATUS ,A.ADVANCE_NAME ,A.EMPLID ,A.CREATION_DT ,A.CREATION_DT ,B.REJECTED_REASON ,B.CURRENCY_PYMNT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 ADVANCE_ID Character(10) VARCHAR2(10) NOT NULL Advance ID
2 EX_PYRL_STATUS Character(1) VARCHAR2(1) NOT NULL Expense Payroll Status
F=Confirmed by Payroll
N=None
P=Published to Payroll
R=Rejected by Payroll
T=In Process
V=Reversal
3 ADVANCE_NAME Character(30) VARCHAR2(30) NOT NULL Advance Description
4 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
5 FROM_DATE Date(10) DATE From Date
6 THRU_DATE Date(10) DATE Through Date
7 REJECTED_REASON Character(2) VARCHAR2(2) NOT NULL Rejected Reason
01=Invalid Earnings Code
02=Invalid Empl. ID or Empl. Rec#
03=Invalid Currency Code
04=Problem Loading Transaction
05=Transaction Already Exist
06=Other line(s) rejected.
8 MONETARY_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the monetary amount of a debit or credit in the business unit base currency. Debit entries are positive and credit entries are negative. This amount is only zero if associated with a statistical account.
9 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
10 EX_DOC_TYPE Character(1) VARCHAR2(1) NOT NULL Identifies Expenses Document Type
A=Cash Advance
C=Time Report
J=Time Adjustment
M=Accrual - My Wallet
R=Accrual - Expense Report
S=Expense Report
T=Travel Authorization