DBA Data[Home] [Help]

PACKAGE BODY: APPS.PER_ES_LOCATION

Source


1 PACKAGE body per_es_location AS
2 /* $Header: peesladp.pkb 120.1 2006/09/14 14:36:40 mgettins noship $ */
3   g_package  VARCHAR2(33) := 'per_es_location.';
4 --
5 PROCEDURE check_es_location (p_style              IN VARCHAR2
6                             ,p_postal_code        IN VARCHAR2
7                             ,p_region_2           IN VARCHAR2) IS
8     --
9     l_province_code     varchar2(2);
10     --
11 BEGIN
12     --
13     IF  p_style='ES' THEN
14         IF  p_postal_code IS NOT NULL THEN
15             l_province_code := substr(p_postal_code,1,2);
16             IF  l_province_code <> p_region_2 THEN
17                 hr_utility.set_message(800,'HR_ES_INVALID_VALUE');
18                 hr_utility.set_message_token(800,'FIELD',hr_general.decode_lookup('ES_FORM_LABELS','POSTAL_CODE'));
19                 hr_utility.raise_error;
20             END IF;
21         END IF;
22     END IF;
23     --
24 END check_es_location;
25 --
26 PROCEDURE create_es_location (p_style        IN VARCHAR2
27                              ,p_postal_code  IN VARCHAR2
28                              ,p_region_2     IN VARCHAR2) IS
29 BEGIN
30   --
31   -- Added for GSI Bug 5472781
32   --
33   IF hr_utility.chk_product_install('Oracle Human Resources', 'ES') THEN
34     --
35     per_es_location.check_es_location(p_style         => p_style
36                                      ,p_postal_code   => p_postal_code
37                                      ,p_region_2      => p_region_2);
38     --
39   END IF;
40   --
41 END create_es_location;
42 --
43 PROCEDURE update_es_location (p_style        IN VARCHAR2
44                              ,p_postal_code  IN VARCHAR2
45                              ,p_region_2     IN VARCHAR2) is
46 --
47 BEGIN
48   --
49   -- Added for GSI Bug 5472781
50   --
51   IF hr_utility.chk_product_install('Oracle Human Resources', 'ES') THEN
52     --
53     per_es_location.check_es_location(p_style         => p_style
54                                      ,p_postal_code   => p_postal_code
55                                      ,p_region_2      => p_region_2);
56     --
57   END IF;
58   --
59 END update_es_location;
60 --
61 END per_es_location;