SII_HDR_AP_VW

(SQL View)
Index Back

SELECT H.BUSINESS_UNIT , H.VOUCHER_ID , H.INVOICE_ID ,H.INVOICE_DT , %Substring(%Cast(H.INVOICE_DT, DATE, Character) , 1 , 4) ,%Substring(%Cast(H.INVOICE_DT, DATE, Character) , 6 , 2) ,H.VENDOR_SETID ,H.VENDOR_ID , H.VAT_TREATMENT_GRP , H.VAT_DCLRTN_POINT , H.VAT_ENTITY , H.VOUCHER_ID_RELATED , ' ' ,NULL , H.VOUCHER_STYLE , H.COUNTRY_SHIP_FROM , H.COUNTRY_SHIP_TO , H.GROSS_AMT ,H.GROSS_AMT_BSE ,H.VAT_INV_AMT + H.VAT_NONINV_AMT ,H.VAT_INV_AMT_BSE + H.VAT_NONINV_AMT_BSE , H.VAT_RCVRY_AMT , H.VAT_RCVRY_AMT_BSE , H.ACCOUNTING_DT , H.RT_TYPE , H.TXN_CURRENCY_CD , H.base_currency ,H2.JOURNAL_ID ,'N' ,'N' ,'N' ,'N' FROM PS_VOUCHER H LEFT OUTER JOIN PS_VOUCHER H1 ON H.business_unit = H1.business_unit AND H.VOUCHER_ID_RELATED = H1.VOUCHER_ID LEFT OUTER JOIN PS_VCHR_ACCTG_LINE H2 ON H.BUSINESS_UNIT = H2.BUSINESS_UNIT AND H.VOUCHER_ID = H2.VOUCHER_ID WHERE H.VAT_ENTITY <> ' ' AND H.POST_STATUS_AP = 'P' AND H2.DST_ACCT_TYPE = 'APA' AND H2.UNPOST_SEQ = 0 AND ((H.CLOSE_STATUS = 'C' AND H2.POSTING_PROCESS = 'CLOS') OR (H.CLOSE_STATUS <> 'C' AND H2.POSTING_PROCESS = 'ACCR'))

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 VOUCHER_ID Character(8) VARCHAR2(8) NOT NULL Voucher ID
3 INVOICE_ID Character(30) VARCHAR2(30) NOT NULL Invoice Number
4 INVOICE_DT Date(10) DATE Invoice Date
5 RPT_YEAR Character(4) VARCHAR2(4) NOT NULL Reporting Year
6 RPT_PERIOD Character(2) VARCHAR2(2) NOT NULL Reporting Period
7 VENDOR_SETID Character(5) VARCHAR2(5) NOT NULL Vendor SetID
8 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
9 VAT_TREATMENT_GRP Character(4) VARCHAR2(4) NOT NULL VAT Treatment Group
10 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
11 VAT_ENTITY Character(20) VARCHAR2(20) NOT NULL Specifies an organizational entity that is responsible for VAT reporting and that is registered in one or more countries that require VAT reporting. A single VAT entity is linked to one or more General Ledger Business Units depending on the reporting requirements.
12 VOUCHER_ID_RELATED Character(8) VARCHAR2(8) NOT NULL Related Voucher
13 SII_INVOICE_ID_ORG Character(60) VARCHAR2(60) NOT NULL Invoice ID
14 SII_INVOICE_DT_ORG Date(10) DATE Invoice Date
15 VOUCHER_STYLE Character(4) VARCHAR2(4) NOT NULL Voucher Style
ADJ=Adjustments
AMR=Amortization Voucher
CLBK=Claim Voucher
CORR=Reversal Voucher
JRNL=Journal Voucher
PPAY=Prepaid Voucher
REG=Regular Voucher
RGTR=Register Voucher
SGLP=Single Payment Voucher
THRD=Third Party Voucher
TMPL=Template Voucher
16 COUNTRY_SHIP_FROM Character(3) VARCHAR2(3) NOT NULL Specifies the country from which the invoice contents were shipped (for VAT processing only).
17 COUNTRY_SHIP_TO Character(3) VARCHAR2(3) NOT NULL Specifies the country to which the invoice contents were shipped (for VAT processing only).
18 INVOICE_AMOUNT Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Amount
19 INVOICE_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Invoice Amount
20 TOT_VAT Signed Number(28,3) DECIMAL(26,3) NOT NULL Total VAT Amount
21 TOT_VAT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL Total VAT Amount
22 VAT_RCVRY_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Recovery Amt
23 VAT_RCVRY_AMT_BSE Signed Number(28,3) DECIMAL(26,3) NOT NULL VAT Recovery Amt in Base Curr
24 ACCOUNTING_DT Date(10) DATE The accounting entry construction date for a given transaction (a generic field that crosses multiple
25 RT_TYPE Character(5) VARCHAR2(5) NOT NULL Defines a category of market rates for currency conversion. Some examples of rate types are commercial, average, floating, and historical.
26 TXN_CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Transaction Currency
27 BASE_CURRENCY Character(3) VARCHAR2(3) NOT NULL "Specifies the primary currency for a general ledger business unit, and is sometimes referred to as the ""book"" currency. Each business unit has one base currency. which is usually, but not always, the local currency for the organization. Journal entries are posted to a business unit in its base currency. "
28 JOURNAL_ID Character(10) VARCHAR2(10) NOT NULL Identifies a journal entry, consisting of a header and one or more lines. The Journal ID itself does not have to be unique, but together with the journal business unit and journal date, it forms a unique journal identifier.
29 SII_MACRODATO_FLAG Character(1) VARCHAR2(1) NOT NULL MACRODATO FLAG

Y/N Table Edit

Default Value: N

30 SII_FACTURASIM_FLG Character(1) VARCHAR2(1) NOT NULL FacturaSimp Flag

Y/N Table Edit

Default Value: N

31 SII_REGPREVIO_FLAG Character(1) VARCHAR2(1) NOT NULL RegPrevio Flag

Y/N Table Edit

Default Value: N

32 SII_FACDIS_FLG Character(1) VARCHAR2(1) NOT NULL FacturacionDisp

Y/N Table Edit

Default Value: N