Xxpic Form GB Inv Header V
Xxpic Form GB Inv Header V
BILL_TO_ADDRESS1, BILL_TO_ADDRESS2, BILL_TO_ADDRESS3, BILL_TO_CITY, BILL_TO_STA TE, BILL_TO_COUNTRY, BILL_TO_POSTAL_CODE, SHIP_TO_CUSTOMER_NAME, SHIP_TO_CUSTOMER_NUMBER,REGISTRATION_NUMBER, REGISTERED_ NAME, SOURCE_ID, LOCATION_ID, ORG_ADDRESS1,ORG_ADDRESS2,ORG_ADDRESS3,ORG_CITY,ORG_STATE, ORG_COUNTRY, ORG_POS TAL_CODE,COLLECTOR_NAME, COLLECTOR_TELEPHONE_NUMBER, COLLECTOR_FAX,COLLECTOR_EMAIL ) AS select cmp.CONSOLIDATED_INVOICE_NUMBER, ci.BILLING_DATE, ci.SITE_USE_ID, cit.CONS_INV_LINE_NUMBER, pdi.project_id, pdi.DRAFT_INVOICE_NUM, pdi.INVOICE_DATE, pdi.INV_CURRENCY_CODE, trx.TRX_NUMBER, trx.CUSTOMER_TRX_ID, trx.LEGAL_ENTITY_ID, trm.TERM_ID, trm.NAME, trx.TERM_DUE_DATE, billc.CUSTOMER_NAME, billc.CUSTOMER_NUMBER, pa.AGREEMENT_NUM, billc.CUSTOMER_NAME, billc.CUSTOMER_NUMBER, bhl.ADDRESS1, bhl.ADDRESS2, bhl.ADDRESS3, bhl.CITY, bhl.STATE, bhl.COUNTRY, bhl.POSTAL_CODE , shipc.CUSTOMER_NAME, shipc.CUSTOMER_NUMBER, xlr.REGISTRATION_NUMBER, xlr.REGISTERED_NAME, xlr.SOURCE_ID, xlr.LOCATION_ID, orgl.ADDRESS1, orgl.ADDRESS2, orgl.ADDRESS3, orgl.CITY, orgl.STATE, orgl.COUNTRY, orgl.POSTAL_CODE, ac.NAME, ac.TELEPHONE_NUMBER, ac.ATTRIBUTE1, ac.ATTRIBUTE2 from xxpic_consolidated_invoice_map CMP, --cons bill
ar_cons_inv_all CI, -- cons bill ar_cons_inv_trx_all cit, -- cons bill, trx ra_customer_trx_all trx, -- trx --ra_customer_trx_lines_all trl, -- trxl pa_customers_v billc, -- bill cust no, nmae pa_customers_v shipc, -- ship cust xle_registrations xlr, -- org hz_locations orgl, -- org add hz_customer_profiles hcp, -- collector ar_collectors ac, -- collector hz_cust_site_uses_all bsu, -- bill site hz_cust_acct_sites_all bcs, -- bill site hz_party_sites bhp, -- bill site hz_locations bhl, -- bill site pa_draft_invoices_all pdi, -- draft inv ra_terms_tl trm ,-- terms pa_agreements_all pa where cmp.consolidated_invoice_number = ci.cons_billing_number and cit.cons_inv_id = ci.cons_inv_id and cit.customer_trx_id = trx.customer_trx_id --and trl.customer_trx_id = trx.customer_trx_id and billc.customer_id = trx.bill_to_customer_id and shipc.customer_id = trx.ship_to_customer_id and xlr.source_id = trx.legal_entity_id and orgl.location_id(+) = xlr.location_id and hcp.cust_account_id = trx.bill_to_customer_id and hcp.site_use_id IS NULL and ac.collector_id = hcp.collector_id and bsu.site_use_id = trx.bill_to_site_use_id and bcs.cust_acct_site_id = bsu.cust_acct_site_id and bhp.party_site_id = bcs.party_site_id and bhl.location_id = bhp.location_id and pdi.project_id = cmp.project_id and pdi.draft_invoice_num = cmp.draft_invoice_num and pdi.RA_INVOICE_NUMBER=trx.trx_number and pdi.agreement_id=pa.agreement_id and trm.term_id = trx.term_id and trx.org_id=pdi.org_id order by cmp.CONSOLIDATED_INVOICE_NUMBER,cit.CONS_INV_LINE_NUMBER, trx.trx_numbe r; /