EM_POITMSRCH_VW(SQL View) |
Index Back |
---|
SELECT I.OPRID , E.VENDOR_SETID , F.VENDOR_ID , E.BUSINESS_UNIT , E.PO_ID , D.LINE_NBR , G.SCHED_NBR , E.PO_DT , F.NAME1 , E.ORIGIN , E.PYMNT_TERMS_CD , E.CURRENCY_CD , A.SETID , A.INV_ITEM_ID , B.DESCR , %Round(G.qty_po - H.qty_matched,4) , G.PRICE_PO , D.UNIT_OF_MEASURE , D.CNTRCT_ID , D.VERSION_NBR , D.CNTRCT_LINE_NBR , D.CAT_LINE_NBR , D.RELEASE_NBR , %Round(%DecMult((G.qty_po - H.qty_matched), G.PRICE_PO) ,3) , E.CURRENCY_CD , E.BUYER_ID ,G.SHIPTO_ID , G.VAT_APPLICABILITY , G.TAX_CD_VAT , G.VAT_TXN_TYPE_CD , G.VAT_USE_ID , G.TAX_VAT_FLG , G.TAX_FRGHT_FLG , G.TAX_MISC_FLG , G.VAT_TREATMENT , G.VAT_TREATMENT_GRP , G.FREIGHT_TERMS , G.ULTIMATE_USE_CD , D.PHYSICAL_NATURE , G.VAT_RCRD_INPT_FLG , G.VAT_RCRD_OUTPT_FLG , G.VAT_DCLRTN_POINT , G.VAT_CALC_GROSS_NET , G.VAT_CALC_FRGHT_FLG , G.VAT_CALC_MISC_FLG , G.VAT_RECALC_FLG , G.VAT_EXCPTN_TYPE , G.VAT_EXCPTN_CERTIF , G.COUNTRY_SHIP_TO , G.COUNTRY_SHIP_FROM , G.COUNTRY_VAT_BILLTO , G.COUNTRY_VAT_BILLFR , G.COUNTRY_VAT_PERFRM , G.COUNTRY_LOC_BUYER , G.COUNTRY_LOC_SELLER , G.COUNTRY_VAT_SUPPLY , G.STATE_LOC_BUYER , G.STATE_LOC_SELLER , G.STATE_SHIP_FROM , G.STATE_SHIP_TO , G.STATE_VAT_DEFAULT , G.STATE_VAT_PERFRM , G.STATE_VAT_SUPPLY , G.VAT_RGSTRN_SELLER , G.VAT_CALC_TYPE , G.VAT_ROUND_RULE , D.CATEGORY_ID , G.SHIP_TYPE_ID , D.MFG_ID , D.MFG_ITM_ID , D.UPN_TYPE_CD , D.UPN_ID FROM PS_ITM_VENDOR A , PS_PURCH_ITEM_ATTR B , PS_MASTER_ITEM_TBL C , PS_PO_LINE_FS D , PS_PO_HDR_FS E , PS_VENDOR F , ps_po_line_ship_fs G , ps_po_ln_ship_mtch H , PS_VENDOR_USER I , PS_EM_SLR_PO_BU_VW K WHERE I.VENDOR_ID = E.VENDOR_ID AND A.SETID = B.SETID AND A.INV_ITEM_ID = B.INV_ITEM_ID AND B.SETID = C.SETID AND B.INV_ITEM_ID = C.INV_ITEM_ID AND E.VENDOR_SETID = F.SETID AND E.VENDOR_ID = F.VENDOR_ID AND A.VENDOR_SETID = E.VENDOR_SETID AND A.VENDOR_ID = E.VENDOR_ID AND D.BUSINESS_UNIT = E.BUSINESS_UNIT AND D.PO_ID = E.PO_ID AND D.INV_ITEM_ID = A.INV_ITEM_ID AND D.ITM_SETID = A.SETID AND C.ITM_STATUS_CURRENT = '1' AND ((%CurrentDateIn >= B.PO_AVAIL_DT) AND (B.PO_UNAVAIL_DT > %CurrentDateIn)) AND ((E.PO_STATUS IN ('D','X','PX')) OR ((E.CHNG_ORD_BATCH > 0) AND (E.PO_STATUS IN ('A','PA','O'))) OR ((E.PO_STATUS = 'C') AND (E.MATCH_ACTION = 'N') AND (EXISTS ( SELECT 'X' FROM PS_OPR_DEF_TBL_AP J WHERE J.OPRID = I.OPRID AND J.AUTH_CPY_MTCH_PO = 'Y')))) AND E.ERS_ACTION = 'N' AND E.IN_PROCESS_FLG = 'N' AND E.MATCH_STATUS_PO IN ('T','P','N') AND E.MID_ROLL_STATUS = 'N' AND E.CC_USE_FLAG IN ('N',' ') AND G.business_unit = H.business_unit AND G.po_id = H.po_id AND D.BUSINESS_UNIT = H.BUSINESS_UNIT AND D.PO_ID = H.PO_ID AND D.LINE_NBR = H.LINE_NBR AND G.line_nbr = H.line_nbr AND G.sched_nbr = H.sched_nbr AND D.cancel_status <> 'X' AND G.cancel_status <> 'X' AND G.MATCH_STATUS_LN_PO IN ('N','P') AND ((D.CANCEL_STATUS <> 'C') OR (D.CANCEL_STATUS = 'C' AND (EXISTS ( SELECT 'X' FROM PS_OPR_DEF_TBL_AP J2 WHERE J2.OPRID = I.OPRID AND J2.AUTH_CPY_MTCH_PO = 'Y')))) AND I.OPRID = K.OPRID AND E.VENDOR_SETID = K.SETID AND E.VENDOR_ID = K.VENDOR_ID AND K.BUSINESS_UNIT_PO = E.BUSINESS_UNIT |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | OPRID | Character(30) | VARCHAR2(30) NOT NULL | A user's ID (see PSOPRDEFN). |
2 | VENDOR_SETID | Character(5) | VARCHAR2(5) NOT NULL | Vendor SetID |
3 | VENDOR_ID | Character(10) | VARCHAR2(10) NOT NULL | Vendor Identifier |
4 | BUSINESS_UNIT_PO | Character(5) | VARCHAR2(5) NOT NULL | PO Business Unit |
5 | PO_ID | Character(10) | VARCHAR2(10) NOT NULL | Purchase Order |
6 | LINE_NBR | Number(5,0) | INTEGER NOT NULL | Line Number: 11/24/08 - Added TARGET label [PC product] |
7 | SCHED_NBR | Number(3,0) | SMALLINT NOT NULL | Schedule Number |
8 | PO_DT | Date(10) | DATE | Date |
9 | NAME1 | Character(40) | VARCHAR2(40) NOT NULL | Name 1 |
10 | ORIGIN | Character(3) | VARCHAR2(3) NOT NULL | Origin |
11 | 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. |
12 | CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Currency Code |
13 | ITM_SETID | Character(5) | VARCHAR2(5) NOT NULL | Item SetID |
14 | INV_ITEM_ID | Character(18) | VARCHAR2(18) NOT NULL | Item ID |
15 | DESCR | Character(30) | VARCHAR2(30) NOT NULL | Description |
16 | QTY_VCHR | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | Quantity Vouchered |
17 | UNIT_PRICE | Signed Number(17,5) | DECIMAL(15,5) NOT NULL | Unit Price |
18 | UNIT_OF_MEASURE | Character(3) | VARCHAR2(3) NOT NULL |
Used on an approval rule set.
MHR=Muti Hourly PER=Percentage SQF=Square Footage |
19 | CNTRCT_ID | Character(25) | VARCHAR2(25) NOT NULL | Buying Agreement ID |
20 | VERSION_NBR | Number(5,0) | INTEGER NOT NULL | Contract Version number |
21 | CNTRCT_LINE_NBR | Number(5,0) | INTEGER NOT NULL | Buying Agreement Line Nbr |
22 | CAT_LINE_NBR | Number(5,0) | INTEGER NOT NULL | Contract Category Line Number |
23 | RELEASE_NBR | Number(5,0) | INTEGER NOT NULL | Release Number |
24 | MERCHANDISE_AMT | Signed Number(28,3) | DECIMAL(26,3) NOT NULL | Merchandise Amt F_KDHIL_R87H8 062804 MLM: Added new Line Amount Received Label |
25 | TXN_CURRENCY_CD | Character(3) | VARCHAR2(3) NOT NULL | Transaction Currency |
26 | BUYER_ID | Character(30) | VARCHAR2(30) NOT NULL | Buyer |
27 | SHIPTO_ID | Character(10) | VARCHAR2(10) NOT NULL | Ship To Location |
28 | VAT_APPLICABILITY | Character(1) | VARCHAR2(1) NOT NULL |
A flag that indicates whether or not a transaction is eligible for VAT (Value Added Tax) taxation or why it is not eligible.
E=Exempt N=Not Applicable O=Outside of Scope of VAT S=Suspended T=Taxable V=VAT Only X=Exonerated |
29 | TAX_CD_VAT | Character(8) | VARCHAR2(8) NOT NULL | Defines the VAT (Value Added Tax) percentage (via link to the Tax Authority) and is used to retrieve VAT accounting ChartFields. The VAT code determines how the VAT amount is calculated on a transaction and how that amount is accounted and reported for. |
30 | VAT_TXN_TYPE_CD | Character(4) | VARCHAR2(4) NOT NULL | Specifies a user-defined category of business transaction that is subject to VAT accounting and reporting. The VAT code and the VAT transaction type are used in conjunction with the VAT account type to obtain the ChartFields for accounting entries. Some examples of VAT Transaction Types are Exempt Sales Exempt Purchases Triangulation EU Sales and Domestic Sales. |
31 | VAT_USE_ID | Character(6) | VARCHAR2(6) NOT NULL | VAT Use Type |
32 | TAX_VAT_FLG | Character(1) | VARCHAR2(1) NOT NULL |
Include VAT
N=No Y=Yes |
33 | TAX_FRGHT_FLG | Character(1) | VARCHAR2(1) NOT NULL | Include Freight |
34 | TAX_MISC_FLG | Character(1) | VARCHAR2(1) NOT NULL | Include Misc Charges |
35 | VAT_TREATMENT | Character(4) | VARCHAR2(4) NOT NULL | VAT Treatment |
36 | VAT_TREATMENT_GRP | Character(4) | VARCHAR2(4) NOT NULL | VAT Treatment Group |
37 | FREIGHT_TERMS | Character(10) | VARCHAR2(10) NOT NULL | Freight Terms Code |
38 | ULTIMATE_USE_CD | Character(8) | VARCHAR2(8) NOT NULL | Ultimate Use Code |
39 | PHYSICAL_NATURE | Character(1) | VARCHAR2(1) NOT NULL |
Physical Nature
G=Goods S=Services |
40 | VAT_RCRD_INPT_FLG | Character(1) | VARCHAR2(1) NOT NULL | A flag that indicates whether or not (Y or N) a business unit will pay the VAT and recover it later from the VAT tax authority. VAT input is usually associated with purchase transactions. |
41 | VAT_RCRD_OUTPT_FLG | Character(1) | VARCHAR2(1) NOT NULL | A flag that indicates whether or not (Y or N) VAT will be collected by the vendor on behalf of the government. VAT output is usually associated with sales transactions. |
42 | VAT_DCLRTN_POINT | Character(1) | VARCHAR2(1) NOT NULL |
A flag that specifies when VAT information for sales or purchase transaction is recognized for reporting to the appropriate VAT authority. VAT is declared at invoice time, delivery time, accounting date or the time of payment.
A=At Accounting Date D=At Delivery Time I=At Invoice Time P=At Payment Time |
43 | VAT_CALC_GROSS_NET | Character(1) | VARCHAR2(1) NOT NULL |
A flag that indicates whether VAT calculation should be done on the Gross (G) amount or on the Net (N) amount of sales or purchase transaction. When calculating VAT at net the early payment discount is applied to the goods amount before calculating the VAT. When calculating VAT at gross the VAT is initially calculated based on the gross transaction amount.
G=Calculate at Gross N=Calculate at Net |
44 | VAT_CALC_FRGHT_FLG | Character(1) | VARCHAR2(1) NOT NULL | Include Freight |
45 | VAT_CALC_MISC_FLG | Character(1) | VARCHAR2(1) NOT NULL | Include Miscellaneous |
46 | VAT_RECALC_FLG | Character(1) | VARCHAR2(1) NOT NULL | A flag that indicates whether or not the VAT discount amount is recalculated at payment time. This field is only used if the VAT Calculation Type (VAT_CAL_GROSS_NET) is gross. |
47 | VAT_EXCPTN_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
A flag that specifies the reason for a VAT exemption for a customer. Suspension (S) and Exoneration (X) are examples of Exception Type.
N=None S=Suspended X=Exonerated |
48 | VAT_EXCPTN_CERTIF | Character(20) | VARCHAR2(20) NOT NULL | Specifies the VAT exception certificate number. This identifier serves as proof of customer's exemption from VAT. |
49 | COUNTRY_SHIP_TO | Character(3) | VARCHAR2(3) NOT NULL | Specifies the country to which the invoice contents were shipped (for VAT processing only). |
50 | COUNTRY_SHIP_FROM | Character(3) | VARCHAR2(3) NOT NULL | Specifies the country from which the invoice contents were shipped (for VAT processing only). |
51 | COUNTRY_VAT_BILLTO | Character(3) | VARCHAR2(3) NOT NULL | Specifies the country where an invoice is sent (for VAT processing only). |
52 | COUNTRY_VAT_BILLFR | Character(3) | VARCHAR2(3) NOT NULL | Specifies the country where an invoice is generated (for VAT processing only). |
53 | COUNTRY_VAT_PERFRM | Character(3) | VARCHAR2(3) NOT NULL | Country Where Service Physically Performed |
54 | COUNTRY_LOC_BUYER | Character(3) | VARCHAR2(3) NOT NULL | Buyer's Location Country - May be either the VAT Entity or the Trading Partner |
55 | COUNTRY_LOC_SELLER | Character(3) | VARCHAR2(3) NOT NULL | Seller's Location Country - May be either the VAT Entity or the Trading Partner |
56 | COUNTRY_VAT_SUPPLY | Character(3) | VARCHAR2(3) NOT NULL | VAT Place of Supply Country |
57 | STATE_LOC_BUYER | Character(6) | VARCHAR2(6) NOT NULL | Buyer's Location State - May be either the VAT Entity or the Trading Partner |
58 | STATE_LOC_SELLER | Character(6) | VARCHAR2(6) NOT NULL | Seller's Location State - May be either the VAT Entity or the Trading Partner |
59 | STATE_SHIP_FROM | Character(6) | VARCHAR2(6) NOT NULL | Ship From State |
60 | STATE_SHIP_TO | Character(6) | VARCHAR2(6) NOT NULL | Ship To State |
61 | STATE_VAT_DEFAULT | Character(6) | VARCHAR2(6) NOT NULL | VAT Defaulting State |
62 | STATE_VAT_PERFRM | Character(6) | VARCHAR2(6) NOT NULL | State Where Service Physically Performed |
63 | STATE_VAT_SUPPLY | Character(6) | VARCHAR2(6) NOT NULL | VAT Place of Supply State |
64 | VAT_RGSTRN_SELLER | Character(20) | VARCHAR2(20) NOT NULL | Seller's VAT Registration |
65 | VAT_CALC_TYPE | Character(1) | VARCHAR2(1) NOT NULL |
"A flag that indicates how VAT is stated and determines how the system performs the relevant VAT calculations. If ""Exclusive"", the VAT amount is stated separately from the merchandise amount. If ""Inclusive"", the VAT is not stated separately but is included with the merchandise amount."
E=Exclusive I=Inclusive |
66 | VAT_ROUND_RULE | Character(1) | VARCHAR2(1) NOT NULL |
" Rounding rule to be applied to VAT calculations. Options are 'Natural'
D=Round Down N=Natural Round U=Round Up |
67 | CATEGORY_ID | Character(5) | VARCHAR2(5) NOT NULL | Category ID |
68 | SHIP_TYPE_ID | Character(10) | VARCHAR2(10) NOT NULL | Ship Via Code |
69 | MFG_ID | Character(50) | VARCHAR2(50) NOT NULL | Manufacturer ID |
70 | MFG_ITM_ID | Character(50) | VARCHAR2(50) NOT NULL | Manufacturer's Item ID |
71 | UPN_TYPE_CD | Character(4) | VARCHAR2(4) NOT NULL | Universal Product Number Format Type |
72 | UPN_ID | Character(20) | VARCHAR2(20) NOT NULL | Universal Product Number |