12: num_active NUMBER;
13:
14: BEGIN
15:
16: -- Bug 8674710 - Added the join to HZ_PARTY_SITES as site should be
17: -- inactive when the Address is inactive.
18:
19: SELECT count(pvs.vendor_site_id)
20: INTO num_active
18:
19: SELECT count(pvs.vendor_site_id)
20: INTO num_active
21: FROM ap_supplier_sites pvs,
22: hz_party_sites H,
23: ap_suppliers pv
24: WHERE pvs.vendor_id = X_vendor_id
25: AND (( X_ORG_ID IS NOT NULL AND
26: pvs.org_id = X_ORG_ID)