Tuesday, 8 September 2020

Invoice posted register Query

 select aia.INVOICE_NUM

,aba.batch_name

,aia.INVOICE_AMOUNT

,aia.PAY_GROUP_LOOKUP_CODE INv_group

,aia.INVOICE_CURRENCY_CODE

,aia.CREATION_DATE

,To_char(aia.creation_date,'MONTH') InvCreation_Month

,aia.INVOICE_DATE

,aia.SOURCE

,aia.INVOICE_TYPE_LOOKUP_CODE INVOICE_TYPE

,PAYMENT_METHOD_CODE INVOICE_PAY_METHOD

,aia.amount_paid amount_paid

,aia.description

,aia.doc_sequence_value VOUCHER_NUM

,(select max(aila.ACCOUNTING_DATE)

        from apps.ap_invoice_lines_all aila            

        where aila.invoice_id = aia.invoice_id

        and aila.org_id = aia.org_id

        and rownum =1) ACCOUNTING_DATE

,aia.GL_DATE

,asu.VENDOR_NAME

,asu.segment1 VENDOR_NUMBER

,assa.VENDOR_SITE_CODE

,(select aca.CHECK_NUMBER 

    from apps.ap_invoice_payments_all aipa,

         apps.ap_checks_all aca 

    where  aipa.check_id = aca.check_id 

           and nvl(aipa.reversal_flag,'N') <> 'Y'

           and  aipa.invoice_id = aia.invoice_id

           and aipa.org_id = aia.org_id

           and rownum = 1) CHECK_NUMBER

,(select aca.CHECK_DATE 

    from apps.ap_invoice_payments_all aipa,

         apps.ap_checks_all aca 

    where  aipa.check_id = aca.check_id 

           and nvl(aipa.reversal_flag,'N') <> 'Y'

           and  aipa.invoice_id = aia.invoice_id

           and aipa.org_id = aia.org_id

           and rownum = 1) CHECK_DATE

,(select distinct poh.segment1

    from apps.po_headers_all poh,

         apps.ap_invoice_lines_all aila

    where aila.po_header_id = poh.po_header_id

      and aila.invoice_id = aia.invoice_id

      and poh.org_id = aia.org_id

      and rownum = 1) PO_NUMBER

,at.name TERMS

,Decode((select distinct poh.segment1

    from apps.po_headers_all poh,

         apps.ap_invoice_lines_all aila

    where aila.po_header_id = poh.po_header_id

      and aila.invoice_id = aia.invoice_id

      and poh.org_id = aia.org_id

      and rownum = 1),null,'N','Y') "PO Y/N"

 from    apps.ap_invoices_all aia, 

         apps.ap_batches_all aba,

         apps.ap_suppliers asu,

         apps.ap_supplier_sites_all assa,

         apps.ap_terms at

        -- apps.ap_invoice_payments_all aipa,

        -- apps.ap_checks_all aca

where aia.batch_id = aba.batch_id

and asu.vendor_id = assa.vendor_id

and aia.vendor_id  = asu.vendor_id

and aia.vendor_site_id = assa.vendor_site_id

and aia.terms_id = at.term_id

--and aia.invoice_id = aipa.invoice_id

--and aipa.check_id = aca.check_id

and aia.gl_date between '01-JAN-2020' and '31-MAR-2020'

order by aia.invoice_date;


5 comments:

  1. SSN DOB DL FULLZ PROS TELEGRAM:KILLHACKS
    DL SCAN MMN USA UK CANADA Fullz

    Hi Guy's

    We're providing Fresh, Genuine & Legit Fullz info Leads
    USA UK CANADA All cities & States available
    Fresh spammed & never sold before

    SSN DOB DL FULLZ with employee history & bank info
    SIN DOB ADDRESS MMN Phone Email Fullz info Canada
    NIN DOB DL ADDRESS SORT CODE Fullz Unite Kingdom
    DL Scan front back with selfie & SSN
    High Credit Scores Fullz 700+
    Young & Old Age Fullz
    DL Fullz with Issue & Exp dates
    Business EIN Company Fullz
    CC with CVV Fullz
    Bulk Fullz Available
    Passport Photos with Selfie
    Email & phone numbers Leads

    Many Fullz & Leads of USA UK & CANADA Countries available
    You can asked for specific info as well Age|Gender|Cities|States|Zip
    Everything will be provided genuine & guaranteed
    Invalid stuff will be replace

    Contact:

    Telegram : @ kilhacks | @ leadsupplier
    Whats App : +1.. 727.. 788... 6129
    Skype : @ peeterhacks
    E mail : cyber.zoneuniverse @ g mail . com

    ReplyDelete
  2. Hello Everone

    Fullz available in bulk quantity
    Fresh spammed & verified info

    SSN DOB DL ADDRESS
    SIN DOB ADDRESS MMN
    NIN DOB ADDRESS SORT CODE

    USA UK CANADA All states info fullz available
    Good Credit Scores & High quality info
    All info will be valid & Genuine spammed not generated

    Contact me here

    What's App = +1... 727... 788.. 6129..
    Tele Gram = @ killhacks - @ leadsupplier
    Email = bigbull0334 at g mail dot com
    Skype = @ peeterhacks

    USA All info available with guarantee
    DL Photos Front Back with SSN
    High Credit Scores Pros
    DL Fullz with issue & exp dates
    UK & Canada DL Front back with selfie
    Passport Photos
    SSN DOB DL Fullz
    SIN DOB ADDRESS MMN Fullz
    NIN DOB DL ADDRESS SORT CODE ACCOUNT NUMBER Fullz
    Young & Old Age Fullz
    CC with CVV
    Dumps with Pin codes

    All stuff will be fresh & valid
    Feel free to contact me

    #fullz #ssnfullz #ssndlfullz #usafullz #ccfullzcvv
    #ukfullz #ukdobaddress #ninukdl #ninDL #uknindobdl #ninsortcode
    #sinfullz #canadafullz #sinnindob #prosCC #ccdumps #sellfullzpros

    ReplyDelete