Sunteți pe pagina 1din 4

SELECT DISTINCT

pvs.org_id "Org ID",


p.segment1 "Supplier Number",
initcap(p.vendor_name) "Supplier Name",
initcap(p.VENDOR_NAME_ALT) "Supplier Alternate Name",
pvs.vendor_site_code "Supplier Site",
pvs.vendor_site_id "vendor_site_id",
to_char(p.creation_date,'DD-Mon-YYYY') "Supplier Creation Date",
to_char(pvs.creation_date,'DD-Mon-YYYY') "Site Creation Date",
to_char(pvs.last_update_date,'DD-Mon-YYYY') "Last Update Date",
to_char(pvs.inactive_date,'DD-Mon-YYYY') "Inactive Date",
pvs.DUNS_NUMBER "DUNS Number",
initcap(pvs.address_line1) "Address Line 1",
initcap(pvs.address_line2) "Address Line 2",
initcap(pvs.address_line3) "Address Line 3",
initcap(pvs.city) "City",
pvs.state "State",
pvs.province "Province",
pvs.zip "Zip Code",
pvs.country "Country",
lang.NLS_LANGUAGE "Supplier Language",
pvs.EMAIL_ADDRESS "Remitt Supplier Email",
pvs.PURCHASING_SITE_FLAG "Purchasing Site
Flag",
pvs.pay_site_flag "Pay Site
Flag",
pvs.FAX_AREA_CODE "Fax Area
code",
pvs.fax "Fax No",
pvs.SUPPLIER_NOTIF_METHOD "PO Tramission Method" ,
pvs.email_address "Po Transmission Supplier
EMAIL" ,
pvs.attribute12 "Source System",
gcck1.concatenated_segments "Liability Account" ,
gcck2.concatenated_segments "Prepay Account",
apt.name "Payment Terms",
apt.description "Terms Description",
pvs.invoice_currency_code "Invoice Currency Code",
pvs.payment_currency_code "Payment Currency Code",
pvs.pay_date_basis_lookup_code "Pay Date Basis Lookup Code",
pvs.allow_awt_flag "Allow Awt Flag",
(select awt.Name from apps.AP_AWT_GROUPS awt where awt.GROUP_ID=pvs.AWT_GROUP_ID)
"Awt Group Name",
pvs.attribute7 "VAT Registration Number",
pvs.attribute8 "Urgent Payment Flag",
pvs.attribute13 "Invoice System",
pvs.attribute10 "Process",

pvs.freight_terms_lookup_code "Freight Terms",


ab.bank_account_name,
ab.masked_iban AS iban,
ab.currency_code,
ab.order_of_preference,
ab.start_date,
ab.end_date,
ab.name AS currency_name,
ab.party_name AS bank_name,
ab.masked_bank_account_num AS bank_account_number,
ab.bank_branch_name,
ab.branch_number,
ab.bank_or_branch_number AS bank_number,
ab.eft_swift_code,
ab.bank_account_type,
ab.payment_method_code,
ab.inactive_date "Payment Method Inactive Date",
pvs.hold_all_payments_flag "Hold All Payments Flag",
pvs.INVOICE_AMOUNT_LIMIT "INVOICE_AMOUNT_LIMIT",
pvs.hold_future_payments_flag "Hold Future Payments Flag",
pvs.hold_reason "Hold Reason",
pvs.hold_unmatched_invoices_flag "Hold Unmatched Invoices Flag",
pvs.auto_tax_calc_flag "Auto Tax Calc Flag",
pvs.fob_lookup_code "Fob Lookup Code",
pvs.freight_terms_lookup_code "Freight Terms Lookup Code",
hl1.location_code "Ship To Location",
hl2.location_code "Bill To Location",
pvs.country_of_origin_code "Country Of Origin Code",
pvs.pay_on_code "Pay On Code",
pvs.pay_date_basis_lookup_code "Pay Date Basis Lookup
Code",
pvs.allow_awt_flag "With Hold Tax Flag",

pvs.exclude_freight_from_discount "Exclude Freight From


Discount",
pvs.exclusive_payment_flag "Exclusive Payment
Flag",
pvs.attention_ar_flag "Attention Ar Flag",
pvs.DEFAULT_PAY_SITE_ID "DEFAULT_PAY_SITE",
pvs.EDI_REMITTANCE_METHOD
"EDI_REMITTANCE_METHOD",
pvs.REMITTANCE_EMAIL "REMITTANCE_EMAIL",
pvs.EDI_REMITTANCE_INSTRUCTION
"EDI_REMITTANCE_INSTRUCTION",
pvs.TOLERANCE_ID "TOLERANCE_NAME",
pvs.MATCH_OPTION "MATCH_OPTION",
pvs.PAYMENT_CURRENCY_CODE
"PAYMENT_CURRENCY_CODE",
pvs.INVOICE_CURRENCY_CODE
"INVOICE_CURRENCY_CODE",
pvs.TERMS_id "TERMS_NAME",
pvs.TERMS_DATE_BASIS "TERMS_DATE_BASIS",
pvs.ALWAYS_TAKE_DISC_FLAG
"ALWAYS_TAKE_DISC_FLAG" ,
EDFF.attribute11 "Excise
Registration Number",
EDFF.attribute12 "Service Tax
Regn" ,
EDFF.attribute13 "Description of
Service Tax" ,
EDFF.attribute14 "CST No" ,
EDFF.attribute15 "LST No" ,
EDFF.attribute16 "Supplier Type"
,
EDFF.attribute17 "PAN" ,
EDFF.attribute18 "TDS Form 16(A)"
from
apps.ap_supplier_sites_all pvs,
apps.ap_suppliers p,
APPS.AP_SUPPLIER_CONTACTS c,
apps.ap_terms apt,
apps.gl_code_combinations_kfv gcck1,
apps.gl_code_combinations_kfv gcck2,
apps.hr_locations hl1,
apps.hr_locations hl2,
( SELECT payee.org_id,
payee.payee_party_id,
payee.supplier_site_id,
accts.bank_account_name,
accts.masked_iban ,
accts.currency_code,
uses.order_of_preference,
uses.start_date,
uses.end_date,
fc.name ,
bank.party_name ,
accts.masked_bank_account_num ,
branch.bank_branch_name,
branch.branch_number,
bankProfile.bank_or_branch_number ,
branch.eft_swift_code,
accts.bank_account_type,
ieppm.payment_method_code,
ieppm.inactive_date
FROM apps.IBY_PMT_INSTR_USES_ALL uses,
apps.IBY_EXTERNAL_PAYEES_ALL payee,
apps.IBY_EXT_BANK_ACCOUNTS accts,
apps.FND_CURRENCIES_VL fc,
apps.HZ_PARTIES bank,
apps.HZ_ORGANIZATION_PROFILES bankProfile,
apps.CE_BANK_BRANCHES_V branch,
apps.iby_ext_party_pmt_mthds ieppm
WHERE payee.ext_payee_id = uses.ext_pmt_party_id
AND uses.instrument_id = accts.ext_bank_account_id
AND fc.currency_code(+) = accts.currency_code

AND accts.bank_id = bank.party_id(+)


AND accts.bank_id = bankProfile.party_id(+)
AND accts.branch_id = branch.branch_party_id(+)
AND payee.ext_payee_id = ieppm.ext_pmt_party_id(+)
) ab
,apps.fnd_languages lang,
(select * from GECSS.gecm_dff_ext where
primary_table='AP_SUPPLIER_SITES_ALL')EDFF
WHERE
pvs.org_id IN(9719)
and p.vendor_id = pvs.vendor_id
and pvs.VENDOR_SITE_ID = c.VENDOR_SITE_ID(+)
-- and
and pvs.terms_id = apt.term_id (+)
and pvs.accts_pay_code_combination_id = gcck1.code_combination_id
(+)
and pvs.prepay_code_combination_id = gcck2.code_combination_id
(+)
and pvs.ship_to_location_id = hl1.location_id
(+)
and pvs.bill_to_location_id = hl2.location_id
(+)
and pvs.vendor_site_id = ab.supplier_site_id
(+)
and pvs.attribute11=lang.language_code (+)
and pvs.VENDOR_SITE_ID=EDFF.PRIMARY_KEY(+)
and p.segment1 ='932806'
--and pvs.country like '%IT%'
--AND P.SEGMENT1 = '116333'
--and p.end_date_active is null
--and (pvs.inactive_date is null or pvs.inactive_date>sysdate)
--and p.segment1='J26836'
--and p.segment1||PVS.ATTRIBUTE14 in('F92541102',
--and pvs.attribute7 like '%-V-S-C'
--and pvs.INVOICE_AMOUNT_LIMIT is not null
ORDER BY 2, 4

S-ar putea să vă placă și