[Home] [Help]
PACKAGE: APPS.JE_ES_WHTAX
Source
1 PACKAGE je_es_whtax AS
2 /* $Header: jeeswhts.pls 120.6 2006/07/24 17:06:06 crathina ship $ */
3 /*#
4 * This contains public interfaces to insert and delete spanish
5 * external withholding transactions
6 * @rep:scope public
7 * @rep:product JE
8 * @rep:displayname Spanish Withholding Tax Open Interface
9 * @rep:lifecycle active
10 * @rep:compatibility S
11 * @rep:category BUSINESS_ENTITY JE_ES_WHT
12 */
13
14 /* Used to display PL/SQL Stored Procedure messages (to output) */
15
16 PROCEDURE plsqlmsg ( msg VARCHAR2);
17
18 /* Used to display SQL*PLUS messages */
19
20 PROCEDURE dbmsmsg ( msg VARCHAR2);
21
22 /* Used to DELETE transactions from JE_ES_MODELO_190_ALL */
23
24 /* Delete EXTERNAL transactions */
25 /*#
26 * Delete external withholding tax transactions from the interface table
27 * @param p_legal_entity_name Legal Entity Name
28 * @param p_fin_ind Record Source
29 * @rep:scope public
30 * @rep:lifecycle active
31 * @rep:displayname Delete External Withholding Tax Transactions
32 */
33 PROCEDURE del_trans_x ( -- p_org_name VARCHAR2,-- Bug 5207771 org_id removed
34 p_legal_entity_name VARCHAR2,
35 p_fin_ind VARCHAR2);
36
37 /* Delete Oracle Payables Hard Copy transactions */
38 PROCEDURE del_trans_s ( p_conc_req_id NUMBER,
39 p_legal_entity_id NUMBER,
40 p_org_id NUMBER);
41
42 /* Delete Oracle Payables Magnetic transactions */
43 PROCEDURE del_trans_m ( p_legal_entity_id NUMBER,
44 p_org_id NUMBER);
45
46
47 /* Used to INSERT transactions into JE_ES_MODELO_190_ALL */
48
49 /* Insert EXTERNAL PAID transactions */
50
51 /*#
52 * Insert external paid withholding tax transactions into the interface table
53 * @param p_legal_entity_name Legal Entity Identifier
54 * @param p_fin_ind Record Source
55 * @param p_remun_type Remuneration type
56 * @param p_vendor_nif Supplier taxpayer identifier
57 * @param p_vendor_name Supplier name
58 * @param p_date_paid Paid Date
59 * @param p_net_amount Net amount
60 * @param p_withholding_tax_amount Withholding tax amount
61 * @param p_zip_electronic Postal code/country
62 * @param p_num_children Number of children
63 * @param p_sign Sign of net amount
64 * @param p_tax_rate Tax rate
65 * @param p_year_due Year withholding tax is due
66 * @param p_sub_remun_type Subtype of remuneration
67 * @param p_withholdable_amt_in_kind Withholdable amount in kind
68 * @param p_withheld_amt_in_kind Withheld amount in kind
69 * @param p_withheld_pymt_amt_in_kind Withheld amounts for payments in kind
70 * @param p_earned_amounts Amounts earned in Ceuta or Melilla
71 * @param p_contract_type Type of contract
72 * @param p_birth_year Year of birth
73 * @param p_disabled Disabled
74 * @param p_family_situation Family situation
75 * @param p_partner_fiscal_code Partner's fiscal code
76 * @param p_descendant_lt_3 Descendants less than 3 years old
77 * @param p_descendant_bt_3_16 Descendants less than 3 and 16 years old
78 * @param p_descendant_bt_16_25 Descendants between 16 and 25 years old
79 * @param p_disable_desc_bt_33_65 Disabled descendants between 33% and 65%
80 * @param p_disable_desc_gt_65 Disabled descendants more than 65%
81 * @param p_descendant_total Total number of descendants
82 * @param p_deductions Deductions
83 * @param p_expenses Expenses
84 * @param p_spouse_maintenance_amt Maintenance of spouse
85 * @param p_children_maintenance_amt Maintenance of children
86 * @rep:scope public
87 * @rep:lifecycle active
88 * @rep:displayname Insert External Withholding Paid Transactions
89 */
90 PROCEDURE ins_trans ( p_legal_entity_name IN VARCHAR2,
91 -- p_org_name IN VARCHAR2, -- Bug 5207771 org_id removed
92 p_fin_ind IN VARCHAR2,
93 p_remun_type IN VARCHAR2,
94 p_vendor_nif IN VARCHAR2,
95 p_vendor_name IN VARCHAR2,
96 p_date_paid IN VARCHAR2,
97 p_net_amount IN NUMBER,
98 p_withholding_tax_amount IN NUMBER,
99 p_zip_electronic IN VARCHAR2,
100 p_num_children IN NUMBER,
101 p_sign IN VARCHAR2,
102 p_tax_rate IN NUMBER,
103 p_year_due IN NUMBER,
104 p_sub_remun_type IN VARCHAR2,
105 p_withholdable_amt_in_kind IN NUMBER,
106 p_withheld_amt_in_kind IN NUMBER,
107 p_withheld_pymt_amt_in_kind IN NUMBER,
108 p_earned_amounts IN NUMBER,
109 p_contract_type IN NUMBER,
110 p_birth_year IN NUMBER,
111 p_disabled IN NUMBER,
112 p_family_situation IN NUMBER,
113 p_partner_fiscal_code IN VARCHAR2,
114 p_descendant_lt_3 IN NUMBER,
115 p_descendant_bt_3_16 IN NUMBER,
116 p_descendant_bt_16_25 IN NUMBER,
117 p_disable_desc_bt_33_65 IN NUMBER,
118 p_disable_desc_gt_65 IN NUMBER,
119 p_descendant_total IN NUMBER,
120 p_deductions IN NUMBER,
121 p_expenses IN NUMBER,
122 p_spouse_maintenance_amt IN NUMBER,
123 p_children_maintenance_amt IN NUMBER
124 );
125
126 /* Insert EXTERNAL APPROVED transactions */
127 /*#
128 * Insert external approved withholding tax transactions into the interface table
129 * @param p_legal_entity_name Legal Entity Identifier
130 * @param p_fin_ind Record Source
131 * @param p_remun_type Remuneration type
132 * @param p_vendor_nif Supplier taxpayer identifier
133 * @param p_vendor_name Supplier name
134 * @param p_gl_date General Ledger date
135 * @param p_net_amount Net amount
136 * @param p_withholding_tax_amount Withholding tax amount
137 * @param p_zip_electronic Postal code/country
138 * @param p_num_children Number of children
139 * @param p_sign Sign of net amount
140 * @param p_tax_rate Tax rate
141 * @param p_year_due Year withholding tax is due
142 * @param p_sub_remun_type Subtype of remuneration
143 * @param p_withholdable_amt_in_kind Withholdable amount in kind
144 * @param p_withheld_amt_in_kind Withheld amount in kind
145 * @param p_withheld_pymt_amt_in_kind Withheld amounts for payments in kind
146 * @param p_earned_amounts Amounts earned in Ceuta or Melilla
147 * @param p_contract_type Type of contract
148 * @param p_birth_year Year of birth
149 * @param p_disabled Disabled
150 * @param p_family_situation Family situation
151 * @param p_partner_fiscal_code Partner's fiscal code
152 * @param p_descendant_lt_3 Descendants less than 3 years old
153 * @param p_descendant_bt_3_16 Descendants less than 3 and 16 years old
154 * @param p_descendant_bt_16_25 Descendants between 16 and 25 years old
155 * @param p_disable_desc_bt_33_65 Disabled descendants between 33% and 65%
156 * @param p_disable_desc_gt_65 Disabled descendants more than 65%
157 * @param p_descendant_total Total number of descendants
158 * @param p_deductions Deductions
159 * @param p_expenses Expenses
160 * @param p_spouse_maintenance_amt Maintenance of spouse
161 * @param p_children_maintenance_amt Maintenance of children
162 * @rep:scope public
163 * @rep:lifecycle active
164 * @rep:displayname Insert External Withholding Approved Transactions
165 */
166 PROCEDURE ins_trans ( p_legal_entity_name IN VARCHAR2,
167 -- p_org_name IN VARCHAR2, -- Bug 5207771 org_id removed
168 p_fin_ind IN VARCHAR2,
169 p_remun_type IN VARCHAR2,
170 p_vendor_nif IN VARCHAR2,
171 p_vendor_name IN VARCHAR2,
172 p_gl_date IN VARCHAR2,
173 p_net_amount IN NUMBER,
174 p_withholding_tax_amount IN NUMBER,
175 p_zip_electronic IN VARCHAR2,
176 p_num_children IN NUMBER,
177 p_sign IN VARCHAR2,
178 p_tax_rate IN NUMBER,
179 p_year_due IN NUMBER,
180 p_sub_remun_type IN VARCHAR2,
181 p_withholdable_amt_in_kind IN NUMBER,
182 p_withheld_amt_in_kind IN NUMBER,
183 p_withheld_pymt_amt_in_kind IN NUMBER,
184 p_earned_amounts IN NUMBER,
185 p_contract_type IN NUMBER,
186 p_birth_year IN NUMBER,
187 p_disabled IN NUMBER,
188 p_family_situation IN NUMBER,
189 p_partner_fiscal_code IN VARCHAR2,
190 p_descendant_lt_3 IN NUMBER,
191 p_descendant_bt_3_16 IN NUMBER,
192 p_descendant_bt_16_25 IN NUMBER,
193 p_disable_desc_bt_33_65 IN NUMBER,
194 p_disable_desc_gt_65 IN NUMBER,
195 p_descendant_total IN NUMBER,
196 p_deductions IN NUMBER,
197 p_expenses IN NUMBER,
198 p_spouse_maintenance_amt IN NUMBER,
199 p_children_maintenance_amt IN NUMBER
200 );
201
202 /* Insert Oracle Payables transactions */
203
204 PROCEDURE ins_trans ( legal_entity_id NUMBER,
205 org_id NUMBER,
206 conc_req_id NUMBER,
207 remun_type VARCHAR2,
208 sub_remun_type VARCHAR2,
209 vendor_nif VARCHAR2,
210 vendor_name VARCHAR2,
211 invoice_id NUMBER,
212 invoice_num VARCHAR2,
213 inv_doc_seq_num VARCHAR2,
214 invoice_date VARCHAR2,
215 gl_date VARCHAR2,
216 invoice_payment_id NUMBER,
217 date_paid VARCHAR2,
218 net_amount NUMBER,
219 withholding_tax_amount NUMBER,
220 zip_electronic VARCHAR2,
221 zip_legal VARCHAR2,
222 city_legal VARCHAR2,
223 num_children NUMBER,
224 sign VARCHAR2,
225 tax_rate NUMBER,
226 tax_name VARCHAR2,
227 year_due NUMBER
228 );
229
230 FUNCTION get_payments_count( l_invoice_id IN NUMBER,
231 l_legal_entity_id IN NUMBER default null,
232 l_org_id IN NUMBER default null) RETURN NUMBER;
233 FUNCTION get_amount_withheld( l_invoice_id IN NUMBER,
234 l_org_id IN NUMBER default null,
235 l_legal_entity_id IN NUMBER default null) RETURN NUMBER;
236 FUNCTION get_prepaid_amount( l_invoice_id IN NUMBER,
237 l_org_id IN NUMBER default null,
238 l_legal_entity_id IN NUMBER default null) RETURN NUMBER;
239 FUNCTION get_awt_net_total( l_invoice_id IN NUMBER,
240 l_legal_entity_id IN NUMBER default null,
241 l_org_id IN NUMBER default null,
242 l_accounting_date IN DATE) RETURN NUMBER;
243
244 PRAGMA RESTRICT_REFERENCES(get_payments_count, WNDS, WNPS, RNPS);
245 PRAGMA RESTRICT_REFERENCES(get_prepaid_amount, WNDS, WNPS, RNPS);
246 PRAGMA RESTRICT_REFERENCES(get_amount_withheld, WNDS, WNPS, RNPS);
247 PRAGMA RESTRICT_REFERENCES(get_awt_net_total, WNDS, WNPS, RNPS);
248
249 /* Used to gather transactions */
250
251 PROCEDURE get_data ( ERRBUF OUT NOCOPY VARCHAR2,
252 RETCODE OUT NOCOPY NUMBER,
253 p_pay_inv_sel VARCHAR2,
254 p_summary VARCHAR2,
255 p_date_from VARCHAR2,
256 p_date_to VARCHAR2,
257 p_vendor_id NUMBER default null,
258 p_conc_req_id NUMBER default null,
259 p_hard_copy VARCHAR2 default null,
260 p_wht_tax_type VARCHAR2,
261 p_legal_entity_id NUMBER default null,
262 p_org_id NUMBER default null);
263 END je_es_whtax;