SPF_INV_TAI_VW

(SQL View)
Index Back

Available Incidents to Invoice

This view fetches the Time detail lines with assignment incidents that are available for Invoicing

SELECT H.BUSINESS_UNIT , H.TIME_SHEET_ID , W.WORK_ORDER_ID , D.LINE_NBR , W.MRSC_PARENT_WOID , W.SUB_LINE , D.DISTRIB_LINE_NUM , W.SERVICE_METHOD , W.SP_VNDR_INTERNAL , W.VENDOR_ID , W.VNDR_LOC , W1.VMS_SUPPLIER_ID , W1.VMS_LOCATION , D.ACTIVITY_ID ,D.ASSIGNMENT_ID ,D.NUM_OF_INCIDENTS ,D.ASSIGNMENT_INCRATE , H.PERSON_ID , P.NAME , H.PERIOD_END_DT , ' ' , W.VENDOR_ID , W.VNDR_LOC , W.PROVIDER_CONTACT , W.PO_ID , W.COMPUNIT , T.TAX_VAT_FLG , T.SUT_APPLICABILITY , T.TAX_CD_VAT_PCT , T.TAX_CD_SUT_PCT , T.TAX_CD_VAT_PCT , T.TAX_CD_SUT_PCT , 0 AS INV_LINE_ADJRATE , D.TIME_AMOUNT - D.SP_MSP_FEE , 0 AS VAT_AMOUNT , 0 AS SALETX_AMOUNT , 0 AS USETAX_AMOUNT , 0 AS INV_EXP_AMT , D.SP_MSP_FEE , D.TIME_AMOUNT , D.TIME_AMOUNT - D.SP_MSP_FEE , 0 AS ADJ_VAT_AMOUNT , 0 AS ADJ_SALETX_AMOUNT , 0 AS ADJ_USETAX_AMOUNT , 0 AS INV_LINE_ADJEXP , D.SP_MSP_FEE , 0 AS INVOICE_AMOUNT , D.CURRENCY_CD , 0 AS INV_LN_ADJRATE_BSE , D.TIME_AMOUNT_BSE - D.SP_MSP_FEE_BSE , 0 AS VAT_AMOUNT_BSE , 0 AS SALETX_AMOUNT_BSE , 0 AS USETAX_AMOUNT_BSE , 0 AS INV_EXP_AMT_BSE , D.SP_MSP_FEE_BSE , D.TIME_AMOUNT_BSE , D.TIME_AMOUNT_BSE - D.SP_MSP_FEE_BSE , 0 AS ADJ_VAT_AMOUNT_BSE , 0 AS ADJ_SALETX_AMT_BSE , 0 AS ADJ_USETAX_AMT_BSE , 0 AS INV_LN_ADJEXP_BSE , D.SP_MSP_FEE_BSE , 0 AS INVOICE_AMOUNT_BSE , D.CURRENCY_CD_BASE FROM PS_SPA_TIME_HDR H , PS_SPA_TIM_INCIDNT D , PS_SPF_WORDERREC W , PS_SPF_WORDERREC_1 W1 , PS_SPF_WO_TAX T , PS_SPB_PERSON_TBL P WHERE D.TIME_LINE_STATUS IN ('APR', 'ADJ') AND D.SPA_BILLING_ACTION = 'B' AND D.TE_INVOICE_FLG = 'N' AND H.BUSINESS_UNIT = D.BUSINESS_UNIT AND H.TIME_SHEET_ID = D.TIME_SHEET_ID AND D.BUSINESS_UNIT = W.BUSINESS_UNIT AND D.WORK_ORDER_ID = W.WORK_ORDER_ID AND W1.BUSINESS_UNIT = W.BUSINESS_UNIT AND W1.WORK_ORDER_ID = W.WORK_ORDER_ID AND W.BUSINESS_UNIT = T.BUSINESS_UNIT AND W.WORK_ORDER_ID = T.WORK_ORDER_ID AND H.PERSON_ID = P.PERSON_ID AND W.SERVICE_METHOD = 'R'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 TIME_SHEET_ID Character(10) VARCHAR2(10) NOT NULL Time Sheet Unique Identifier (System Generated)
3 WORK_ORDER_ID Character(15) VARCHAR2(15) NOT NULL Work Order ID
4 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
5 MRSC_PARENT_WOID Character(15) VARCHAR2(15) NOT NULL Multi Resource Parent WOID
6 SUB_LINE Character(1) VARCHAR2(1) NOT NULL Sub Line
N=No
Y=Yes
7 DISTRIB_LINE_NUM Number(5,0) INTEGER NOT NULL Distribution Line
8 SP_SERVICE_METHOD Character(1) VARCHAR2(1) NOT NULL Service Type classified as Resource Based or Service Based
D=Deliverable
R=Resource
9 SP_VNDR_INTERNAL Character(1) VARCHAR2(1) NOT NULL Vendor Internal or External type
N=N
Y=Yes
10 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
11 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
12 VMS_SUPPLIER_ID Character(10) VARCHAR2(10) NOT NULL VMS Supplier ID
13 VMS_LOCATION Character(10) VARCHAR2(10) NOT NULL VMS Location - This is the Vendor Managed Service Supplier's office location
14 ACTIVITY_ID Character(15) VARCHAR2(15) NOT NULL Activity ID
15 ASSIGNMENT_ID Character(15) VARCHAR2(15) NOT NULL Work Assignment ID
16 NUM_OF_INCIDENTS Number(16,0) DECIMAL(16) NOT NULL Number of incidents
17 ASSIGNMENT_INCRATE Signed Number(16,4) DECIMAL(14,4) NOT NULL Assignment Incident Rate
18 PERSON_ID Character(15) VARCHAR2(15) NOT NULL Person ID
19 NAME Character(50) VARCHAR2(50) NOT NULL Name
20 PERIOD_END_DT Date(10) DATE Represents the date termination point for a given time set utilized in cash worksheet processing.
21 SP_SUP_INVAPPROVER Character(15) VARCHAR2(15) NOT NULL Supplier Proforma Invoice Approver
22 SP_END_SUPPLIER_ID Character(10) VARCHAR2(10) NOT NULL The Supplier who is being managed by the VMS (Vendor Managed Service) Supplier
23 SP_ENDSUPPLIER_LOC Character(10) VARCHAR2(10) NOT NULL Location of Supplier providing the service to the VMS Supplier
24 PROVIDER_CONTACT Character(15) VARCHAR2(15) NOT NULL PROVIDER CONTACT
25 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
26 UNIT_OF_MEASURE Character(3) VARCHAR2(3) NOT NULL Used on an approval rule set.
MHR=Muti Hourly
PER=Percentage
SQF=Square Footage
27 TAX_VAT_FLG Character(1) VARCHAR2(1) NOT NULL Include VAT
N=No
Y=Yes
28 SUT_APPLICABILITY Character(1) VARCHAR2(1) NOT NULL Sales/Use Tax Applicability
D=Direct Pay
E=Item is Exempt
S=Sales Tax Applicable
U=Use Tax Applicable
X=Purchaser Is Exonerated
29 TAX_CD_VAT_PCT Signed Number(9,4) DECIMAL(7,4) NOT NULL Specifies the tax percentage that corresponds to the VAT code. If more than one VAT authority is linked to a VAT code this will represent an aggregate percentage.
30 TAX_CD_SUT_PCT Number(8,4) DECIMAL(7,4) NOT NULL Sales/Use Tax Code Percent
31 ADJ_VAT_PCT Signed Number(9,4) DECIMAL(7,4) NOT NULL Specifies the tax percentage that corresponds to the VAT code which has been adjusted.
32 ADJ_SUT_PCT Number(8,4) DECIMAL(7,4) NOT NULL Adjusted Sales/Use Tax Code Percent
33 INV_LINE_ADJRATE Signed Number(16,4) DECIMAL(14,4) NOT NULL Adjusted Invoice Line Rate
34 INV_LINE_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Line Amount
35 VAT_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Specifies the amount of VAT associated with a transaction such as an invoice or a purchase order. In PeopleSoft Receivables this field is populated when the VAT declaration point is set to Invoice.
36 SALETX_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Sales Tax Amount
37 USETAX_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Amount
38 INV_EXP_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Expense Amount
39 SP_MSP_FEE Signed Number(28,3) DECIMAL(26,3) NOT NULL Managed Service Provider Fee
40 SP_MSP_TOTAL Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Amount including MSP Fee
41 INV_LINE_ADJAMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Adjusted Invoice Line Amount
42 ADJ_VAT_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL This field stores the adjusted VAT amount. The original amount is stored in the VAT_AMT field for sPro.
43 ADJ_SALETX_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL This field stores the adjusted Sales Tax Amount. The original amount is stored in the SALETX_AMT field for sPro.
44 ADJ_USETAX_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL This field stores the adjusted Use Tax amount. The original amount is stored in the USETAX_AMT field for sPro.
45 INV_LINE_ADJEXP Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Line Adjusted Expense Amount
46 ADJ_SP_MSP_FEE Signed Number(28,3) DECIMAL(26,3) NOT NULL Managed Service Provider/Vendor Managed Services Fee
47 INVOICE_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Amount
48 CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Currency Code
49 INV_LN_ADJRATE_BSE Signed Number(16,4) DECIMAL(14,4) NOT NULL Invoice Line Adjusted Rate in Base Currency
50 INV_LINE_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Invoice Line Amount
51 VAT_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Amount in Base Curr
52 SALETX_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Sales Tax Amount
53 USETAX_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Base Use Tax Amount
54 INV_EXP_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Expense Amount for Base Currency
55 SP_MSP_FEE_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Managed Service Provider Fee (Base Currency)
56 SP_MSP_TOTAL_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Total Amount including MSP Fee (Base Currency)
57 INV_LN_ADJAMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Line Adjusted Amount in base currency
58 ADJ_VAT_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Adjusted VAT Amount - Base Currency
59 ADJ_SALETX_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Adjusted Sales Tax Amount - Base Currency This field stores the adjusted Sales Tax Amount in Base Currency. The original amount is stored in the SALETX_AMT_BSE field for sPro.
60 ADJ_USETAX_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL This field stores the adjusted Use Tax amount in Base Currency. The original amount is stored in the USETAX_AMT_BSE field for sPro.
61 INV_LN_ADJEXP_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Line Adjusted Expense Amount in Base Currency
62 ADJ_SP_MSP_FEE_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Managed Service Provider/Vendor Managed Services Fee
63 INVOICE_AMOUNT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Amount in Base Currency
64 CURRENCY_CD_BASE Character(3) VARCHAR2(3) NOT NULL Business Unit Base Currency