[Home] [Help]
PACKAGE BODY: APPS.AP_REPORTS_UTILITY_PKG
Source
1 PACKAGE BODY AP_REPORTS_UTILITY_PKG AS
2 /* $Header: aprptutb.pls 120.3 2004/10/29 18:54:52 pjena noship $ */
3
4 FUNCTION get_period_name(l_invoice_id IN NUMBER) RETURN VARCHAR2
5 IS
6 l_sob_id NUMBER;
7 l_inv_date DATE;
8 l_period_name gl_period_statuses.period_name%TYPE := '';
9 BEGIN
10 select set_of_books_id, invoice_date
11 into l_sob_id, l_inv_date
12 from ap_invoices_all
13 where invoice_id = l_invoice_id;
14
15 select period_name
16 into l_period_name
17 from gl_period_statuses
18 where application_id = 200
19 and set_of_books_id = l_sob_id
20 and l_inv_Date between start_date and end_date;
21
22 return(l_period_name);
23
24 END get_period_name;
25
26
27 FUNCTION get_check_period_name(l_check_id IN NUMBER) RETURN VARCHAR2
28 IS
29 l_sob_id NUMBER;
30 l_check_date DATE;
31 l_period_name gl_period_statuses.period_name%TYPE := '';
32 BEGIN
33 select APS.set_of_books_id, AC.check_date
34 into l_sob_id, l_check_date
35 from ap_checks_all AC, ap_system_parameters_all APS
36 where check_id = l_check_id
37 and AC.org_id = APS.org_id;
38
39 select period_name
40 into l_period_name
41 from gl_period_statuses
42 where application_id = 200
43 and set_of_books_id = l_sob_id
44 and l_check_date between start_date and end_date;
45
46 return(l_period_name);
47
48 END get_check_period_name;
49
50
51 END AP_REPORTS_UTILITY_PKG;