23: --
24: -- Declare cursor
25: --
26: -- In the following cursor statement add join(s) between
27: -- pay_batch_control_totals and PER_BUSINESS_GROUPS
28: -- so that the security_group_id for
29: -- the current business group context can be derived.
30: -- Remove this comment when the edit has been completed.
31: cursor csr_sec_grp is
30: -- Remove this comment when the edit has been completed.
31: cursor csr_sec_grp is
32: select pbg.security_group_id
33: from per_business_groups pbg
34: , pay_batch_control_totals bct
35: , pay_batch_headers bth
36: where bct.batch_control_id = p_batch_control_id
37: and bth.batch_id = bct.batch_id
38: and pbg.business_group_id = bth.business_group_id;
90: --
91: -- Declare cursor
92: --
93: -- In the following cursor statement add join(s) between
94: -- pay_batch_control_totals and PER_BUSINESS_GROUPS
95: -- so that the legislation_code for
96: -- the current business group context can be derived.
97: -- Remove this comment when the edit has been completed.
98: cursor csr_leg_code is
97: -- Remove this comment when the edit has been completed.
98: cursor csr_leg_code is
99: select pbg.legislation_code
100: from per_business_groups pbg
101: , pay_batch_control_totals bct
102: , pay_batch_headers bth
103: where bct.batch_control_id = p_batch_control_id
104: and bth.batch_id = bct.batch_id
105: and pbg.business_group_id = bth.business_group_id;
258: Procedure chk_transferred_status (p_batch_control_id number) Is
259: --
260: cursor csr_status is
261: select 'Y'
262: from pay_batch_control_totals pct
263: where pct.batch_control_id = p_batch_control_id
264: and pct.control_status = 'T';
265: --
266: l_transferred varchar2(1);
309: -- {End of Comments}
310: --
311: -- ---------------------------------------------------------------------------
312: procedure chk_batch_id
313: (p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
314: p_batch_id in pay_batch_control_totals.batch_id%TYPE
315: ) is
316: --
317: l_proc varchar2(72) := g_package||'chk_batch_id';
310: --
311: -- ---------------------------------------------------------------------------
312: procedure chk_batch_id
313: (p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
314: p_batch_id in pay_batch_control_totals.batch_id%TYPE
315: ) is
316: --
317: l_proc varchar2(72) := g_package||'chk_batch_id';
318: l_dummy number;
349: open csr_batch_id_exists;
350: fetch csr_batch_id_exists into l_dummy;
351: if csr_batch_id_exists%notfound then
352: close csr_batch_id_exists;
353: pay_bct_shd.constraint_error('PAY_BATCH_CONTROL_TOTALS_FK1');
354: end if;
355: close csr_batch_id_exists;
356: end if;
357: --
392: -- {End of Comments}
393: --
394: -- ---------------------------------------------------------------------------
395: procedure chk_control_status
396: (p_control_status in pay_batch_control_totals.control_status%TYPE,
397: p_session_date in date,
398: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
399: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
400: ) is
394: -- ---------------------------------------------------------------------------
395: procedure chk_control_status
396: (p_control_status in pay_batch_control_totals.control_status%TYPE,
397: p_session_date in date,
398: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
399: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
400: ) is
401: --
402: l_proc varchar2(72) := g_package||'chk_control_status';
395: procedure chk_control_status
396: (p_control_status in pay_batch_control_totals.control_status%TYPE,
397: p_session_date in date,
398: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
399: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
400: ) is
401: --
402: l_proc varchar2(72) := g_package||'chk_control_status';
403: l_api_updating boolean;
485: -- {End of Comments}
486: --
487: -- ---------------------------------------------------------------------------
488: procedure chk_control_type
489: (p_control_type in pay_batch_control_totals.control_type%TYPE,
490: p_session_date in date,
491: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
492: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
493: ) is
487: -- ---------------------------------------------------------------------------
488: procedure chk_control_type
489: (p_control_type in pay_batch_control_totals.control_type%TYPE,
490: p_session_date in date,
491: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
492: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
493: ) is
494: --
495: l_proc varchar2(72) := g_package||'chk_control_type';
488: procedure chk_control_type
489: (p_control_type in pay_batch_control_totals.control_type%TYPE,
490: p_session_date in date,
491: p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE,
492: p_object_version_number in pay_batch_control_totals.object_version_number%TYPE
493: ) is
494: --
495: l_proc varchar2(72) := g_package||'chk_control_type';
496: l_api_updating boolean;
555: -- In insert_dml() and update_dml() , it is converted to database format (99999.99)
556: --
557: -- ---------------------------------------------------------------------------
558: procedure chk_control_total
559: (p_control_type in pay_batch_control_totals.control_type%TYPE,
560: p_control_total in pay_batch_control_totals.control_total%TYPE,
561: p_batch_id in pay_batch_headers.batch_id%TYPE
562: ) is
563: --
556: --
557: -- ---------------------------------------------------------------------------
558: procedure chk_control_total
559: (p_control_type in pay_batch_control_totals.control_type%TYPE,
560: p_control_total in pay_batch_control_totals.control_total%TYPE,
561: p_batch_id in pay_batch_headers.batch_id%TYPE
562: ) is
563: --
564: l_proc varchar2(72) := g_package||'chk_control_total';
563: --
564: l_proc varchar2(72) := g_package||'chk_control_total';
565: l_api_updating boolean;
566: l_curr_code varchar2(10);
567: l_control_total_dup pay_batch_control_totals.control_total%TYPE;
568: l_control_total_dup1 pay_batch_control_totals.control_total%TYPE;
569:
570: l_range_flag varchar2(2):='F';
571:
564: l_proc varchar2(72) := g_package||'chk_control_total';
565: l_api_updating boolean;
566: l_curr_code varchar2(10);
567: l_control_total_dup pay_batch_control_totals.control_total%TYPE;
568: l_control_total_dup1 pay_batch_control_totals.control_total%TYPE;
569:
570: l_range_flag varchar2(2):='F';
571:
572: --
632: -- {End of Comments}
633: --
634: -- ---------------------------------------------------------------------------
635: procedure chk_delete
636: (p_batch_control_id in pay_batch_control_totals.batch_control_id%TYPE
637: ) is
638: --
639: l_proc varchar2(72) := g_package||'chk_delete';
640: l_exists varchar2(1);