DBA Data[Home] [Help]

APPS.PAY_NO_EMP_CONT_2007 dependencies on PAY_NO_EMP_CONT_2007

Line 1: package body PAY_NO_EMP_CONT_2007 as

1: package body PAY_NO_EMP_CONT_2007 as
2: /* $Header: pynoempcont2007.pkb 120.4.12020000.3 2013/01/03 12:37:10 smeduri ship $ */
3:
4:
5: ----------------------------------Function definitions----------------------------------------------

Line 122: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;

118:
119:
120: -- Local PL/SQL Tables
121:
122: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;
123: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;
124: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;
125:
126: -- Cursor definitions

Line 123: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;

119:
120: -- Local PL/SQL Tables
121:
122: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;
123: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;
124: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;
125:
126: -- Cursor definitions
127: -- added by rp 29-dec-2012

Line 124: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;

120: -- Local PL/SQL Tables
121:
122: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;
123: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;
124: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;
125:
126: -- Cursor definitions
127: -- added by rp 29-dec-2012
128: cursor get_TU_MU_LU_BIMONTH

Line 281: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);

277:
278: hr_utility.trace('2007 EMP_CONT ::: l_curr_zone = '|| l_curr_zone );
279:
280: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
281: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
282: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
283: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
284:
285: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );

Line 282: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;

278: hr_utility.trace('2007 EMP_CONT ::: l_curr_zone = '|| l_curr_zone );
279:
280: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
281: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
282: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
283: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
284:
285: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );
286: hr_utility.trace('2007 EMP_CONT ::: l_lu_rep_sep = '|| l_lu_rep_sep );

Line 283: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

279:
280: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
281: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
282: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
283: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
284:
285: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );
286: hr_utility.trace('2007 EMP_CONT ::: l_lu_rep_sep = '|| l_lu_rep_sep );
287: hr_utility.trace('2007 EMP_CONT ::: l_lu_tax_mun = '|| l_lu_tax_mun );

Line 298: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;

294: -- since LU is report separately, check if LE LU combination exists
295:
296: hr_utility.trace('2007 EMP_CONT ::: Local unit is Rep Sep');
297:
298: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
299: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
300: l_le_lu_exists := FALSE;
301:
302: -- loop through existing records for LE LU to check if the current LE LU exists

Line 299: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;

295:
296: hr_utility.trace('2007 EMP_CONT ::: Local unit is Rep Sep');
297:
298: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
299: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
300: l_le_lu_exists := FALSE;
301:
302: -- loop through existing records for LE LU to check if the current LE LU exists
303:

Line 304: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP

300: l_le_lu_exists := FALSE;
301:
302: -- loop through existing records for LE LU to check if the current LE LU exists
303:
304: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
305: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
306: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
307: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
308:

Line 305: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND

301:
302: -- loop through existing records for LE LU to check if the current LE LU exists
303:
304: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
305: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
306: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
307: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
308:
309: THEN

Line 306: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND

302: -- loop through existing records for LE LU to check if the current LE LU exists
303:
304: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
305: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
306: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
307: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
308:
309: THEN
310: l_le_lu_exists := TRUE;

Line 307: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)

303:
304: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
305: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
306: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
307: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
308:
309: THEN
310: l_le_lu_exists := TRUE;
311: l_le_lu_index := start_index_main;

Line 326: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_base;

322: IF l_le_lu_exists
323:
324: THEN -------------------------------------------------------------------------------------------------------------------------
325: -- since the combination alreday exists, calculation has been already done, just return values
326: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_base;
327: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_contribution;
328: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
329:
330: hr_utility.trace('2007 EMP_CONT ::: LU found, since results exist, just returning them');

Line 327: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_contribution;

323:
324: THEN -------------------------------------------------------------------------------------------------------------------------
325: -- since the combination alreday exists, calculation has been already done, just return values
326: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_base;
327: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_contribution;
328: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
329:
330: hr_utility.trace('2007 EMP_CONT ::: LU found, since results exist, just returning them');
331: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_le_lu_index = '|| l_le_lu_index );

Line 401: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );

397: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_bal_val_ytd = '|| l_bal_val_ytd );
398: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_bal_val_bimonth = '|| l_bal_val_bimonth );
399: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit_used_yet = '|| l_exemption_limit_used_yet );
400:
401: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
402:
403: -- 2007 Legislative changes for 'Economic Aid' to Employer
404: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
405: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

Line 404: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;

400:
401: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
402:
403: -- 2007 Legislative changes for 'Economic Aid' to Employer
404: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
405: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
406:
407: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
408:

Line 405: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

401: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
402:
403: -- 2007 Legislative changes for 'Economic Aid' to Employer
404: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
405: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
406:
407: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
408:
409: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit = ' || l_exemption_limit );

Line 407: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

403: -- 2007 Legislative changes for 'Economic Aid' to Employer
404: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
405: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
406:
407: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
408:
409: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit = ' || l_exemption_limit );
410: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_economic_aid = ' || l_economic_aid );
411:

Line 836: ,PAY_NO_EMP_CONT_2007.g_tab_main

832: -- ec_main_calculation function call for LU
833: hr_utility.trace('2007 EMP_CONT ::: LU ***** ec_main_calculation function call for LU , entering ' );
834:
835: l_main_index := ec_main_calculation ( g_tab_calc
836: ,PAY_NO_EMP_CONT_2007.g_tab_main
837: ,p_tax_unit_id
838: ,p_local_unit_id
839: ,l_exemption_limit_used
840: ,l_lu_status

Line 856: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;

852:
853: -- done all caclculation and entered values in the main table for next time usage
854:
855: -- returning values at LU level
856: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
857: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
858: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
859:
860: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );

Line 857: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;

853: -- done all caclculation and entered values in the main table for next time usage
854:
855: -- returning values at LU level
856: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
857: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
858: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
859:
860: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );
861: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_base = '|| p_run_base );

Line 858: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;

854:
855: -- returning values at LU level
856: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
857: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
858: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
859:
860: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );
861: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_base = '|| p_run_base );
862: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_contribution = '|| p_run_contribution );

Line 878: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;

874:
875: hr_utility.trace('2007 EMP_CONT ::: LU is not report separately');
876: hr_utility.trace('2007 EMP_CONT ::: checking if LE exists');
877:
878: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
879: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
880: l_le_exists := FALSE;
881:
882: -- loop through existing records for LE and -9999 to check if the current LE exists

Line 879: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;

875: hr_utility.trace('2007 EMP_CONT ::: LU is not report separately');
876: hr_utility.trace('2007 EMP_CONT ::: checking if LE exists');
877:
878: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
879: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
880: l_le_exists := FALSE;
881:
882: -- loop through existing records for LE and -9999 to check if the current LE exists
883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP

Line 883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP

879: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
880: l_le_exists := FALSE;
881:
882: -- loop through existing records for LE and -9999 to check if the current LE exists
883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
884:
885: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
886: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
887: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)

Line 885: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND

881:
882: -- loop through existing records for LE and -9999 to check if the current LE exists
883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
884:
885: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
886: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
887: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
888:
889: THEN

Line 886: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND

882: -- loop through existing records for LE and -9999 to check if the current LE exists
883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
884:
885: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
886: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
887: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
888:
889: THEN
890: l_le_exists := TRUE;

Line 887: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)

883: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
884:
885: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
886: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
887: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
888:
889: THEN
890: l_le_exists := TRUE;
891: l_le_index := start_index_main;

Line 906: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_base;

902: -- if the LE and -9999 exists, return the values
903: IF l_le_exists
904:
905: THEN -------------------------------------------------------------------------------------------------------------------------
906: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_base;
907: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_contribution;
908: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
909:
910: hr_utility.trace('2007 EMP_CONT ::: LE #### LE already exists, so just returning vales' );

Line 907: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_contribution;

903: IF l_le_exists
904:
905: THEN -------------------------------------------------------------------------------------------------------------------------
906: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_base;
907: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_contribution;
908: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
909:
910: hr_utility.trace('2007 EMP_CONT ::: LE #### LE already exists, so just returning vales' );
911: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_index = '|| l_le_index );

Line 927: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);

923:
924: ---------- initializing the g_tab_calc table for LE and -9999 combination
925: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
926:
927: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
928: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
929: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
930:
931: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );

Line 928: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;

924: ---------- initializing the g_tab_calc table for LE and -9999 combination
925: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
926:
927: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
928: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
929: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
930:
931: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );
932:

Line 929: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;

925: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
926:
927: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
928: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
929: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
930:
931: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );
932:
933: -- loop for each zone

Line 992: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );

988: hr_utility.trace('2007 EMP_CONT ::: LE #### l_bal_val_ytd = '|| l_bal_val_ytd );
989: hr_utility.trace('2007 EMP_CONT ::: LE #### l_bal_val_bimonth = '|| l_bal_val_bimonth );
990: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit_used_yet = '|| l_exemption_limit_used_yet );
991:
992: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
993:
994: -- 2007 Legislative changes for 'Economic Aid' to Employer
995: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
996: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

Line 995: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;

991:
992: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
993:
994: -- 2007 Legislative changes for 'Economic Aid' to Employer
995: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
996: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
997:
998: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
999:

Line 996: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

992: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
993:
994: -- 2007 Legislative changes for 'Economic Aid' to Employer
995: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
996: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
997:
998: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
999:
1000: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit = ' || l_exemption_limit );

Line 998: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

994: -- 2007 Legislative changes for 'Economic Aid' to Employer
995: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
996: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
997:
998: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
999:
1000: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit = ' || l_exemption_limit );
1001: hr_utility.trace('2007 EMP_CONT ::: LE #### l_economic_aid = ' || l_economic_aid );
1002:

Line 1451: ,PAY_NO_EMP_CONT_2007.g_tab_main

1447: -- ec_main_calculation function call for LE
1448: hr_utility.trace('2007 EMP_CONT ::: LE #### ec_main_calculation function call for LE , entering ' );
1449:
1450: l_main_index := ec_main_calculation ( g_tab_calc
1451: ,PAY_NO_EMP_CONT_2007.g_tab_main
1452: ,p_tax_unit_id
1453: ,-9999
1454: ,l_exemption_limit_used
1455: ,l_le_status

Line 1473: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;

1469:
1470: -- done all caclculation and entered values in the main table for next time usage
1471:
1472: -- returning values at LE level
1473: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1474: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1475: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1476:
1477: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );

Line 1474: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;

1470: -- done all caclculation and entered values in the main table for next time usage
1471:
1472: -- returning values at LE level
1473: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1474: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1475: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1476:
1477: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );
1478: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_base = '|| p_run_base );

Line 1475: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;

1471:
1472: -- returning values at LE level
1473: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1474: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1475: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1476:
1477: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );
1478: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_base = '|| p_run_base );
1479: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_contribution = '|| p_run_contribution );

Line 1538: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype

1534: FUNCTION populate_tables
1535: (p_tax_unit_id IN NUMBER
1536: ,p_payroll_id IN NUMBER
1537: ,p_date_earned IN DATE
1538: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype
1539: ,g_mu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_mu_tabtype ) RETURN NUMBER IS
1540:
1541:
1542: /* cursor to get the element_type_id of element 'Tax Deduction Base' */

Line 1539: ,g_mu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_mu_tabtype ) RETURN NUMBER IS

1535: (p_tax_unit_id IN NUMBER
1536: ,p_payroll_id IN NUMBER
1537: ,p_date_earned IN DATE
1538: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype
1539: ,g_mu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_mu_tabtype ) RETURN NUMBER IS
1540:
1541:
1542: /* cursor to get the element_type_id of element 'Tax Deduction Base' */
1543:

Line 1589: FOR csr1_rec IN PAY_NO_EMP_CONT_2007.csr_payroll_action_id (p_date_earned) LOOP

1585:
1586: ------------- testing the 3 cursor loops
1587:
1588: -- loop to get all payroll_action_id in the bimonth period for the current payroll
1589: FOR csr1_rec IN PAY_NO_EMP_CONT_2007.csr_payroll_action_id (p_date_earned) LOOP
1590:
1591: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1592: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1593:

Line 1592: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP

1588: -- loop to get all payroll_action_id in the bimonth period for the current payroll
1589: FOR csr1_rec IN PAY_NO_EMP_CONT_2007.csr_payroll_action_id (p_date_earned) LOOP
1590:
1591: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1592: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1593:
1594: -- loop to get local unit and tax municipality for all assignment actions obtained above
1595: FOR csr3_rec IN PAY_NO_EMP_CONT_2007.csr_lu_mu (csr2_rec.ASSIGNMENT_ID , csr2_rec.ASSIGNMENT_ACTION_ID , p_date_earned , l_tax_ele_type_id ) LOOP
1596:

Line 1595: FOR csr3_rec IN PAY_NO_EMP_CONT_2007.csr_lu_mu (csr2_rec.ASSIGNMENT_ID , csr2_rec.ASSIGNMENT_ACTION_ID , p_date_earned , l_tax_ele_type_id ) LOOP

1591: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1592: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1593:
1594: -- loop to get local unit and tax municipality for all assignment actions obtained above
1595: FOR csr3_rec IN PAY_NO_EMP_CONT_2007.csr_lu_mu (csr2_rec.ASSIGNMENT_ID , csr2_rec.ASSIGNMENT_ACTION_ID , p_date_earned , l_tax_ele_type_id ) LOOP
1596:
1597: hr_utility.trace('2007 EMP_CONT ::: --------------------------------------------------------');
1598:
1599: hr_utility.trace('2007 EMP_CONT ::: PAY_ACT_ID = '||csr1_rec.PAYROLL_ACTION_ID||' ASS_ID = '||csr2_rec.ASSIGNMENT_ID||' ASS_ACT_ID = '||csr2_rec.ASSIGNMENT_ACTION_ID

Line 1628: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);

1624:
1625: ----------------------------- check for unique LU -------------------------------------------
1626:
1627: -- Get the Status and Report Separately for this particular Local Unit
1628: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1629: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1630: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1631:
1632: IF trim(l_lu_rep_sep) = 'N'

Line 1629: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;

1625: ----------------------------- check for unique LU -------------------------------------------
1626:
1627: -- Get the Status and Report Separately for this particular Local Unit
1628: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1629: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1630: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1631:
1632: IF trim(l_lu_rep_sep) = 'N'
1633: THEN

Line 1630: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

1626:
1627: -- Get the Status and Report Separately for this particular Local Unit
1628: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1629: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1630: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1631:
1632: IF trim(l_lu_rep_sep) = 'N'
1633: THEN
1634:

Line 1737: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype

1733:
1734: -- Function to look up the corresponding cell number in he table g_tab_calc
1735:
1736: FUNCTION lookup_cell
1737: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1738: ,l_zone IN VARCHAR2 ) RETURN NUMBER IS
1739:
1740: l_cell NUMBER;
1741:

Line 1760: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype

1756: -- NEW function for main calculation
1757:
1758: FUNCTION ec_main_calculation
1759:
1760: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1761: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
1762: ,p_tax_unit_id IN NUMBER
1763: ,p_local_unit_id IN NUMBER
1764: ,p_exemption_limit_used IN NUMBER

Line 1761: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype

1757:
1758: FUNCTION ec_main_calculation
1759:
1760: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1761: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
1762: ,p_tax_unit_id IN NUMBER
1763: ,p_local_unit_id IN NUMBER
1764: ,p_exemption_limit_used IN NUMBER
1765: ,p_org_status IN VARCHAR2

Line 1843: l_rate := PAY_NO_EMP_CONT_2007.get_ec_rate (g_tab_calc(i).zone

1839: hr_utility.trace('2007 EMP_CONT ::: Main Calc i -- p_org_status - zone -- under_limit -- l_rate = -- bimonth_base -- bimonth_cont -- bimonth_todate -- run_cont ' );
1840:
1841: FOR i IN start_index_calc..end_index_calc LOOP
1842:
1843: l_rate := PAY_NO_EMP_CONT_2007.get_ec_rate (g_tab_calc(i).zone
1844: ,g_tab_calc(i).under_limit
1845: ,p_org_status
1846: ,p_bus_group_id
1847: ,p_date_earned

Line 2046: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype ) RETURN NUMBER IS

2042:
2043: -- function to display table values of g_tab_calc
2044:
2045: FUNCTION display_table_calc
2046: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype ) RETURN NUMBER IS
2047:
2048: start_index_calc NUMBER;
2049: end_index_calc NUMBER;
2050:

Line 2235: (g_tab_main IN PAY_NO_EMP_CONT_2007.g_tab_main_tabtype

2231:
2232: -- Function to look up the corresponding cell number in he table g_tab_main
2233:
2234: FUNCTION main_lookup_cell
2235: (g_tab_main IN PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
2236: ,start_main_index IN NUMBER
2237: ,l_zone IN VARCHAR2 ) RETURN NUMBER IS
2238:
2239: l_cell NUMBER;

Line 2300: FOR csr_rec in PAY_NO_EMP_CONT_2007.csr_get_lu_le (p_payroll_action_id ,p_date_earned ) LOOP

2296: hr_utility.trace('2007 EXEM_LIM ::: made g_error_check := TRUE ');
2297:
2298: -- loop thru the cursor csr_get_lu_le and get all LE and LU
2299:
2300: FOR csr_rec in PAY_NO_EMP_CONT_2007.csr_get_lu_le (p_payroll_action_id ,p_date_earned ) LOOP
2301:
2302: hr_utility.trace('2007 EXEM_LIM ::: ------------------Inside For loop------------- ' );
2303: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2304: -- get the status and report separately for the LU

Line 2306: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);

2302: hr_utility.trace('2007 EXEM_LIM ::: ------------------Inside For loop------------- ' );
2303: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2304: -- get the status and report separately for the LU
2305:
2306: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2307: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2308: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2309:
2310: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );

Line 2307: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;

2303: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2304: -- get the status and report separately for the LU
2305:
2306: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2307: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2308: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2309:
2310: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );
2311: hr_utility.trace('2007 EXEM_LIM ::: l_rep_sep '||l_rep_sep );

Line 2308: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;

2304: -- get the status and report separately for the LU
2305:
2306: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2307: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2308: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2309:
2310: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );
2311: hr_utility.trace('2007 EXEM_LIM ::: l_rep_sep '||l_rep_sep );
2312:

Line 2319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;

2315:
2316: THEN
2317: hr_utility.trace('2007 EXEM_LIM ::: local unit is rep sep and status in AA,CC,GG....fetching exemption limit ');
2318: -- then open exemption limit cursor
2319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2320:
2321: -- 2007 Legislative changes for 'Economic Aid' to Employer
2322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

Line 2322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;

2318: -- then open exemption limit cursor
2319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2320:
2321: -- 2007 Legislative changes for 'Economic Aid' to Employer
2322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2324:
2325: -- if any error is there
2326: -- checking if no data returned for Exemption Limit

Line 2323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

2319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2320:
2321: -- 2007 Legislative changes for 'Economic Aid' to Employer
2322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2324:
2325: -- if any error is there
2326: -- checking if no data returned for Exemption Limit
2327: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

Line 2327: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

2323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2324:
2325: -- if any error is there
2326: -- checking if no data returned for Exemption Limit
2327: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)
2328: THEN
2329: hr_utility.trace('2007 EXEM_LIM ::: Problem in getting Exemption limit ' );
2330: -- Exemption Limit for this Local Unit Not Specified for this Period or not specified at all
2331:

Line 2337: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );

2333: g_error_flag := TRUE ;
2334: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2335:
2336: -- get the name of the local unit
2337: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2338: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2339: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2340:
2341: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );

Line 2338: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;

2334: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2335:
2336: -- get the name of the local unit
2337: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2338: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2339: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2340:
2341: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );
2342:

Line 2339: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;

2335:
2336: -- get the name of the local unit
2337: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2338: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2339: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2340:
2341: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );
2342:
2343: -- Set the message and message token

Line 2358: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

2354: -- p_err_text := p_err_text || hr_utility.get_message ;
2355:
2356: END IF; -- end exemption limit got check
2357:
2358: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
2359:
2360: ELSIF ( trim(l_rep_sep) = 'N' ) -- else if LU is not rep sep , check at the legal employer level
2361:
2362: THEN

Line 2365: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;

2361:
2362: THEN
2363: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2364: -- get the status of the LE
2365: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2366: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2367: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2368:
2369: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );

Line 2366: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;

2362: THEN
2363: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2364: -- get the status of the LE
2365: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2366: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2367: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2368:
2369: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );
2370:

Line 2367: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;

2363: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2364: -- get the status of the LE
2365: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2366: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2367: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2368:
2369: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );
2370:
2371: -- if the status of LE in AA,CC,GG

Line 2376: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;

2372: IF ( l_status IN ('AA','CC','GG') )
2373: THEN
2374: hr_utility.trace('2007 EXEM_LIM ::: Legal Emp status in AA,CC,GG ....fetching exemption limit ');
2375: -- then open exemption limit cursor
2376: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2377:
2378: -- 2007 Legislative changes for 'Economic Aid' to Employer
2379: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2380: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

Line 2379: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;

2375: -- then open exemption limit cursor
2376: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2377:
2378: -- 2007 Legislative changes for 'Economic Aid' to Employer
2379: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2380: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2381:
2382: -- if any error is there
2383: -- checking if no data returned for Exemption Limit

Line 2380: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

2376: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2377:
2378: -- 2007 Legislative changes for 'Economic Aid' to Employer
2379: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2380: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2381:
2382: -- if any error is there
2383: -- checking if no data returned for Exemption Limit
2384: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

Line 2384: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

2380: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2381:
2382: -- if any error is there
2383: -- checking if no data returned for Exemption Limit
2384: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)
2385: THEN
2386: hr_utility.trace('2007 EXEM_LIM ::: Problem in getting Exemption limit ' );
2387: -- Exemption Limit for this Legal Emplyer Not Specified for this Period or not specified at all
2388:

Line 2394: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );

2390: g_error_flag := TRUE ;
2391: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2392:
2393: -- get the name of the Legal Employer
2394: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2395: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2396: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2397:
2398: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );

Line 2395: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;

2391: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2392:
2393: -- get the name of the Legal Employer
2394: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2395: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2396: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2397:
2398: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );
2399:

Line 2396: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;

2392:
2393: -- get the name of the Legal Employer
2394: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2395: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2396: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2397:
2398: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );
2399:
2400: -- Set the message and message token

Line 2413: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

2409: -- p_err_text := p_err_text || hr_utility.get_message ;
2410:
2411: END IF; -- end exemption limit got check
2412:
2413: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
2414:
2415: END IF; -- end if the status of LE in AA,CC,GG
2416:
2417: END IF ; -- end if report separately = yes and status in AA,CC,GG

Line 2469: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);

2465:
2466:
2467: BEGIN
2468:
2469: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2470: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2471: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2472: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2473:

Line 2470: FETCH PAY_NO_EMP_CONT_2007.get_lu_details

2466:
2467: BEGIN
2468:
2469: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2470: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2471: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2472: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2473:
2474:

Line 2472: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

2468:
2469: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2470: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2471: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2472: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2473:
2474:
2475: IF(l_lu_rep_sep = 'Y') THEN
2476: l_org_status := l_lu_status; -- if report sepeartely is yes then assigning the lu status

Line 2482: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);

2478:
2479: ELSE
2480:
2481:
2482: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2483: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2484: INTO l_le_status;
2485: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2486:

Line 2483: FETCH PAY_NO_EMP_CONT_2007.get_le_status

2479: ELSE
2480:
2481:
2482: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2483: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2484: INTO l_le_status;
2485: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2486:
2487: l_org_status := l_le_status; -- assigning the le status

Line 2485: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;

2481:
2482: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2483: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2484: INTO l_le_status;
2485: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2486:
2487: l_org_status := l_le_status; -- assigning the le status
2488: END IF;
2489:

Line 2490: -- l_curr_zone := to_number(SUBSTR(PAY_NO_EMP_CONT_2007.get_lookup_meaning('NO_TAX_MUNICIPALITY', p_jurisdiction_code), 1, 1));

2486:
2487: l_org_status := l_le_status; -- assigning the le status
2488: END IF;
2489:
2490: -- l_curr_zone := to_number(SUBSTR(PAY_NO_EMP_CONT_2007.get_lookup_meaning('NO_TAX_MUNICIPALITY', p_jurisdiction_code), 1, 1));
2491: l_curr_zone := hruserdt.get_table_value (p_bus_group_id, 'NO_TAX_MUNICIPALITY' , 'ZONE', p_jurisdiction_code, p_date_earned ) ;
2492:
2493:
2494:

Line 2495: l_ec_rate := PAY_NO_EMP_CONT_2007.get_ec_rate( l_curr_zone, p_under_limit, l_org_status, p_bus_group_id, p_date_earned, p_under_age_high_rate, p_over_age_high_rate);

2491: l_curr_zone := hruserdt.get_table_value (p_bus_group_id, 'NO_TAX_MUNICIPALITY' , 'ZONE', p_jurisdiction_code, p_date_earned ) ;
2492:
2493:
2494:
2495: l_ec_rate := PAY_NO_EMP_CONT_2007.get_ec_rate( l_curr_zone, p_under_limit, l_org_status, p_bus_group_id, p_date_earned, p_under_age_high_rate, p_over_age_high_rate);
2496:
2497:
2498:
2499: RETURN l_ec_rate;

Line 2507: END PAY_NO_EMP_CONT_2007;

2503:
2504:
2505: ---------------------------- end of package ---------------------------------------------------------------------------------------
2506:
2507: END PAY_NO_EMP_CONT_2007;