CUST_DRAFTS_VW

(SQL View)
Index Back

Cust Drafts for Credit Avail

Date Initials Issue # Description 042605 JJM 1267275000 Created view for draft rowset to calculate draft balance.

SELECT SCR.SETID , DC.CUST_ID , DC.DRAFT_STATUS , DC.DRAFT_DUE_DT , DC.CREATE_PEND_ITEMS , DC.CURRENCY_CD , SUM(DC.DRAFT_AMT) FROM PS_DRAFT_CONTROL DC , PS_SET_CNTRL_REC SCR WHERE DC.DRAFT_BU = SCR.SETCNTRLVALUE AND SCR.RECNAME = 'CUSTOMER' AND DC.DRAFT_STATUS IN ('A','L','T','R','M','P','I','D') GROUP BY SCR.SETID , DC.CUST_ID , DC.DRAFT_STATUS , DC.DRAFT_DUE_DT , DC.CREATE_PEND_ITEMS, DC.CURRENCY_CD

# 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 DRAFT_STATUS Character(1) VARCHAR2(1) NOT NULL Draft Status
A=Accepted
C=Complete
D=Dishonored
E=Void
I=Identified
L=Collateral
M=Discounted
N=No Action
P=Pending
R=Remitted
T=Endorsed
4 DRAFT_DUE_DT Date(10) DATE Draft Due Date
5 CREATE_PEND_ITEMS Character(1) VARCHAR2(1) NOT NULL Create Pending Items
A=Do Not Post
L=Batch Standard
N=Batch Priority
6 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
7 DRAFT_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount of a draft payment. This field is maintained by the Draft Creation process.