[Home] [Help]
PACKAGE BODY: APPS.PAY_KR_RULES
Source
1 package body pay_kr_rules as
2 /* $Header: pykrrule.pkb 120.2.12000000.1 2007/01/17 22:14:24 appldev noship $ */
3 /*
4 Copyright (c) Oracle Corporation 1991,1992,1993,1994. All rights reserved
5 --
6 Name : pay_kr_rules
7 --
8 Change List
9 -----------
10 Date Name Vers Bug Description
11 ----------- ---------- ----- -------- -------------------------------------------
12 10-APR-2002 nbristow 115.0 Created.
13 12-DEC-2002 krapolu 115.1 Added the NOCOPY directive.
14 07-FEB-2006 mmark 115.2 4913403 Added GET_DYNAMIC_ORG_METH
15 08-FEB-2006 mmark 115.3 4913403 Updated procedure GET_DYNAMIC_ORG_METH
16 - Removed cursor CSR_EFF_DATE
17 - Used language from userenv('LANG')
18 */
19 --
20 --
21 procedure get_default_run_type(p_asg_id in number,
22 p_ee_id in number,
23 p_effdate in date,
24 p_run_type out NOCOPY varchar2)
25 is
26 l_run_type_id number;
27 begin
28 select run_type_id
29 into l_run_type_id
30 from pay_run_types_f
31 where run_type_name = 'MTH'
32 and p_effdate between effective_start_date
33 and effective_end_date;
34 --
35 p_run_type := to_char(l_run_type_id);
36 --
37 end get_default_run_type;
38
39 --
40 procedure get_dynamic_org_meth(
41 p_assignment_action_id in number,
42 p_effective_date in date,
43 p_org_meth in number, -- org meth with no bank account
44 p_org_method_id out nocopy number
45 )
46 is
47
48 --
49 cursor csr_pay_meth_name is
50 select ppmtl.org_payment_method_name
51 from
52 pay_org_payment_methods_f_tl ppmtl,
53 pay_org_payment_methods_f ppm
54 where
55 ppmtl.org_payment_method_id = p_org_meth
56 and ppm.org_payment_method_id = p_org_meth
57 and ppm.external_account_id is null
58 and ppmtl.language = userenv('LANG')
59 and p_effective_date between ppm.effective_start_date and ppm.effective_end_date ;
60 --
61 l_pay_meth_name pay_org_payment_methods_f_tl.org_payment_method_name%type ;
62 --
63 begin
64 --
65 open csr_pay_meth_name ;
66 fetch csr_pay_meth_name into l_pay_meth_name ;
67 --
68 if csr_pay_meth_name%found then
69 hr_utility.set_message(801, 'PAY_KR_INV_ORG_PAY_METHOD') ;
70 hr_utility.set_message_token('PAY_METH_NAME', l_pay_meth_name) ;
71 hr_utility.raise_error;
72 end if ;
73 --
74 close csr_pay_meth_name ;
75 --
76 end get_dynamic_org_meth ;
77 --
78 end pay_kr_rules;