AP_DISCTAKE_VW1

(SQL View)
Index Back

Discount Taken View

Discount Taken View

SELECT B.VENDOR_SETID , B.VENDOR_ID , B.BUSINESS_UNIT , B.VOUCHER_ID , B.TXN_CURRENCY_CD , P.PYMNT_DT , SUM(A.DSCNT_PAY_AMT) , COUNT(DISTINCT A.VOUCHER_ID) FROM PS_PYMNT_VCHR_XREF A , PS_VOUCHER B , PS_PAYMENT_TBL P WHERE A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.VOUCHER_ID = B.VOUCHER_ID AND A.PYMNT_ID = P.PYMNT_ID AND A.DSCNT_PAY_AMT > 0 AND ((A.PAID_AMT_GROSS - A.PAID_AMT) = A.PAID_AMT_DSCNT) AND P.CANCEL_ACTION NOT IN ('C','H','R','S','W') AND P.PYMNT_DT <= %CurrentDateIn GROUP BY B.VENDOR_SETID, B.VENDOR_ID, B.BUSINESS_UNIT, B.VOUCHER_ID, B.TXN_CURRENCY_CD, P.PYMNT_DT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
2 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
3 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
4 VOUCHER_ID Character(8) VARCHAR2(8) NOT NULL Voucher ID
5 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
6 PYMNT_DT Date(10) DATE Payment Date
7 DSCNT_PAY_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Payment Discount Amount
8 TOTALROWS Number(7,0) INTEGER NOT NULL Row number