1: package body jg_zz_vat_alloc_rules_pkg as
2: /* $Header: jgzzvarb.pls 120.4.12010000.2 2009/06/17 05:14:14 vkejriwa ship $*/
3: /* CHANGE HISTORY ------------------------------------------------------------------------------------------
4: DATE AUTHOR VERSION BUG NO. DESCRIPTION
5: (DD/MM/YYYY) (UID)
17: 17/06/2009 VKEJRIWA 120.4.12000000.2 8587516 Added the taxable_box_recoverable and taxable_rec_sign_flag
18: field to all the procedures
19: -----------------------------------------------------------------------------------------------------------*/
20: procedure insert_row
21: ( x_record jg_zz_vat_alloc_rules%rowtype
22: , x_allocation_rule_id out nocopy jg_zz_vat_alloc_rules.allocation_rule_id%type
23: , x_row_id out nocopy rowid
24: )
25: is
18: field to all the procedures
19: -----------------------------------------------------------------------------------------------------------*/
20: procedure insert_row
21: ( x_record jg_zz_vat_alloc_rules%rowtype
22: , x_allocation_rule_id out nocopy jg_zz_vat_alloc_rules.allocation_rule_id%type
23: , x_row_id out nocopy rowid
24: )
25: is
26:
25: is
26:
27: cursor c_gen_alloc_rule_id
28: is
29: select jg_zz_vat_alloc_rules_s.nextval
30: from dual;
31:
32: begin
33:
40: /* Use the allocation_rule_id given in the procedure arguments */
41: x_allocation_rule_id := x_record.allocation_rule_id;
42: end if;
43:
44: insert into jg_zz_vat_alloc_rules
45: ( allocation_rule_id
46: , vat_reporting_entity_id
47: , source
48: , financial_document_type
114: /*------------------------------------------------------------------------------------------------------------*/
115:
116: procedure lock_row
117: ( x_row_id rowid
118: , x_record jg_zz_vat_alloc_rules%rowtype
119: )
120: is
121:
122: cursor c_locked_row is
120: is
121:
122: cursor c_locked_row is
123: select jzvar.*
124: from jg_zz_vat_alloc_rules jzvar
125: where rowid = x_row_id
126: for update nowait;
127:
128: lr_locked_row jg_zz_vat_alloc_rules%rowtype;
124: from jg_zz_vat_alloc_rules jzvar
125: where rowid = x_row_id
126: for update nowait;
127:
128: lr_locked_row jg_zz_vat_alloc_rules%rowtype;
129:
130: begin
131:
132: open c_locked_row;
172: end lock_row;
173:
174: /*------------------------------------------------------------------------------------------------------------*/
175:
176: procedure update_row( x_record jg_zz_vat_alloc_rules%rowtype
177: )
178: is
179: le_no_rows_updated exception;
180: lx_row_id rowid;
180: lx_row_id rowid;
181:
182: begin
183:
184: update jg_zz_vat_alloc_rules
185: set vat_reporting_entity_id = x_record.vat_reporting_entity_id
186: , source = x_record.source
187: , financial_document_type = x_record.financial_document_type
188: , vat_transaction_type = x_record.vat_transaction_type
214: end update_row;
215:
216: /*------------------------------------------------------------------------------------------------------------*/
217:
218: procedure delete_row( x_allocation_rule_id jg_zz_vat_alloc_rules.allocation_rule_id%type)
219: is
220: le_no_rows_deleted exception;
221: begin
222:
219: is
220: le_no_rows_deleted exception;
221: begin
222:
223: delete from jg_zz_vat_alloc_rules
224: where allocation_rule_id = x_allocation_rule_id ;
225:
226: end delete_row;
227:
224: where allocation_rule_id = x_allocation_rule_id ;
225:
226: end delete_row;
227:
228: end jg_zz_vat_alloc_rules_pkg;