APB_PY_S_1DS_VW(SQL View) |
Index Back |
---|---|
APBU Pay Trms Simple/1 Dsc VwMaintenance Note: This SQL View is designed for specific use in AP Payment Terms processing; it returns AP Business Unit/Payment Terms code combinations for all Payment Terms codes with the following attributes: (1) Single-Payment Terms only; (2) No Split-Payment Terms; (3) 1-Only Discount Terms (i.e, No "Tiered" Discounts); and (4) Corresponding Net Due Date & Discount Due Date Timing Codes are simple 'N' option ("Basis Date Only") with Timing Day Increment Days only (i.e., no Month or Year increment factors defined). |
SELECT A.BUSINESS_UNIT , A.PYMNT_TERMS_CD , B.NET_TRMS_SEQ_NBR , B.BASIS_FROM_DAY , B.BASIS_TO_DAY , C.TMG_DAY_INCR_VAL , D.DSCNT_TRMS_PERCENT , D.DSCNT_TRMS_AMOUNT , D.TERMS_ADJUST_DAYS , E.TMG_DAY_INCR_VAL + D.TERMS_ADJUST_DAYS FROM PS_APBU_PYT_EFF_VW A , PS_PYMT_TRMS_NET B , PS_PYTR_TM_DAYS_VW C , PS_PYMT_TRMS_DSCNT D , PS_PYTR_TM_DAYS_VW E WHERE A.PYMNT_TERMS_TYPE = 'S' AND A.NBR_OF_TERMS = 1 AND B.SETID = A.SETID AND B.PYMNT_TERMS_CD = A.PYMNT_TERMS_CD AND B.EFFDT = A.EFFDT AND B.DSC_TRMS_AVAIL_FLG = 'Y' AND C.SETID = B.SETID AND C.PAY_TRMS_TIME_ID = B.NET_TRMS_TIME_ID AND D.SETID = B.SETID AND D.PYMNT_TERMS_CD = B.PYMNT_TERMS_CD AND D.EFFDT = B.EFFDT AND 1 = ( SELECT COUNT(*) FROM PS_PYMT_TRMS_DSCNT I WHERE I.SETID = D.SETID AND I.PYMNT_TERMS_CD = D.PYMNT_TERMS_CD AND I.EFFDT = D.EFFDT) AND E.SETID = D.SETID AND E.PAY_TRMS_TIME_ID = D.DSCNT_TRMS_TIME_ID |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
2 | PYMNT_TERMS_CD | Character(5) | VARCHAR2(5) NOT NULL | Specifies how the payment due date and discount due date are calculated. A payment terms code is associated with various business units bill-to customers vendors as well as sales orders purchase orders and vouchers. |
3 | NET_TRMS_SEQ_NBR | Number(2,0) | SMALLINT NOT NULL | Net Terms Sequence Number |
4 | BASIS_FROM_DAY | Number(2,0) | SMALLINT NOT NULL | Basis From Day |
5 | BASIS_TO_DAY | Number(2,0) | SMALLINT NOT NULL | Basis To Day |
6 | NET_DUE_ADD_DAYS | Signed Number(4,0) | DECIMAL(3) NOT NULL | Net Due Date Days Increment |
7 | DSCNT_TRMS_PERCENT | Signed Number(13,8) | DECIMAL(11,8) NOT NULL | Discount Terms Percent |
8 | DSCNT_TRMS_AMOUNT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Discount Terms Amount |
9 | TERMS_ADJUST_DAYS | Signed Number(4,0) | DECIMAL(3) NOT NULL | Terms Adjustment Days |
10 | DSC_DUE_ADD_DAYS | Signed Number(4,0) | DECIMAL(3) NOT NULL | Dscnt Due Date Days Increment |