1 PACKAGE BODY AP_WEB_DB_PO_INT_PKG AS
2 /* $Header: apwdbpob.pls 115.3 2003/11/06 20:42:07 kwidjaja noship $ */
3
4 --
5 -- Function Name: IsVendorValid
6 -- Author: Kristian Widjaja
7 -- Purpose: This function checks whether a given Supplier is
8 -- active as of a given date.
9 --
10 -- Input: p_vendor_id
11 -- p_effective_date
12 --
13 -- Output: 'Y' or 'N'
14 --
15 -- Notes: Bug 3215993
16 -- Inactive Employees and Contingent Workers project
17
18 FUNCTION IsVendorValid(p_vendor_id IN NUMBER,
19 p_effective_date IN DATE default SYSDATE
20 ) return VARCHAR2 IS
21
22 BEGIN
23
24 /* Check if the given Supplier is active */
25 /* We are ignoring the effective_date for now */
26 IF (PO_VENDORS_SV.val_vendor(p_vendor_id)) THEN
27 RETURN 'Y';
28 ELSE
29 RETURN 'N';
30 END IF;
31
32 END IsVendorValid;
33
34 --
35 -- Function Name: IsVendorSiteValid
36 -- Author: Kristian Widjaja
37 -- Purpose: This function checks whether a given Supplier Site is
38 -- active as of a given date.
39 --
40 -- Input: p_vendor_id
41 -- p_effective_date
42 --
43 -- Output: 'Y' or 'N'
44 --
45 -- Notes: Bug 3215993
46 -- Inactive Employees and Contingent Workers project
47
48 FUNCTION IsVendorSiteValid(p_vendor_site_id IN NUMBER,
49 p_effective_date IN DATE default SYSDATE
50 ) return VARCHAR2 IS
51
52 BEGIN
53
54 /* Check if the given Supplier Site is active. */
55 /* We are ignoring the effective date for now. */
56 IF (PO_VENDOR_SITES_SV.val_vendor_site_id('PO',p_vendor_site_id)) THEN
57 RETURN 'Y';
58 ELSE
59 RETURN 'N';
60 END IF;
61
62 END IsVendorSiteValid;
63
64 END AP_WEB_DB_PO_INT_PKG;