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.1.12010000.4 2008/09/29 11:49:40 rsengupt ship $ */
3:
4:
5: ----------------------------------Function definitions----------------------------------------------

Line 118: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;

114:
115:
116: -- Local PL/SQL Tables
117:
118: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;
119: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;
120: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;
121:
122: -- Cursor definitions

Line 119: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;

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

Line 120: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;

116: -- Local PL/SQL Tables
117:
118: g_tab_calc PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype;
119: g_lu_tab PAY_NO_EMP_CONT_2007.g_lu_tabtype;
120: g_mu_tab PAY_NO_EMP_CONT_2007.g_mu_tabtype;
121:
122: -- Cursor definitions
123:
124: -- csr to get the current assignment_action_ids with the same LE

Line 199: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);

195:
196: hr_utility.trace('2007 EMP_CONT ::: l_curr_zone = '|| l_curr_zone );
197:
198: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
199: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
200: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
201: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
202:
203: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );

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

196: hr_utility.trace('2007 EMP_CONT ::: l_curr_zone = '|| l_curr_zone );
197:
198: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
199: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
200: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
201: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
202:
203: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );
204: hr_utility.trace('2007 EMP_CONT ::: l_lu_rep_sep = '|| l_lu_rep_sep );

Line 201: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

197:
198: -- Get the Status , Report Separately and Tax Municipality for the Local Unit of the current assignment
199: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
200: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
201: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
202:
203: hr_utility.trace('2007 EMP_CONT ::: l_lu_status = '|| l_lu_status );
204: hr_utility.trace('2007 EMP_CONT ::: l_lu_rep_sep = '|| l_lu_rep_sep );
205: hr_utility.trace('2007 EMP_CONT ::: l_lu_tax_mun = '|| l_lu_tax_mun );

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

212: -- since LU is report separately, check if LE LU combination exists
213:
214: hr_utility.trace('2007 EMP_CONT ::: Local unit is Rep Sep');
215:
216: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
217: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
218: l_le_lu_exists := FALSE;
219:
220: -- loop through existing records for LE LU to check if the current LE LU exists

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

213:
214: hr_utility.trace('2007 EMP_CONT ::: Local unit is Rep Sep');
215:
216: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
217: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
218: l_le_lu_exists := FALSE;
219:
220: -- loop through existing records for LE LU to check if the current LE LU exists
221:

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

218: l_le_lu_exists := FALSE;
219:
220: -- loop through existing records for LE LU to check if the current LE LU exists
221:
222: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
223: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
224: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
225: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
226:

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

219:
220: -- loop through existing records for LE LU to check if the current LE LU exists
221:
222: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
223: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
224: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
225: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
226:
227: THEN

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

220: -- loop through existing records for LE LU to check if the current LE LU exists
221:
222: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
223: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
224: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
225: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
226:
227: THEN
228: l_le_lu_exists := TRUE;

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

221:
222: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
223: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
224: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = p_local_unit_id) AND
225: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
226:
227: THEN
228: l_le_lu_exists := TRUE;
229: l_le_lu_index := start_index_main;

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

240: IF l_le_lu_exists
241:
242: THEN -------------------------------------------------------------------------------------------------------------------------
243: -- since the combination alreday exists, calculation has been already done, just return values
244: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_base;
245: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_contribution;
246: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
247:
248: hr_utility.trace('2007 EMP_CONT ::: LU found, since results exist, just returning them');

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

241:
242: THEN -------------------------------------------------------------------------------------------------------------------------
243: -- since the combination alreday exists, calculation has been already done, just return values
244: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_base;
245: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_lu_index).run_contribution;
246: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
247:
248: hr_utility.trace('2007 EMP_CONT ::: LU found, since results exist, just returning them');
249: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_le_lu_index = '|| l_le_lu_index );

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

315: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_bal_val_ytd = '|| l_bal_val_ytd );
316: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_bal_val_bimonth = '|| l_bal_val_bimonth );
317: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit_used_yet = '|| l_exemption_limit_used_yet );
318:
319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
320:
321: -- 2007 Legislative changes for 'Economic Aid' to Employer
322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

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

318:
319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
320:
321: -- 2007 Legislative changes for 'Economic Aid' to Employer
322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
324:
325: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
326:

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

319: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_local_unit_id ,p_date_earned );
320:
321: -- 2007 Legislative changes for 'Economic Aid' to Employer
322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
324:
325: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
326:
327: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit = ' || l_exemption_limit );

Line 325: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

321: -- 2007 Legislative changes for 'Economic Aid' to Employer
322: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
323: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
324:
325: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
326:
327: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_exemption_limit = ' || l_exemption_limit );
328: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_economic_aid = ' || l_economic_aid );
329:

Line 677: ,PAY_NO_EMP_CONT_2007.g_tab_main

673: -- ec_main_calculation function call for LU
674: hr_utility.trace('2007 EMP_CONT ::: LU ***** ec_main_calculation function call for LU , entering ' );
675:
676: l_main_index := ec_main_calculation ( g_tab_calc
677: ,PAY_NO_EMP_CONT_2007.g_tab_main
678: ,p_tax_unit_id
679: ,p_local_unit_id
680: ,l_exemption_limit_used
681: ,l_lu_status

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

693:
694: -- done all caclculation and entered values in the main table for next time usage
695:
696: -- returning values at LU level
697: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
698: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
699: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
700:
701: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );

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

694: -- done all caclculation and entered values in the main table for next time usage
695:
696: -- returning values at LU level
697: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
698: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
699: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
700:
701: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );
702: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_base = '|| p_run_base );

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

695:
696: -- returning values at LU level
697: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
698: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
699: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
700:
701: hr_utility.trace('2007 EMP_CONT ::: LU ***** l_main_index = '|| l_main_index );
702: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_base = '|| p_run_base );
703: hr_utility.trace('2007 EMP_CONT ::: LU ***** p_run_contribution = '|| p_run_contribution );

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

715:
716: hr_utility.trace('2007 EMP_CONT ::: LU is not report separately');
717: hr_utility.trace('2007 EMP_CONT ::: checking if LE exists');
718:
719: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
720: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
721: l_le_exists := FALSE;
722:
723: -- loop through existing records for LE and -9999 to check if the current LE exists

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

716: hr_utility.trace('2007 EMP_CONT ::: LU is not report separately');
717: hr_utility.trace('2007 EMP_CONT ::: checking if LE exists');
718:
719: start_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.FIRST, 0) ;
720: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
721: l_le_exists := FALSE;
722:
723: -- loop through existing records for LE and -9999 to check if the current LE exists
724: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP

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

720: end_index_main := NVL (PAY_NO_EMP_CONT_2007.g_tab_main.LAST, 0) ;
721: l_le_exists := FALSE;
722:
723: -- loop through existing records for LE and -9999 to check if the current LE exists
724: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
725:
726: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
727: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
728: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)

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

722:
723: -- loop through existing records for LE and -9999 to check if the current LE exists
724: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
725:
726: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
727: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
728: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
729:
730: THEN

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

723: -- loop through existing records for LE and -9999 to check if the current LE exists
724: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
725:
726: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
727: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
728: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
729:
730: THEN
731: l_le_exists := TRUE;

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

724: WHILE (PAY_NO_EMP_CONT_2007.g_tab_main.EXISTS(start_index_main)) and (start_index_main <= end_index_main) LOOP
725:
726: IF (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).legal_employer_id = p_tax_unit_id) AND
727: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).local_unit_id = -9999) AND
728: (PAY_NO_EMP_CONT_2007.g_tab_main(start_index_main).zone = l_curr_zone)
729:
730: THEN
731: l_le_exists := TRUE;
732: l_le_index := start_index_main;

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

743: -- if the LE and -9999 exists, return the values
744: IF l_le_exists
745:
746: THEN -------------------------------------------------------------------------------------------------------------------------
747: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_base;
748: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_contribution;
749: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
750:
751: hr_utility.trace('2007 EMP_CONT ::: LE #### LE already exists, so just returning vales' );

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

744: IF l_le_exists
745:
746: THEN -------------------------------------------------------------------------------------------------------------------------
747: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_base;
748: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_le_index).run_contribution;
749: p_curr_exemption_limit_used := 0; -- coz this value must have been returned before
750:
751: hr_utility.trace('2007 EMP_CONT ::: LE #### LE already exists, so just returning vales' );
752: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_index = '|| l_le_index );

Line 768: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);

764:
765: ---------- initializing the g_tab_calc table for LE and -9999 combination
766: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
767:
768: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
769: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
770: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
771:
772: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );

Line 769: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;

765: ---------- initializing the g_tab_calc table for LE and -9999 combination
766: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
767:
768: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
769: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
770: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
771:
772: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );
773:

Line 770: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;

766: hr_utility.trace('2007 EMP_CONT ::: LE #### initializing the g_tab_calc , entering');
767:
768: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
769: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_le_status;
770: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
771:
772: hr_utility.trace('2007 EMP_CONT ::: LE #### l_le_status = '|| l_le_status );
773:
774: -- loop for each zone

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

829: hr_utility.trace('2007 EMP_CONT ::: LE #### l_bal_val_ytd = '|| l_bal_val_ytd );
830: hr_utility.trace('2007 EMP_CONT ::: LE #### l_bal_val_bimonth = '|| l_bal_val_bimonth );
831: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit_used_yet = '|| l_exemption_limit_used_yet );
832:
833: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
834:
835: -- 2007 Legislative changes for 'Economic Aid' to Employer
836: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
837: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;

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

832:
833: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
834:
835: -- 2007 Legislative changes for 'Economic Aid' to Employer
836: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
837: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
838:
839: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
840:

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

833: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit(p_tax_unit_id ,p_date_earned );
834:
835: -- 2007 Legislative changes for 'Economic Aid' to Employer
836: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
837: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
838:
839: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
840:
841: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit = ' || l_exemption_limit );

Line 839: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

835: -- 2007 Legislative changes for 'Economic Aid' to Employer
836: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit ;
837: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exemption_limit , l_economic_aid ;
838:
839: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
840:
841: hr_utility.trace('2007 EMP_CONT ::: LE #### l_exemption_limit = ' || l_exemption_limit );
842: hr_utility.trace('2007 EMP_CONT ::: LE #### l_economic_aid = ' || l_economic_aid );
843:

Line 1214: ,PAY_NO_EMP_CONT_2007.g_tab_main

1210: -- ec_main_calculation function call for LE
1211: hr_utility.trace('2007 EMP_CONT ::: LE #### ec_main_calculation function call for LE , entering ' );
1212:
1213: l_main_index := ec_main_calculation ( g_tab_calc
1214: ,PAY_NO_EMP_CONT_2007.g_tab_main
1215: ,p_tax_unit_id
1216: ,-9999
1217: ,l_exemption_limit_used
1218: ,l_le_status

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

1232:
1233: -- done all caclculation and entered values in the main table for next time usage
1234:
1235: -- returning values at LE level
1236: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1237: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1238: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1239:
1240: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );

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

1233: -- done all caclculation and entered values in the main table for next time usage
1234:
1235: -- returning values at LE level
1236: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1237: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1238: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1239:
1240: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );
1241: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_base = '|| p_run_base );

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

1234:
1235: -- returning values at LE level
1236: p_run_base := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_base;
1237: p_run_contribution := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).run_contribution;
1238: p_curr_exemption_limit_used := PAY_NO_EMP_CONT_2007.g_tab_main(l_main_index).exemption_limit_used;
1239:
1240: hr_utility.trace('2007 EMP_CONT ::: LE #### l_main_index = '|| l_main_index );
1241: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_base = '|| p_run_base );
1242: hr_utility.trace('2007 EMP_CONT ::: LE #### p_run_contribution = '|| p_run_contribution );

Line 1301: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype

1297: FUNCTION populate_tables
1298: (p_tax_unit_id IN NUMBER
1299: ,p_payroll_id IN NUMBER
1300: ,p_date_earned IN DATE
1301: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype
1302: ,g_mu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_mu_tabtype ) RETURN NUMBER IS
1303:
1304:
1305: /* cursor to get the element_type_id of element 'Tax Deduction Base' */

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

1298: (p_tax_unit_id IN NUMBER
1299: ,p_payroll_id IN NUMBER
1300: ,p_date_earned IN DATE
1301: ,g_lu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_lu_tabtype
1302: ,g_mu_tab IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_mu_tabtype ) RETURN NUMBER IS
1303:
1304:
1305: /* cursor to get the element_type_id of element 'Tax Deduction Base' */
1306:

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

1348:
1349: ------------- testing the 3 cursor loops
1350:
1351: -- loop to get all payroll_action_id in the bimonth period for the current payroll
1352: FOR csr1_rec IN PAY_NO_EMP_CONT_2007.csr_payroll_action_id (p_date_earned) LOOP
1353:
1354: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1355: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1356:

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

1351: -- loop to get all payroll_action_id in the bimonth period for the current payroll
1352: FOR csr1_rec IN PAY_NO_EMP_CONT_2007.csr_payroll_action_id (p_date_earned) LOOP
1353:
1354: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1355: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1356:
1357: -- loop to get local unit and tax municipality for all assignment actions obtained above
1358: 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
1359:

Line 1358: 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

1354: -- loop to get assignment_id and assignment_action_id for all payroll_action_id obtained above for the current legal employer
1355: FOR csr2_rec IN PAY_NO_EMP_CONT_2007.csr_assignment_id (p_tax_unit_id , csr1_rec.PAYROLL_ACTION_ID) LOOP
1356:
1357: -- loop to get local unit and tax municipality for all assignment actions obtained above
1358: 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
1359:
1360: hr_utility.trace('2007 EMP_CONT ::: --------------------------------------------------------');
1361:
1362: 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 1391: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);

1387:
1388: ----------------------------- check for unique LU -------------------------------------------
1389:
1390: -- Get the Status and Report Separately for this particular Local Unit
1391: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1392: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1393: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1394:
1395: IF trim(l_lu_rep_sep) = 'N'

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

1388: ----------------------------- check for unique LU -------------------------------------------
1389:
1390: -- Get the Status and Report Separately for this particular Local Unit
1391: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1392: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1393: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1394:
1395: IF trim(l_lu_rep_sep) = 'N'
1396: THEN

Line 1393: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

1389:
1390: -- Get the Status and Report Separately for this particular Local Unit
1391: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(csr3_rec.local_unit_id);
1392: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
1393: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
1394:
1395: IF trim(l_lu_rep_sep) = 'N'
1396: THEN
1397:

Line 1500: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype

1496:
1497: -- Function to look up the corresponding cell number in he table g_tab_calc
1498:
1499: FUNCTION lookup_cell
1500: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1501: ,l_zone IN VARCHAR2 ) RETURN NUMBER IS
1502:
1503: l_cell NUMBER;
1504:

Line 1523: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype

1519: -- NEW function for main calculation
1520:
1521: FUNCTION ec_main_calculation
1522:
1523: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1524: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
1525: ,p_tax_unit_id IN NUMBER
1526: ,p_local_unit_id IN NUMBER
1527: ,p_exemption_limit_used IN NUMBER

Line 1524: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype

1520:
1521: FUNCTION ec_main_calculation
1522:
1523: (g_tab_calc IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype
1524: ,g_tab_main IN OUT NOCOPY PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
1525: ,p_tax_unit_id IN NUMBER
1526: ,p_local_unit_id IN NUMBER
1527: ,p_exemption_limit_used IN NUMBER
1528: ,p_org_status IN VARCHAR2

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

1602: 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 ' );
1603:
1604: FOR i IN start_index_calc..end_index_calc LOOP
1605:
1606: l_rate := PAY_NO_EMP_CONT_2007.get_ec_rate (g_tab_calc(i).zone
1607: ,g_tab_calc(i).under_limit
1608: ,p_org_status
1609: ,p_bus_group_id
1610: ,p_date_earned

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

1805:
1806: -- function to display table values of g_tab_calc
1807:
1808: FUNCTION display_table_calc
1809: (g_tab_calc IN PAY_NO_EMP_CONT_2007.g_tab_calc_tabtype ) RETURN NUMBER IS
1810:
1811: start_index_calc NUMBER;
1812: end_index_calc NUMBER;
1813:

Line 1998: (g_tab_main IN PAY_NO_EMP_CONT_2007.g_tab_main_tabtype

1994:
1995: -- Function to look up the corresponding cell number in he table g_tab_main
1996:
1997: FUNCTION main_lookup_cell
1998: (g_tab_main IN PAY_NO_EMP_CONT_2007.g_tab_main_tabtype
1999: ,start_main_index IN NUMBER
2000: ,l_zone IN VARCHAR2 ) RETURN NUMBER IS
2001:
2002: l_cell NUMBER;

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

2059: hr_utility.trace('2007 EXEM_LIM ::: made g_error_check := TRUE ');
2060:
2061: -- loop thru the cursor csr_get_lu_le and get all LE and LU
2062:
2063: FOR csr_rec in PAY_NO_EMP_CONT_2007.csr_get_lu_le (p_payroll_action_id ,p_date_earned ) LOOP
2064:
2065: hr_utility.trace('2007 EXEM_LIM ::: ------------------Inside For loop------------- ' );
2066: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2067: -- get the status and report separately for the LU

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

2065: hr_utility.trace('2007 EXEM_LIM ::: ------------------Inside For loop------------- ' );
2066: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2067: -- get the status and report separately for the LU
2068:
2069: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2070: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2071: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2072:
2073: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );

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

2066: hr_utility.trace('2007 EXEM_LIM ::: Local unit id = '||csr_rec.loc_unit ||' Legal Employer ID = '||csr_rec.leg_emp );
2067: -- get the status and report separately for the LU
2068:
2069: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2070: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2071: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2072:
2073: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );
2074: hr_utility.trace('2007 EXEM_LIM ::: l_rep_sep '||l_rep_sep );

Line 2071: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;

2067: -- get the status and report separately for the LU
2068:
2069: OPEN PAY_NO_EMP_CONT_2007.get_lu_details (csr_rec.loc_unit);
2070: FETCH PAY_NO_EMP_CONT_2007.get_lu_details INTO l_status , l_rep_sep , l_lu_tax_mun ;
2071: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details ;
2072:
2073: hr_utility.trace('2007 EXEM_LIM ::: l_status '|| l_status );
2074: hr_utility.trace('2007 EXEM_LIM ::: l_rep_sep '||l_rep_sep );
2075:

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

2078:
2079: THEN
2080: hr_utility.trace('2007 EXEM_LIM ::: local unit is rep sep and status in AA,CC,GG....fetching exemption limit ');
2081: -- then open exemption limit cursor
2082: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2083:
2084: -- 2007 Legislative changes for 'Economic Aid' to Employer
2085: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2086: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

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

2081: -- then open exemption limit cursor
2082: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2083:
2084: -- 2007 Legislative changes for 'Economic Aid' to Employer
2085: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2086: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2087:
2088: -- if any error is there
2089: -- checking if no data returned for Exemption Limit

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

2082: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.loc_unit, p_date_earned) ;
2083:
2084: -- 2007 Legislative changes for 'Economic Aid' to Employer
2085: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2086: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2087:
2088: -- if any error is there
2089: -- checking if no data returned for Exemption Limit
2090: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

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

2086: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2087:
2088: -- if any error is there
2089: -- checking if no data returned for Exemption Limit
2090: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)
2091: THEN
2092: hr_utility.trace('2007 EXEM_LIM ::: Problem in getting Exemption limit ' );
2093: -- Exemption Limit for this Local Unit Not Specified for this Period or not specified at all
2094:

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

2096: g_error_flag := TRUE ;
2097: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2098:
2099: -- get the name of the local unit
2100: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2101: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2102: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2103:
2104: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );

Line 2101: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;

2097: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2098:
2099: -- get the name of the local unit
2100: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2101: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2102: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2103:
2104: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );
2105:

Line 2102: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;

2098:
2099: -- get the name of the local unit
2100: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.loc_unit ,p_bus_grp_id );
2101: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2102: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2103:
2104: hr_utility.trace('2007 EXEM_LIM ::: name of local unit = '|| l_org_name );
2105:
2106: -- Set the message and message token

Line 2121: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

2117: -- p_err_text := p_err_text || hr_utility.get_message ;
2118:
2119: END IF; -- end exemption limit got check
2120:
2121: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
2122:
2123: ELSIF ( trim(l_rep_sep) = 'N' ) -- else if LU is not rep sep , check at the legal employer level
2124:
2125: THEN

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

2124:
2125: THEN
2126: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2127: -- get the status of the LE
2128: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2129: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2130: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2131:
2132: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );

Line 2129: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;

2125: THEN
2126: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2127: -- get the status of the LE
2128: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2129: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2130: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2131:
2132: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );
2133:

Line 2130: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;

2126: hr_utility.trace('2007 EXEM_LIM ::: local unit is NOT rep sep....fetching LE Status ');
2127: -- get the status of the LE
2128: OPEN PAY_NO_EMP_CONT_2007.get_le_status (csr_rec.leg_emp) ;
2129: FETCH PAY_NO_EMP_CONT_2007.get_le_status INTO l_status ;
2130: CLOSE PAY_NO_EMP_CONT_2007.get_le_status ;
2131:
2132: hr_utility.trace('2007 EXEM_LIM ::: LE l_status '|| l_status );
2133:
2134: -- if the status of LE in AA,CC,GG

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

2135: IF ( l_status IN ('AA','CC','GG') )
2136: THEN
2137: hr_utility.trace('2007 EXEM_LIM ::: Legal Emp status in AA,CC,GG ....fetching exemption limit ');
2138: -- then open exemption limit cursor
2139: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2140:
2141: -- 2007 Legislative changes for 'Economic Aid' to Employer
2142: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2143: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;

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

2138: -- then open exemption limit cursor
2139: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2140:
2141: -- 2007 Legislative changes for 'Economic Aid' to Employer
2142: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2143: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2144:
2145: -- if any error is there
2146: -- checking if no data returned for Exemption Limit

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

2139: OPEN PAY_NO_EMP_CONT_2007.csr_get_exemption_limit (csr_rec.leg_emp, p_date_earned) ;
2140:
2141: -- 2007 Legislative changes for 'Economic Aid' to Employer
2142: -- FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit ;
2143: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2144:
2145: -- if any error is there
2146: -- checking if no data returned for Exemption Limit
2147: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)

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

2143: FETCH PAY_NO_EMP_CONT_2007.csr_get_exemption_limit INTO l_exempt_limit , l_economic_aid ;
2144:
2145: -- if any error is there
2146: -- checking if no data returned for Exemption Limit
2147: IF (PAY_NO_EMP_CONT_2007.csr_get_exemption_limit%NOTFOUND OR l_exempt_limit IS NULL)
2148: THEN
2149: hr_utility.trace('2007 EXEM_LIM ::: Problem in getting Exemption limit ' );
2150: -- Exemption Limit for this Legal Emplyer Not Specified for this Period or not specified at all
2151:

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

2153: g_error_flag := TRUE ;
2154: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2155:
2156: -- get the name of the Legal Employer
2157: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2158: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2159: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2160:
2161: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );

Line 2158: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;

2154: hr_utility.trace('2007 EXEM_LIM ::: set g_error_flag = TRUE ');
2155:
2156: -- get the name of the Legal Employer
2157: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2158: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2159: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2160:
2161: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );
2162:

Line 2159: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;

2155:
2156: -- get the name of the Legal Employer
2157: OPEN PAY_NO_EMP_CONT_2007.csr_org_name(csr_rec.leg_emp ,p_bus_grp_id );
2158: FETCH PAY_NO_EMP_CONT_2007.csr_org_name INTO l_org_name ;
2159: CLOSE PAY_NO_EMP_CONT_2007.csr_org_name;
2160:
2161: hr_utility.trace('2007 EXEM_LIM ::: name of legal employer = '|| l_org_name );
2162:
2163: -- Set the message and message token

Line 2176: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;

2172: -- p_err_text := p_err_text || hr_utility.get_message ;
2173:
2174: END IF; -- end exemption limit got check
2175:
2176: CLOSE PAY_NO_EMP_CONT_2007.csr_get_exemption_limit;
2177:
2178: END IF; -- end if the status of LE in AA,CC,GG
2179:
2180: END IF ; -- end if report separately = yes and status in AA,CC,GG

Line 2232: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);

2228:
2229:
2230: BEGIN
2231:
2232: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2233: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2234: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2235: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2236:

Line 2233: FETCH PAY_NO_EMP_CONT_2007.get_lu_details

2229:
2230: BEGIN
2231:
2232: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2233: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2234: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2235: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2236:
2237:

Line 2235: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;

2231:
2232: OPEN PAY_NO_EMP_CONT_2007.get_lu_details(p_local_unit_id);
2233: FETCH PAY_NO_EMP_CONT_2007.get_lu_details
2234: INTO l_lu_status , l_lu_rep_sep , l_lu_tax_mun ;
2235: CLOSE PAY_NO_EMP_CONT_2007.get_lu_details;
2236:
2237:
2238: IF(l_lu_rep_sep = 'Y') THEN
2239: l_org_status := l_lu_status; -- if report sepeartely is yes then assigning the lu status

Line 2245: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);

2241:
2242: ELSE
2243:
2244:
2245: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2246: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2247: INTO l_le_status;
2248: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2249:

Line 2246: FETCH PAY_NO_EMP_CONT_2007.get_le_status

2242: ELSE
2243:
2244:
2245: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2246: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2247: INTO l_le_status;
2248: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2249:
2250: l_org_status := l_le_status; -- assigning the le status

Line 2248: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;

2244:
2245: OPEN PAY_NO_EMP_CONT_2007.get_le_status(p_tax_unit_id);
2246: FETCH PAY_NO_EMP_CONT_2007.get_le_status
2247: INTO l_le_status;
2248: CLOSE PAY_NO_EMP_CONT_2007.get_le_status;
2249:
2250: l_org_status := l_le_status; -- assigning the le status
2251: END IF;
2252:

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

2249:
2250: l_org_status := l_le_status; -- assigning the le status
2251: END IF;
2252:
2253: -- l_curr_zone := to_number(SUBSTR(PAY_NO_EMP_CONT_2007.get_lookup_meaning('NO_TAX_MUNICIPALITY', p_jurisdiction_code), 1, 1));
2254: l_curr_zone := hruserdt.get_table_value (p_bus_group_id, 'NO_TAX_MUNICIPALITY' , 'ZONE', p_jurisdiction_code, p_date_earned ) ;
2255:
2256:
2257:

Line 2258: 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);

2254: l_curr_zone := hruserdt.get_table_value (p_bus_group_id, 'NO_TAX_MUNICIPALITY' , 'ZONE', p_jurisdiction_code, p_date_earned ) ;
2255:
2256:
2257:
2258: 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);
2259:
2260:
2261:
2262: RETURN l_ec_rate;

Line 2270: END PAY_NO_EMP_CONT_2007;

2266:
2267:
2268: ---------------------------- end of package ---------------------------------------------------------------------------------------
2269:
2270: END PAY_NO_EMP_CONT_2007;