DBA Data[Home] [Help]

APPS.JG_ZZ_VAT_REP_UTILITY dependencies on JG_ZZ_VAT_REP_STATUS

Line 43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,

39:
40: /* ================================== start of insert_rows - INTERNAL procedure =============================== */
41: procedure insert_row
42: (
43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,

Line 44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,

40: /* ================================== start of insert_rows - INTERNAL procedure =============================== */
41: procedure insert_row
42: (
43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,

Line 45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,

41: procedure insert_row
42: (
43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,

Line 46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,

42: (
43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,

Line 47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,

43: xn_reporting_status_id out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,

Line 48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,

44: pn_vat_reporting_entity_id in jg_zz_vat_rep_status.vat_reporting_entity_id%type,
45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,
52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type

Line 49: pv_source in jg_zz_vat_rep_status.source%type,

45: pv_tax_registration_number in jg_zz_vat_rep_status.tax_registration_number%type,
46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,
52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type
53: )

Line 50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,

46: pv_tax_calendar_name in jg_zz_vat_rep_status.tax_calendar_name%type,
47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,
52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type
53: )
54: is

Line 51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,

47: pn_tax_calendar_year in jg_zz_vat_rep_status.tax_calendar_year%type,
48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,
52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type
53: )
54: is
55:

Line 52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type

48: pv_tax_calendar_period in jg_zz_vat_rep_status.tax_calendar_period%type,
49: pv_source in jg_zz_vat_rep_status.source%type,
50: pd_period_start_date in jg_zz_vat_rep_status.period_start_date%type,
51: pd_period_end_date in jg_zz_vat_rep_status.period_end_date%type,
52: pn_mapping_vat_rep_entity_id in jg_zz_vat_rep_status.mapping_vat_rep_entity_id%type
53: )
54: is
55:
56: begin

Line 58: insert into jg_zz_vat_rep_status

54: is
55:
56: begin
57:
58: insert into jg_zz_vat_rep_status
59: (
60: reporting_status_id ,
61: vat_reporting_entity_id ,
62: tax_registration_number ,

Line 83: jg_zz_vat_rep_status_s.nextval ,

79: mapping_vat_rep_entity_id /* Revised Approach Change */
80: )
81: values
82: (
83: jg_zz_vat_rep_status_s.nextval ,
84: pn_vat_reporting_entity_id ,
85: pv_tax_registration_number ,
86: pv_tax_calendar_name ,
87: pn_tax_calendar_year ,

Line 113: pv_source in jg_zz_vat_rep_status.source%type,

109: /* =========================== Start of get_last_processed_date ======================= */
110: function get_last_processed_date
111: (
112: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
113: pv_source in jg_zz_vat_rep_status.source%type,
114: pv_process_name in varchar2 /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
115: )
116: return date is
117:

Line 118: lv_source jg_zz_vat_rep_status.source%type;

114: pv_process_name in varchar2 /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
115: )
116: return date is
117:
118: lv_source jg_zz_vat_rep_status.source%type;
119: ld_last_processed_date date;
120: ld_last_processed_date_source date;
121:
122: cursor c_get_last_processed_date_src ( pn_vat_reporting_entity_id number, pv_source varchar2, pv_process_name varchar2 ) is

Line 126: jg_zz_vat_rep_status

122: cursor c_get_last_processed_date_src ( pn_vat_reporting_entity_id number, pv_source varchar2, pv_process_name varchar2 ) is
123: select
124: max(period_end_date)
125: from
126: jg_zz_vat_rep_status
127: where
128: vat_reporting_entity_id = pn_vat_reporting_entity_id
129: and ( pv_source = 'ALL' or source = pv_source)
130: and (

Line 210: pv_source in jg_zz_vat_rep_status.source%type,

206: pv_period_set_name in gl_periods.period_set_name%type,
207: pv_tax_calendar_period in gl_periods.period_name%type,
208: pd_start_date in gl_periods.START_DATE%type,
209: pd_end_date in gl_periods.end_date%type,
210: pv_source in jg_zz_vat_rep_status.source%type,
211: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
212: xv_return_status out nocopy varchar2,
213: xv_return_message out nocopy varchar2
214: )

Line 288: pv_source in jg_zz_vat_rep_status.source%type,

284: procedure pre_process_update
285: (
286: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
287: pv_tax_calendar_period in gl_periods.period_name%type,
288: pv_source in jg_zz_vat_rep_status.source%type,
289: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
290: xv_return_status out nocopy varchar2, /* Possible Values : E - Error, S - Successful */
291: xv_return_message out nocopy varchar2
292: )

Line 299: jg_zz_vat_rep_status

295:
296: If pv_process_name = 'SELECTION' then
297:
298: update
299: jg_zz_vat_rep_status
300: Set
301: selection_status_flag = null,
302: Selection_process_id = null,
303: selection_process_date = null,

Line 321: jg_zz_vat_rep_status

317:
318: elsif pv_process_name = 'ALLOCATION' then
319:
320: update
321: jg_zz_vat_rep_status
322: Set
323: allocation_status_flag = null,
324: allocation_process_id = null,
325: allocation_process_date = null,

Line 340: jg_zz_vat_rep_status

336:
337: elsif pv_process_name = 'FINAL REPORTING' then
338:
339: update
340: jg_zz_vat_rep_status
341: Set
342: final_reporting_status_flag = null,
343: final_reporting_process_id = null,
344: final_reporting_process_date = null,

Line 367: pv_source in jg_zz_vat_rep_status.source%type,

363: procedure validate_process_initiation
364: (
365: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
366: pv_tax_calendar_period in gl_periods.period_name%type,
367: pv_source in jg_zz_vat_rep_status.source%type,
368: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
369: pv_reallocate_flag in varchar2 default null, /* Valid for allocation only, Possible values Y or N or nul */
370: xn_reporting_status_id_ap out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
371: xn_reporting_status_id_ar out nocopy jg_zz_vat_rep_status.reporting_status_id%type,

Line 370: xn_reporting_status_id_ap out nocopy jg_zz_vat_rep_status.reporting_status_id%type,

366: pv_tax_calendar_period in gl_periods.period_name%type,
367: pv_source in jg_zz_vat_rep_status.source%type,
368: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
369: pv_reallocate_flag in varchar2 default null, /* Valid for allocation only, Possible values Y or N or nul */
370: xn_reporting_status_id_ap out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
371: xn_reporting_status_id_ar out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
372: xn_reporting_status_id_gl out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
373: xv_return_status out nocopy varchar2,
374: xv_return_message out nocopy varchar2

Line 371: xn_reporting_status_id_ar out nocopy jg_zz_vat_rep_status.reporting_status_id%type,

367: pv_source in jg_zz_vat_rep_status.source%type,
368: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
369: pv_reallocate_flag in varchar2 default null, /* Valid for allocation only, Possible values Y or N or nul */
370: xn_reporting_status_id_ap out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
371: xn_reporting_status_id_ar out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
372: xn_reporting_status_id_gl out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
373: xv_return_status out nocopy varchar2,
374: xv_return_message out nocopy varchar2
375: )

Line 372: xn_reporting_status_id_gl out nocopy jg_zz_vat_rep_status.reporting_status_id%type,

368: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
369: pv_reallocate_flag in varchar2 default null, /* Valid for allocation only, Possible values Y or N or nul */
370: xn_reporting_status_id_ap out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
371: xn_reporting_status_id_ar out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
372: xn_reporting_status_id_gl out nocopy jg_zz_vat_rep_status.reporting_status_id%type,
373: xv_return_status out nocopy varchar2,
374: xv_return_message out nocopy varchar2
375: )
376: is

Line 378: lv_source jg_zz_vat_rep_status.source%type;

374: xv_return_message out nocopy varchar2
375: )
376: is
377:
378: lv_source jg_zz_vat_rep_status.source%type;
379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;

Line 379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;

375: )
376: is
377:
378: lv_source jg_zz_vat_rep_status.source%type;
379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;

Line 380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;

376: is
377:
378: lv_source jg_zz_vat_rep_status.source%type;
379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;

Line 381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;

377:
378: lv_source jg_zz_vat_rep_status.source%type;
379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;
385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;

Line 382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;

378: lv_source jg_zz_vat_rep_status.source%type;
379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;
385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;
386: lv_return_status varchar2(1);

Line 383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;

379: ln_reporting_status_id jg_zz_vat_rep_status.reporting_status_id%type;
380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;
385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;
386: lv_return_status varchar2(1);
387: lv_return_message varchar2(254);

Line 384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;

380: lv_selection_status_flag jg_zz_vat_rep_status.selection_status_flag%type;
381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;
385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;
386: lv_return_status varchar2(1);
387: lv_return_message varchar2(254);
388:

Line 385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;

381: lv_allocation_status_flag jg_zz_vat_rep_status.allocation_status_flag%type;
382: lv_final_reporting_status_flag jg_zz_vat_rep_status.final_reporting_status_flag%type;
383: ld_period_start_date jg_zz_vat_rep_status.period_start_date%type;
384: ld_period_end_date jg_zz_vat_rep_status.period_end_date%type;
385: ln_tax_calendar_year jg_zz_vat_rep_status.tax_calendar_year%type;
386: lv_return_status varchar2(1);
387: lv_return_message varchar2(254);
388:
389: lv_tax_registration_number jg_zz_vat_rep_entities.tax_registration_number%type;

Line 395: cursor c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id number, pv_tax_calendar_period varchar2, pv_source varchar2) is

391: lv_enable_allocations_flag jg_zz_vat_rep_entities.enable_allocations_flag%type;
392: ln_mapping_vat_rep_entity_id jg_zz_vat_rep_entities.mapping_vat_rep_entity_id%type;
393:
394:
395: cursor c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id number, pv_tax_calendar_period varchar2, pv_source varchar2) is
396: select
397: reporting_status_id,
398: nvl(selection_status_flag, 'N') selection_status_flag,
399: nvl(allocation_status_flag, 'N') allocation_status_flag,

Line 405: jg_zz_vat_rep_status

401: period_start_date,
402: period_end_date,
403: tax_calendar_name
404: from
405: jg_zz_vat_rep_status
406: where
407: vat_reporting_entity_id = pn_vat_reporting_entity_id
408: and tax_calendar_period = pv_tax_calendar_period
409: and source = pv_source;

Line 434: cur_rec_jg_zz_vat_rep_status c_jg_zz_vat_rep_status%rowtype;

430: where
431: period_set_name = pv_tax_calendar_name
432: and period_name = pv_tax_calendar_period;
433:
434: cur_rec_jg_zz_vat_rep_status c_jg_zz_vat_rep_status%rowtype;
435: cur_rec_jg_zz_vat_rep_entities c_jg_zz_vat_rep_entities%rowtype;
436: cur_rec_gl_periods c_gl_periods%rowtype;
437:
438: begin

Line 491: cur_rec_jg_zz_vat_rep_status := null;

487: loop
488:
489: ln_reporting_status_id := null;
490: /* Check if a record already exists for the given combination */
491: cur_rec_jg_zz_vat_rep_status := null;
492:
493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);
494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;
495: close c_jg_zz_vat_rep_status;

Line 493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);

489: ln_reporting_status_id := null;
490: /* Check if a record already exists for the given combination */
491: cur_rec_jg_zz_vat_rep_status := null;
492:
493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);
494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;
495: close c_jg_zz_vat_rep_status;
496:
497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then

Line 494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;

490: /* Check if a record already exists for the given combination */
491: cur_rec_jg_zz_vat_rep_status := null;
492:
493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);
494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;
495: close c_jg_zz_vat_rep_status;
496:
497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then
498:

Line 495: close c_jg_zz_vat_rep_status;

491: cur_rec_jg_zz_vat_rep_status := null;
492:
493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);
494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;
495: close c_jg_zz_vat_rep_status;
496:
497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then
498:
499: /* Record does not exist in jg_zz_vat_rep_status for the given combination */

Line 497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then

493: open c_jg_zz_vat_rep_status(pn_vat_reporting_entity_id, pv_tax_calendar_period, lv_source);
494: fetch c_jg_zz_vat_rep_status into cur_rec_jg_zz_vat_rep_status;
495: close c_jg_zz_vat_rep_status;
496:
497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then
498:
499: /* Record does not exist in jg_zz_vat_rep_status for the given combination */
500:
501: /* Validation#1 : Only selection process can initiate the entire processing, for other processes selection should have run */

Line 499: /* Record does not exist in jg_zz_vat_rep_status for the given combination */

495: close c_jg_zz_vat_rep_status;
496:
497: if cur_rec_jg_zz_vat_rep_status.reporting_status_id is null then
498:
499: /* Record does not exist in jg_zz_vat_rep_status for the given combination */
500:
501: /* Validation#1 : Only selection process can initiate the entire processing, for other processes selection should have run */
502: if pv_process_name <> 'SELECTION' then
503: fnd_message.set_name('JG', 'JG_ZZ_VAT_NO_SELECTION');

Line 512: /* Need to insert a record in jg_zz_vat_rep_status, extra info needs to be fetched which is common for all source */

508: goto error_exit_from_procedure;
509: end if;
510:
511: /* Control comes here only Selection process is being run for the first time for a given combination */
512: /* Need to insert a record in jg_zz_vat_rep_status, extra info needs to be fetched which is common for all source */
513:
514: if ld_period_start_date is null then
515:
516: /* common information across all sources is not fetched at all, so need to fetch */

Line 550: /* insert a record into jg_zz_vat_rep_status by source */

546:
547: */
548:
549:
550: /* insert a record into jg_zz_vat_rep_status by source */
551: insert_row
552: (
553: xn_reporting_status_id => ln_reporting_status_id ,
554: pn_vat_reporting_entity_id => pn_vat_reporting_entity_id ,

Line 567: /* Record exists in jg_zz_vat_rep_status for the given combination */

563: );
564:
565: else
566:
567: /* Record exists in jg_zz_vat_rep_status for the given combination */
568:
569: /* Validation # 2: Common validation - Final reporting should not have happened */
570: if cur_rec_jg_zz_vat_rep_status.final_reporting_status_flag = fnd_api.g_ret_sts_success then
571: fnd_message.set_name('JG', 'JG_ZZ_VAT_FINALLY_REPORTED');

Line 570: if cur_rec_jg_zz_vat_rep_status.final_reporting_status_flag = fnd_api.g_ret_sts_success then

566:
567: /* Record exists in jg_zz_vat_rep_status for the given combination */
568:
569: /* Validation # 2: Common validation - Final reporting should not have happened */
570: if cur_rec_jg_zz_vat_rep_status.final_reporting_status_flag = fnd_api.g_ret_sts_success then
571: fnd_message.set_name('JG', 'JG_ZZ_VAT_FINALLY_REPORTED');
572: fnd_message.set_token('SOURCE', lv_source);
573: fnd_message.set_token('PROCESS_NAME', pv_process_name);
574: xv_return_message := fnd_message.get;

Line 584: /* There should not be any gap in period for selection, but if the record exists in jg_zz_vat_rep_status,

580: /* Validations and processing by process */
581:
582: if pv_process_name = 'SELECTION' then
583:
584: /* There should not be any gap in period for selection, but if the record exists in jg_zz_vat_rep_status,
585: it means that selection had already happened. So this check is not required as it is checked when selection happens first time. */
586:
587: /* There is no other validation required for SELECTION, need to flush allocation and already selected data if any */
588:

Line 589: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> 'N' then

585: it means that selection had already happened. So this check is not required as it is checked when selection happens first time. */
586:
587: /* There is no other validation required for SELECTION, need to flush allocation and already selected data if any */
588:
589: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> 'N' then
590: /* invoke the allocation API to purge the allocation data.*/
591:
592: jg_zz_vat_alloc_prc_pkg.purge_allocation_data
593: (

Line 594: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,

590: /* invoke the allocation API to purge the allocation data.*/
591:
592: jg_zz_vat_alloc_prc_pkg.purge_allocation_data
593: (
594: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,
595: pv_reallocate_flag => 'Y', --pv_reallocate_flag, bug#5275230
596: xv_return_status => xv_return_status,
597: xv_return_message => xv_return_message
598: );

Line 610: p_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,

606: /* invoke the selection API to purge the selection data,
607: control comes here only when selection has already happened, so no need to check the flag */
608: jg_zz_vat_selection_pkg.purge_tax_data
609: (
610: p_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,
611: x_return_status => xv_return_status
612: );
613:
614: if xv_return_status <> fnd_api.g_ret_sts_success then

Line 624: if cur_rec_jg_zz_vat_rep_status.selection_status_flag <> fnd_api.g_ret_sts_success then

620:
621: elsif pv_process_name = 'ALLOCATION' then
622:
623: /* Check if selection has already happened successfully */
624: if cur_rec_jg_zz_vat_rep_status.selection_status_flag <> fnd_api.g_ret_sts_success then
625: fnd_message.set_name('JG', 'JG_ZZ_VAT_ERROR_SELECTION');
626: fnd_message.set_token('SOURCE', lv_source);
627: fnd_message.set_token('PROCESS_NAME', pv_process_name);
628: xv_return_message := fnd_message.get;

Line 637: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> 'N' then

633:
634: if cur_rec_jg_zz_vat_rep_entities.enable_allocations_flag <> 'Y' then
635:
636: /* Check if allocation records need to be purged, there could be a change in setup */
637: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> 'N' then
638: /* invoke the allocation API to purge the allocation data.*/
639: jg_zz_vat_alloc_prc_pkg.purge_allocation_data
640: (
641: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,

Line 641: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,

637: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> 'N' then
638: /* invoke the allocation API to purge the allocation data.*/
639: jg_zz_vat_alloc_prc_pkg.purge_allocation_data
640: (
641: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,
642: pv_reallocate_flag => pv_reallocate_flag,
643: xv_return_status => xv_return_status,
644: xv_return_message => xv_return_message
645: );

Line 660: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,

656: if pv_reallocate_flag = 'Y' then
657: /* invoke the allocation API to purge the allocation data.*/
658: jg_zz_vat_alloc_prc_pkg.purge_allocation_data
659: (
660: pn_reporting_status_id => cur_rec_jg_zz_vat_rep_status.reporting_status_id,
661: pv_reallocate_flag => pv_reallocate_flag,
662: xv_return_status => xv_return_status,
663: xv_return_message => xv_return_message
664: );

Line 675: if cur_rec_jg_zz_vat_rep_status.selection_status_flag <> fnd_api.g_ret_sts_success then

671:
672: elsif pv_process_name = 'FINAL REPORTING' then
673:
674: /* Check if selection has already happened successfully */
675: if cur_rec_jg_zz_vat_rep_status.selection_status_flag <> fnd_api.g_ret_sts_success then
676: fnd_message.set_name('JG', 'JG_ZZ_VAT_ERROR_SELECTION');
677: fnd_message.set_token('SOURCE', lv_source);
678: fnd_message.set_token('PROCESS_NAME', pv_process_name);
679: xv_return_message := fnd_message.get;

Line 684: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag = 'N' then

680: xv_return_status := fnd_api.g_ret_sts_error;
681: goto error_exit_from_procedure;
682: end if;
683:
684: if cur_rec_jg_zz_vat_rep_status.allocation_status_flag = 'N' then
685:
686: /* Allocation has not happened, check if it is applicable */
687: if cur_rec_jg_zz_vat_rep_entities.enable_allocations_flag = 'Y' then
688: fnd_message.set_name('JG', 'JG_ZZ_VAT_NO_ALLOCATION');

Line 696: elsif cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> fnd_api.g_ret_sts_success then

692: xv_return_status := fnd_api.g_ret_sts_error;
693: goto error_exit_from_procedure;
694: end if;
695:
696: elsif cur_rec_jg_zz_vat_rep_status.allocation_status_flag <> fnd_api.g_ret_sts_success then
697:
698: fnd_message.set_name('JG', 'JG_ZZ_VAT_ERROR_ALLOCATION');
699: fnd_message.set_token('SOURCE', lv_source);
700: fnd_message.set_token('PROCESS_NAME', pv_process_name);

Line 714: pd_start_date => cur_rec_jg_zz_vat_rep_status.period_start_date,

710: (
711: pn_vat_reporting_entity_id => pn_vat_reporting_entity_id,
712: pv_period_set_name => cur_rec_jg_zz_vat_rep_entities.tax_calendar_name,
713: pv_tax_calendar_period => pv_tax_calendar_period,
714: pd_start_date => cur_rec_jg_zz_vat_rep_status.period_start_date,
715: pd_end_date => cur_rec_jg_zz_vat_rep_status.period_end_date,
716: pv_source => lv_source,
717: pv_process_name => 'FINAL REPORTING',
718: xv_return_status => xv_return_status,

Line 715: pd_end_date => cur_rec_jg_zz_vat_rep_status.period_end_date,

711: pn_vat_reporting_entity_id => pn_vat_reporting_entity_id,
712: pv_period_set_name => cur_rec_jg_zz_vat_rep_entities.tax_calendar_name,
713: pv_tax_calendar_period => pv_tax_calendar_period,
714: pd_start_date => cur_rec_jg_zz_vat_rep_status.period_start_date,
715: pd_end_date => cur_rec_jg_zz_vat_rep_status.period_end_date,
716: pv_source => lv_source,
717: pv_process_name => 'FINAL REPORTING',
718: xv_return_status => xv_return_status,
719: xv_return_message => xv_return_message

Line 730: end if; /* Existance of record in jg_zz_vat_rep_status */

726: Revised approach change */
727:
728: end if; /* Validations and processing by process */
729:
730: end if; /* Existance of record in jg_zz_vat_rep_status */
731:
732:
733: if lv_source = 'AP' then
734: xn_reporting_status_id_ap := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);

Line 734: xn_reporting_status_id_ap := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);

730: end if; /* Existance of record in jg_zz_vat_rep_status */
731:
732:
733: if lv_source = 'AP' then
734: xn_reporting_status_id_ap := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
735: elsif lv_source = 'AR' then
736: xn_reporting_status_id_ar := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
737: elsif lv_source = 'GL' then
738: xn_reporting_status_id_gl := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);

Line 736: xn_reporting_status_id_ar := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);

732:
733: if lv_source = 'AP' then
734: xn_reporting_status_id_ap := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
735: elsif lv_source = 'AR' then
736: xn_reporting_status_id_ar := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
737: elsif lv_source = 'GL' then
738: xn_reporting_status_id_gl := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
739: end if;
740:

Line 738: xn_reporting_status_id_gl := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);

734: xn_reporting_status_id_ap := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
735: elsif lv_source = 'AR' then
736: xn_reporting_status_id_ar := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
737: elsif lv_source = 'GL' then
738: xn_reporting_status_id_gl := nvl(ln_reporting_status_id, cur_rec_jg_zz_vat_rep_status.reporting_status_id);
739: end if;
740:
741:
742: if pv_source <> 'ALL' then

Line 796: pv_source in jg_zz_vat_rep_status.source%type,

792: procedure post_process_update
793: (
794: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
795: pv_tax_calendar_period in gl_periods.period_name%type,
796: pv_source in jg_zz_vat_rep_status.source%type,
797: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
798: pn_process_id in jg_zz_vat_rep_status.selection_process_id%type, /* Process id for SELECTION, ALLOCATION, FINAL REPORTING */
799: pv_process_flag in jg_zz_vat_rep_status.selection_status_flag%type,
800: pv_enable_allocations_flag in jg_zz_vat_rep_entities.enable_allocations_flag%type default null, /* only for final reporting process */

Line 798: pn_process_id in jg_zz_vat_rep_status.selection_process_id%type, /* Process id for SELECTION, ALLOCATION, FINAL REPORTING */

794: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
795: pv_tax_calendar_period in gl_periods.period_name%type,
796: pv_source in jg_zz_vat_rep_status.source%type,
797: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
798: pn_process_id in jg_zz_vat_rep_status.selection_process_id%type, /* Process id for SELECTION, ALLOCATION, FINAL REPORTING */
799: pv_process_flag in jg_zz_vat_rep_status.selection_status_flag%type,
800: pv_enable_allocations_flag in jg_zz_vat_rep_entities.enable_allocations_flag%type default null, /* only for final reporting process */
801: xv_return_status out nocopy varchar2, /* Possible Values : E - Error, S - Successful */
802: xv_return_message out nocopy varchar2

Line 799: pv_process_flag in jg_zz_vat_rep_status.selection_status_flag%type,

795: pv_tax_calendar_period in gl_periods.period_name%type,
796: pv_source in jg_zz_vat_rep_status.source%type,
797: pv_process_name in varchar2, /* possible values - SELECTION, ALLOCATION, FINAL REPORTING */
798: pn_process_id in jg_zz_vat_rep_status.selection_process_id%type, /* Process id for SELECTION, ALLOCATION, FINAL REPORTING */
799: pv_process_flag in jg_zz_vat_rep_status.selection_status_flag%type,
800: pv_enable_allocations_flag in jg_zz_vat_rep_entities.enable_allocations_flag%type default null, /* only for final reporting process */
801: xv_return_status out nocopy varchar2, /* Possible Values : E - Error, S - Successful */
802: xv_return_message out nocopy varchar2
803: )

Line 810: jg_zz_vat_rep_status

806:
807: If pv_process_name = 'SELECTION' then
808:
809: update
810: jg_zz_vat_rep_status
811: Set
812: selection_status_flag = pv_process_flag ,
813: Selection_process_id = pn_process_id ,
814: selection_process_date = sysdate ,

Line 826: jg_zz_vat_rep_status

822:
823: Elsif pv_process_name = 'ALLOCATION' then
824:
825: update
826: jg_zz_vat_rep_status
827: Set
828: allocation_status_flag = pv_process_flag ,
829: allocation_process_id = pn_process_id ,
830: allocation_process_date = sysdate ,

Line 842: jg_zz_vat_rep_status

838:
839: Elsif pv_process_name = 'FINAL REPORTING' then
840:
841: update
842: jg_zz_vat_rep_status
843: Set
844: final_reporting_status_flag = pv_process_flag ,
845: final_reporting_process_id = pn_process_id ,
846: final_reporting_process_date = sysdate ,

Line 878: pv_source in jg_zz_vat_rep_status.source%type,

874: (
875: pn_vat_reporting_entity_id in jg_zz_vat_rep_entities.vat_reporting_entity_id%type,
876: pv_tax_calendar_period in gl_periods.period_name%type,
877: pv_tax_calendar_year in number,
878: pv_source in jg_zz_vat_rep_status.source%type,
879: pv_report_name in varchar2,
880: pv_vat_register_id in jg_zz_vat_registers_b.vat_register_id%type DEFAULT NULL
881: ) return varchar2
882: is

Line 890: from jg_zz_vat_rep_status

886: pv_tax_calendar_year number,
887: pv_source varchar2) is
888: select count(vat_reporting_entity_id) total_record,
889: count(decode(final_reporting_status_flag, fnd_api.g_ret_sts_success, 1, null)) final_record
890: from jg_zz_vat_rep_status
891: where vat_reporting_entity_id = pn_vat_reporting_entity_id
892: and ( tax_calendar_period = nvl(pv_tax_calendar_period,'-1')
893: or tax_calendar_year=nvl(pv_tax_calendar_year,-1))
894: and ((pv_source = 'AP' AND source =pv_source)

Line 916: from jg_zz_Vat_rep_status

912: pv_tax_calendar_year number,
913: pv_source varchar2
914: ) is
915: select reporting_status_id
916: from jg_zz_Vat_rep_status
917: where vat_reporting_entity_id = pv_vat_reporting_entity_id
918: and (tax_calendar_period = NVL(pv_tax_calendar_period,'-1') or
919: tax_calendar_year = NVL(pv_tax_calendar_year,-1))
920: and ((pv_source = 'AP' AND source =pv_source)

Line 931: from jg_zz_vat_rep_status rep,

927:
928: -- Bug 13925495 Start
929: Cursor C_Current_Period Is
930: Select (glp1.period_year*100)+glp1.period_num current_period
931: from jg_zz_vat_rep_status rep,
932: jg_zz_vat_rep_entities jgvre,
933: gl_periods glp1
934: where rep.vat_reporting_entity_id = pn_vat_reporting_entity_id
935: and ( rep.TAX_CALENDAR_PERIOD = NVL(pv_tax_calendar_period,'-1'))

Line 944: from jg_zz_vat_rep_status rep,

940: and rownum = 1;
941:
942: Cursor C_Report_Period Is
943: Select (glp1.period_year*100)+glp1.period_num report_period
944: from jg_zz_vat_rep_status rep,
945: gl_periods glp1
946: where rep.vat_reporting_entity_id = pn_vat_reporting_entity_id
947: and ( rep.TAX_CALENDAR_PERIOD = NVL(pv_tax_calendar_period,'-1'))
948: and glp1.PERIOD_SET_NAME = rep.tax_calendar_name

Line 981: from jg_zz_vat_final_reports fin,jg_zz_vat_rep_status rep

977: /* check if final rep has been done before */
978: begin
979: select 'Y'
980: into lf_final_flag
981: from jg_zz_vat_final_reports fin,jg_zz_vat_rep_status rep
982: where fin.REPORT_NAME = pv_report_name
983: and NVL(fin.vat_register_id, -1) = NVL(pv_vat_register_id, -1)
984: and fin.REPORTING_STATUS_ID = rep.reporting_status_id
985: and rep.vat_reporting_entity_id = pn_vat_reporting_entity_id