C360_DS_P3_SRCH

(SQL View)
Index Back

Outstanding Payments 1


SELECT S.SETID ,A.CUST_ID ,B.DEPOSIT_BU , B.DEPOSIT_ID , B.PAYMENT_SEQ_NUM , B.PAYMENT_ID , 'PMT' , B.PAYMENT_ID ,B.PAYMENT_METHOD , B.ENTRY_DT , ' ' , B.PAYMENT_STATUS ,A.BUSINESS_UNIT ,A.ITEM ,A.ITEM_LINE ,B.PAYMENT_AMT ,B.PAYMENT_CURRENCY FROM PS_PAYMENT_ID_ITEM A , PS_PAYMENT B , PS_SET_CNTRL_REC S , PSXLATITEM X WHERE ((A.BUSINESS_UNIT <> ' ' AND A.CUST_ID <> ' ' AND S.SETCNTRLVALUE = A.BUSINESS_UNIT AND S.RECNAME = 'CUSTOMER') OR ( A.BUSINESS_UNIT = ' ' AND A.CUST_ID <> ' ' AND S.SETCNTRLVALUE = B.DEPOSIT_BU AND S.RECNAME = 'CUSTOMER')) AND A.DEPOSIT_BU = B.DEPOSIT_BU AND A.DEPOSIT_ID = B.DEPOSIT_ID AND A.PAYMENT_SEQ_NUM = B.PAYMENT_SEQ_NUM AND (B.GROUP_ID = ' ' OR (B.GROUP_ID <> ' ' AND NOT EXISTS ( SELECT 'X' FROM PS_GROUP_CONTROL WHERE GROUP_BU = B.DEPOSIT_BU AND GROUP_ID = B.GROUP_ID AND POST_STATUS = 'C' ) ) ) AND X.FIELDNAME = 'PAYMENT_STATUS' AND X.FIELDVALUE = B.PAYMENT_STATUS AND X.EFFDT = ( SELECT MAX(effdt) FROM PSXLATITEM WHERE FIELDNAME = 'PAYMENT_STATUS' AND FIELDVALUE = B.PAYMENT_STATUS AND effdt <= %CurrentDateIn AND eff_status='A')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SETID Character(5) VARCHAR2(5) NOT NULL SetID
2 CUST_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies an organizational entity that purchases goods or services from the enterprise. Represents the sold-to customer which is the customer organization that places orders. The CUST_ID may or may not be the same as the identifiers for the bill-to and ship-to locations.
3 DEPOSIT_BU Character(5) VARCHAR2(5) NOT NULL Identifies the business unit to which a deposit is posted.
4 DEPOSIT_ID Character(15) VARCHAR2(15) NOT NULL Uniquely identifies a deposit of customer payments. The deposit ID can be manually assigned or system-generated.
5 PAYMENT_SEQ_NUM Number(6,0) INTEGER NOT NULL Specifies the system-generated sequence number assigned to each payment as it is entered in a deposit.
6 C360_DOC_ID Character(25) VARCHAR2(25) NOT NULL Document ID
7 C360_DOC_TYPE Character(3) VARCHAR2(3) NOT NULL Document Type
CNT=Contract
INV=Invoice
ITM=Item
PMT=Payment
RFQ=Quotation
RMA=Returned Material
SO=Sales Order
8 PAYMENT_ID Character(15) VARCHAR2(15) NOT NULL Identifies a customer payment. This is usually a check number but may be some other identifying number.
9 PAYMENT_METHOD Character(3) VARCHAR2(3) NOT NULL Specifies the preferred method of payment by a customer. Examples of payment method are check direct debit and draft. 10/28/2003 edw 655070000 - Removed LTC and CSH xlats.
ACH=ACH
CC=Credit Card
CHK=Check
CSH=Cash
DD=Direct Debit
DR=Draft
EC=Electronic Check
EFT=Electronic Fund Transfer
GE=Giro - EFT
PL=PayPal
WIR=Wire Report
10 DOCSTAT_DATE Date(10) DATE Document Date
11 DESCR Character(30) VARCHAR2(30) NOT NULL Description
12 STATUS_FIELD Character(30) VARCHAR2(30) NOT NULL Payment Status
13 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
14 ITEM Character(30) VARCHAR2(30) NOT NULL Uniquely identifies an invoice credit memo or debit memo. The item ID is also called the invoice number.
15 ITEM_LINE Number(6,0) INTEGER NOT NULL Item Line
16 PAYMENT_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount of a customer payment.
17 PAYMENT_CURRENCY Character(3) VARCHAR2(3) NOT NULL Identifies the currency of a customer payment. This is generally the same as the currency specified for the deposit but it can be different.