Thursday, May 6, 2021

View - PO_VENDOR_SITES_AP_V

 SELECT PVS.VENDOR_SITE_CODE VENDOR_SITE_CODE

, PVS.VENDOR_SITE_ID VENDOR_SITE_ID
, PVS.VENDOR_ID VENDOR_ID
, PVS.ADDRESS_LINE1 ADDRESS_LINE1
, PVS.CITY CITY
, PVS.STATE STATE
, PVS.PROVINCE PROVINCE
, PVS.ZIP ZIP
, PVS.COUNTY COUNTY
, PVS.COUNTRY COUNTRY
, PV.VENDOR_NAME VENDOR_NAME
, PV.SEGMENT1 VENDOR_NUMBER
, PV.NUM_1099 NUM_1099
, PV.HOLD_ALL_PAYMENTS_FLAG HOLD_ALL_PAYMENTS_FLAG
, DECODE(SIGN(TO_DATE(TO_CHAR(PVS.INACTIVE_DATE
, 'YYYY/MM/DD')
, 'YYYY/MM/DD') - TO_DATE(TO_CHAR(SYSDATE
, 'YYYY/MM/DD')
, 'YYYY/MM/DD'))
, -1
, 'N'
, 0
, 'N'
, 'Y') ACTIVE_FLAG
, PVS.ORG_ID
, PVS.PARTY_SITE_ID
, IEP.PAYMENT_FUNCTION
, IEP.BANK_CHARGE_BEARER
, IEP.SETTLEMENT_PRIORITY
, IEP.EXCLUSIVE_PAYMENT_FLAG
FROM AP_SUPPLIER_SITES PVS
, AP_SUPPLIERS PV
, IBY_EXTERNAL_PAYEES_ALL IEP
WHERE PVS.VENDOR_ID = PV.VENDOR_ID
AND PV.PARTY_ID = IEP.PAYEE_PARTY_ID
AND PVS.PARTY_SITE_ID = IEP.PARTY_SITE_ID
AND PVS.VENDOR_SITE_ID = IEP.SUPPLIER_SITE_ID