GST_ORDER_VW1(SQL View) |
Index Back |
---|---|
View for advance paymentView for orders for advance payment |
SELECT SCH.ORDER_NO , SCH.BUSINESS_UNIT , H.SOLD_TO_CUST_ID , S.NAME1 , SUM((SCH.QTY_SCHEDULED * SCH.NET_UNIT_PRICE)) , %Round(SUM((SCH.QTY_SCHEDULED * SCH.NET_UNIT_PRICE) * (H.ADDTL_ADJUST_PCT * 0.01)+ H.ADDTL_ADJUST_AMT),0) , H.CURRENCY_CD_BASE FROM PS_ORD_HEADER H , PS_ORD_LINE L , PS_ORD_SCHEDULE SCH , PS_CUSTOMER S , PS_SET_CNTRL_REC D WHERE H.BUSINESS_UNIT = SCH.BUSINESS_UNIT AND H.ORDER_NO =SCH.ORDER_NO AND H.BUSINESS_UNIT = L.BUSINESS_UNIT AND H.ORDER_NO = L.ORDER_NO AND L.BUSINESS_UNIT = SCH.BUSINESS_UNIT AND L.ORDER_NO = SCH.ORDER_NO AND L.ORDER_INT_LINE_NO = SCH.ORDER_INT_LINE_NO AND L.ORD_LINE_STATUS <> 'X' AND SCH.ORD_SCH_STATUS <> 'X' AND H.SOLD_TO_CUST_ID = S.CUST_ID AND H.BUSINESS_UNIT = D.SETCNTRLVALUE AND S.SETID = D.SETID AND D.RECNAME = 'CUSTOMER' AND H.BUSINESS_UNIT = ( SELECT DISTINCT P.BUSINESS_UNIT FROM PS_ORG_BU_TAX_APPL P WHERE P.ORG_BU_TYPE IN ('OM','AR') AND P.STX_OTC_APPL = 'Y' AND P.BUSINESS_UNIT = H.BUSINESS_UNIT AND SCH.BUSINESS_UNIT = P.BUSINESS_UNIT) GROUP BY SCH.ORDER_NO , SCH.BUSINESS_UNIT , H.SOLD_TO_CUST_ID , S.NAME1 , H.CURRENCY_CD_BASE |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | ORDER_NO | Character(10) | VARCHAR2(10) NOT NULL | Identifies a customer order number that appears as a reference on a receivables pending item. Date Initials Issue Description 022701 mv SP2 (F-CJORGENS-3) CSR Desktop |
2 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL | Business Unit |
3 | 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. |
4 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
5 | LIST_PRICE | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | List Price |
6 | PRICE | Signed Number(16,4) | DECIMAL(14,4) NOT NULL | This is price per unit for calculating the service charge. |
7 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |