DBA Data[Home] [Help]

PACKAGE BODY: APPS.JG_ZZ_JGZZALRL_PKG

Source


1 PACKAGE BODY JG_ZZ_JGZZALRL_PKG AS
2 /*$Header: jgzzarlb.pls 120.0.12000000.2 2007/04/11 15:24:10 mbarrett noship $*/
3 
4    FUNCTION get_entity_identifier Return Varchar2 Is
5       l_entity_identifier JG_ZZ_VAT_REP_ENTITIES.entity_identifier%Type := Null;
6    begin
7       Select entity_identifier
8       Into l_entity_identifier
9       From JG_ZZ_VAT_REP_ENTITIES
10       where vat_reporting_entity_id = p_vat_reporting_entity_id;
11 
12       Return l_entity_identifier;
13    Exception
14       When Others Then
15          Return l_entity_identifier;
16    End get_entity_identifier;
17 
18    Function get_source Return Varchar2 Is
19       l_source FND_LOOKUP_VALUES.meaning%Type := Null;
20    Begin
21       select meaning
22       Into l_source
23       From FND_LOOKUP_VALUES
24       Where lookup_type='JGZZ_SOURCE'
25       And lookup_code = p_source
26       And language = userenv('LANG');
27 
28       Return l_source;
29    Exception
30       When Others Then
31          Return l_source;
32    End get_source;
33 
34    Function get_fin_tran_type Return Varchar2 Is
35       l_fin_tran_type FND_LOOKUP_VALUES.meaning%Type := Null;
36    Begin
37       Select meaning
38       Into l_fin_tran_type
39       From FND_LOOKUP_VALUES
40       Where ( (p_source = 'AP'
41                and lookup_type = 'JGZZ_AP_OF_TRANS_TYPE')
42              Or
43               (p_source = 'AR'
44                and lookup_type = 'JGZZ_AR_OF_TRANS_TYPE')
45              Or
46               (p_source = 'GL'
47                and lookup_type = 'JGZZ_GL_OF_TRANS_TYPE')
48              Or
49               (p_source = 'ALL'
50                and lookup_type in ('JGZZ_AP_OF_TRANS_TYPE'
51                                   ,'JGZZ_AR_OF_TRANS_TYPE'
52                                   ,'JGZZ_GL_OF_TRANS_TYPE')))
53       And lookup_code = p_fin_tran_type
54       And language = userenv('LANG');
55 
56       Return l_fin_tran_type;
57    Exception
58       When Others Then
59          Return l_fin_tran_type;
60    End get_fin_tran_type;
61 
62    Function get_vat_tran_type Return Varchar2 Is
63       l_vat_tran_type FND_LOOKUP_VALUES.meaning%Type := Null;
64    Begin
65       Select meaning
66       Into l_vat_tran_type
67       From FND_LOOKUP_VALUES
68       Where lookup_type = 'ZX_JEBE_VAT_TRANS_TYPE'
69       And lookup_code = p_vat_tran_type
70       And language = userenv('LANG');
71 
72       Return l_vat_tran_type;
73    Exception
74       When Others Then
75          Return l_vat_tran_type;
76    End get_vat_tran_type;
77 
78    Function get_tax_status_code Return Varchar2 Is
79       l_tax_status_code ZX_STATUS_B.tax_status_code%Type := Null;
80    Begin
81       Select tax_status_code
82       Into l_tax_status_code
83       From ZX_STATUS_B
84       Where tax = nvl(p_tax_code,tax)
85       And tax_regime_code = nvl(p_vat_regime,tax_regime_code)
86       And tax_status_id = p_tax_status;
87 
88       Return l_tax_status_code;
89    Exception
90       When Others Then
91          Return l_tax_status_code;
92    End get_tax_status_code;
93 
94    Function get_tax_rate_code Return Varchar2 Is
95       l_tax_rate_code ZX_RATES_B.tax_rate_code%Type;
96    Begin
97       Select rates.TAX_RATE_CODE
98       Into l_tax_rate_code
99       From ZX_RATES_B rates
100       Where rates.tax_rate_id = p_tax_rate_id;
101 
102       Return l_tax_rate_code;
103    Exception
104       When Others Then
105          Return l_tax_rate_code;
106    End get_tax_rate_code;
107 
108 
109    Function get_tax_box Return Varchar2 Is
110       l_tax_box FND_LOOKUP_VALUES.meaning%Type := Null;
111    Begin
112       Select meaning
113       Into l_tax_box
114       From fnd_lookup_values
115       WHERE lookup_type='JGZZ_VAT_REPORT_BOXES'
116       And lookup_code = p_tax_box
117       And language = userenv('LANG');
118 
119       Return l_tax_box;
120    Exception
121       When Others Then
122          Return l_tax_box;
123    End get_tax_box;
124 
125    Function get_non_rec_tax_box Return Varchar2 Is
126       l_non_rec_tax_box FND_LOOKUP_VALUES.meaning%Type := Null;
127    Begin
128       Select meaning
129       Into l_non_rec_tax_box
130       From fnd_lookup_values
131       WHERE lookup_type='JGZZ_VAT_REPORT_BOXES'
132       And lookup_code = p_non_rec_tax_box
133       And language = userenv('LANG');
134 
135       Return l_non_rec_tax_box;
136    Exception
137       When Others Then
138          Return l_non_rec_tax_box;
139    End get_non_rec_tax_box;
140 
141    Function get_taxable_box Return Varchar2 Is
142       l_taxable_box FND_LOOKUP_VALUES.meaning%Type := Null;
143    Begin
144       Select meaning
145       Into l_taxable_box
146       From fnd_lookup_values
147       WHERE lookup_type='JGZZ_VAT_REPORT_BOXES'
148       And lookup_code = p_taxable_box
149       And language = userenv('LANG');
150 
151       Return l_taxable_box;
152    Exception
153       When Others Then
154          Return l_taxable_box;
155    End get_taxable_box;
156 
157    Function get_non_rec_taxable_box Return Varchar2 Is
158      l_non_rec_taxable_box FND_LOOKUP_VALUES.meaning%Type := Null;
159    Begin
160       Select meaning
161       Into l_non_rec_taxable_box
162       From fnd_lookup_values
163       WHERE lookup_type='JGZZ_VAT_REPORT_BOXES'
164       And lookup_code = p_non_rec_taxable_box
165       And language = userenv('LANG');
166 
167       Return l_non_rec_taxable_box;
168    Exception
169       When Others Then
170          Return l_non_rec_taxable_box;
171    End get_non_rec_taxable_box;
172 
173 END JG_ZZ_JGZZALRL_PKG;