42: l_api_updating boolean;
43: --
44: Begin
45: --
46: hr_utility.set_location('Entering:'||l_proc, 5);
47: --
48: l_api_updating := pay_cft_shd.api_updating
49: (p_effective_date => p_effective_date,
50: p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
71: end if;
72: --
73: end if;
74: --
75: hr_utility.set_location('Leaving:'||l_proc, 10);
76: --
77: End chk_emp_fed_tax_inf_id;
78: --
79: -- ----------------------------------------------------------------------------
111: l_api_updating boolean;
112: --
113: Begin
114: --
115: hr_utility.set_location('Entering:'||l_proc, 5);
116: --
117: l_api_updating := pay_cft_shd.api_updating
118: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
119: p_effective_date => p_effective_date,
126: ---
127: if p_legislation_code is null then
128: -- raise error as legislation_code is NULL
129: --
130: hr_utility.set_message(800, 'HR_74028_WRONG_LEGIS_CODE');
131: hr_utility.raise_error;
132: --
133: end if;
134: --
127: if p_legislation_code is null then
128: -- raise error as legislation_code is NULL
129: --
130: hr_utility.set_message(800, 'HR_74028_WRONG_LEGIS_CODE');
131: hr_utility.raise_error;
132: --
133: end if;
134: --
135: -- check if value of lookup falls within lookup type.
136: --
137: if p_legislation_code <> 'CA' then
138: -- raise error as legislation_code is not CA
139: --
140: hr_utility.set_message(800, 'HR_74028_WRONG_LEGIS_CODE');
141: hr_utility.raise_error;
142: --
143: end if;
144: --
137: if p_legislation_code <> 'CA' then
138: -- raise error as legislation_code is not CA
139: --
140: hr_utility.set_message(800, 'HR_74028_WRONG_LEGIS_CODE');
141: hr_utility.raise_error;
142: --
143: end if;
144: --
145: end if;
143: end if;
144: --
145: end if;
146: --
147: hr_utility.set_location('Leaving:'||l_proc,10);
148: --
149: end chk_legislation_code;
150: --
151: -- ----------------------------------------------------------------------------
180: where hrl.location_id = p_location_id;
181: --
182: Begin
183: --
184: hr_utility.set_location('Entering:'||l_proc,5);
185: --
186: -- Check that the mandatory parameters have been set
187: --
188: --dbms_output.put_line('in assignment_id ');
186: -- Check that the mandatory parameters have been set
187: --
188: --dbms_output.put_line('in assignment_id ');
189: if p_assignment_id is null then
190: hr_utility.set_message(800, 'HR_74023_ASSIGNMENT_ID_NULL');
191: hr_utility.raise_error;
192: end if;
193: --
194: --dbms_output.put_line('in assignment_id 2');
187: --
188: --dbms_output.put_line('in assignment_id ');
189: if p_assignment_id is null then
190: hr_utility.set_message(800, 'HR_74023_ASSIGNMENT_ID_NULL');
191: hr_utility.raise_error;
192: end if;
193: --
194: --dbms_output.put_line('in assignment_id 2');
195: if p_business_group_id is null then
192: end if;
193: --
194: --dbms_output.put_line('in assignment_id 2');
195: if p_business_group_id is null then
196: hr_utility.set_message(800, 'HR_74024_BUSINESS_GROUP_ID_NULL');
197: hr_utility.raise_error;
198: end if;
199: --
200: --dbms_output.put_line('in assignment_id 3');
193: --
194: --dbms_output.put_line('in assignment_id 2');
195: if p_business_group_id is null then
196: hr_utility.set_message(800, 'HR_74024_BUSINESS_GROUP_ID_NULL');
197: hr_utility.raise_error;
198: end if;
199: --
200: --dbms_output.put_line('in assignment_id 3');
201: hr_api.mandatory_arg_error
215: --
216: if (l_api_updating ) then
217: if p_assignment_id <> pay_cft_shd.g_old_rec.assignment_id then
218: --dbms_output.put_line('cannot change assignment_id');
219: hr_utility.set_message(800, 'HR_74027_ASSIGNMENT_ID_CHANGED');
220: hr_utility.raise_error;
221: end if;
222: end if;
223:
216: if (l_api_updating ) then
217: if p_assignment_id <> pay_cft_shd.g_old_rec.assignment_id then
218: --dbms_output.put_line('cannot change assignment_id');
219: hr_utility.set_message(800, 'HR_74027_ASSIGNMENT_ID_CHANGED');
220: hr_utility.raise_error;
221: end if;
222: end if;
223:
224: -- if (not l_api_updating) then
234: -- raise error as assignment_id not found in per_assignments_f
235: -- table.
236: --
237: --dbms_output.put_line('in assignment_id 6');
238: hr_utility.set_message(800, 'HR_74025_INVALID_ASSIGNMENT_ID');
239: hr_utility.raise_error;
240: --
241: else
242: --
235: -- table.
236: --
237: --dbms_output.put_line('in assignment_id 6');
238: hr_utility.set_message(800, 'HR_74025_INVALID_ASSIGNMENT_ID');
239: hr_utility.raise_error;
240: --
241: else
242: --
243: close c1;
244: --
245: --dbms_output.put_line('in assignment_id 7');
246: if p_business_group_id <> l_business_group_id then
247: --
248: hr_utility.set_message(800, 'HR_74026_INVALID_BG_ID');
249: hr_utility.set_message_token('BG_ID' , l_business_group_id);
250: hr_utility.raise_error;
251: --
252: else
245: --dbms_output.put_line('in assignment_id 7');
246: if p_business_group_id <> l_business_group_id then
247: --
248: hr_utility.set_message(800, 'HR_74026_INVALID_BG_ID');
249: hr_utility.set_message_token('BG_ID' , l_business_group_id);
250: hr_utility.raise_error;
251: --
252: else
253:
246: if p_business_group_id <> l_business_group_id then
247: --
248: hr_utility.set_message(800, 'HR_74026_INVALID_BG_ID');
249: hr_utility.set_message_token('BG_ID' , l_business_group_id);
250: hr_utility.raise_error;
251: --
252: else
253:
254: if l_location_id is NULL then
270: --
271: -- end if;
272: --
273: --dbms_output.put_line('in assignment_id 6');
274: hr_utility.set_location('Leaving:'||l_proc,10);
275: --
276: End chk_assignment_id;
277: -- ----------------------------------------------------------------------------
278: -- |------< chk_employment_province >------|
309: l_api_updating boolean;
310: --
311: Begin
312: --
313: hr_utility.set_location('Entering:'||l_proc, 5);
314: --
315: l_api_updating := pay_cft_shd.api_updating
316: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
317: p_effective_date => p_effective_date,
331: p_effective_date => p_effective_date) then
332: --
333: -- raise error as does not exist as lookup
334: --
335: hr_utility.set_message(800,'HR_EMPLOYMENT_PROVINCE_WRONG');
336: hr_utility.raise_error;
337: --
338: end if;
339: --
332: --
333: -- raise error as does not exist as lookup
334: --
335: hr_utility.set_message(800,'HR_EMPLOYMENT_PROVINCE_WRONG');
336: hr_utility.raise_error;
337: --
338: end if;
339: --
340: end if;
338: end if;
339: --
340: end if;
341: --
342: hr_utility.set_location('Leaving:'||l_proc,10);
343: --
344: end chk_employment_province;
345: -- ----------------------------------------------------------------------------
346: -- |------< chk_ei_exempt_flag >------|
377: l_api_updating boolean;
378: --
379: Begin
380: --
381: hr_utility.set_location('Entering:'||l_proc, 5);
382: --
383: l_api_updating := pay_cft_shd.api_updating
384: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
385: p_effective_date => p_effective_date,
399: p_effective_date => p_effective_date) then
400: --
401: -- raise error as does not exist as lookup
402: --
403: hr_utility.set_message(800,'HR_EI_EXEMPT_FLAG_IS WRONG');
404: hr_utility.raise_error;
405: --
406: end if;
407: --
400: --
401: -- raise error as does not exist as lookup
402: --
403: hr_utility.set_message(800,'HR_EI_EXEMPT_FLAG_IS WRONG');
404: hr_utility.raise_error;
405: --
406: end if;
407: --
408: end if;
406: end if;
407: --
408: end if;
409: --
410: hr_utility.set_location('Leaving:'||l_proc,10);
411: --
412: end chk_ei_exempt_flag;
413: --
414: -- ----------------------------------------------------------------------------
446: l_api_updating boolean;
447: --
448: Begin
449: --
450: hr_utility.set_location('Entering:'||l_proc, 5);
451: --
452: l_api_updating := pay_cft_shd.api_updating
453: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
454: p_effective_date => p_effective_date,
468: p_effective_date => p_effective_date) then
469: --
470: -- raise error as does not exist as lookup
471: --
472: hr_utility.set_message(800,'HR_FED_EXEMPT_FLAG_IS_WRONG');
473: hr_utility.raise_error;
474: --
475: end if;
476: --
469: --
470: -- raise error as does not exist as lookup
471: --
472: hr_utility.set_message(800,'HR_FED_EXEMPT_FLAG_IS_WRONG');
473: hr_utility.raise_error;
474: --
475: end if;
476: --
477: end if;
475: end if;
476: --
477: end if;
478: --
479: hr_utility.set_location('Leaving:'||l_proc,10);
480: --
481: end chk_fed_exempt_flag;
482: --
483: -- ----------------------------------------------------------------------------
515: l_api_updating boolean;
516: --
517: Begin
518: --
519: hr_utility.set_location('Entering:'||l_proc, 5);
520: --
521: l_api_updating := pay_cft_shd.api_updating
522: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
523: p_effective_date => p_effective_date,
537: p_effective_date => p_effective_date) then
538: --
539: -- raise error as does not exist as lookup
540: --
541: hr_utility.set_message(800,'HR_CPP_QPP_EXEMPT_FLAG_WRONG');
542: hr_utility.raise_error;
543: --
544: end if;
545: --
538: --
539: -- raise error as does not exist as lookup
540: --
541: hr_utility.set_message(800,'HR_CPP_QPP_EXEMPT_FLAG_WRONG');
542: hr_utility.raise_error;
543: --
544: end if;
545: --
546: end if;
544: end if;
545: --
546: end if;
547: --
548: hr_utility.set_location('Leaving:'||l_proc,10);
549: --
550: end chk_cpp_qpp_exempt_flag;
551: --
552: -- ----------------------------------------------------------------------------
585: l_api_updating boolean;
586: --
587: Begin
588: --
589: hr_utility.set_location('Entering:'||l_proc, 5);
590: --
591: l_api_updating := pay_cft_shd.api_updating
592: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
593: p_effective_date => p_effective_date,
607: p_effective_date => p_effective_date) then
608: --
609: -- raise error as does not exist as lookup
610: --
611: hr_utility.set_message(800,'HR_BASIC_EXEMPT_IS_WRONG');
612: hr_utility.raise_error;
613: --
614: end if;
615: --
608: --
609: -- raise error as does not exist as lookup
610: --
611: hr_utility.set_message(800,'HR_BASIC_EXEMPT_IS_WRONG');
612: hr_utility.raise_error;
613: --
614: end if;
615: --
616: end if;
617: --
618: if nvl(p_basic_exemption_flag,'N') = 'N'
619: and p_tax_credit_amount is null
620: then
621: hr_utility.set_message(800,'HR_74008_BOTH_NULL');
622: hr_utility.raise_error;
623: --
624: end if;
625:
618: if nvl(p_basic_exemption_flag,'N') = 'N'
619: and p_tax_credit_amount is null
620: then
621: hr_utility.set_message(800,'HR_74008_BOTH_NULL');
622: hr_utility.raise_error;
623: --
624: end if;
625:
626: if nvl(p_basic_exemption_flag,'N') = 'Y'
625:
626: if nvl(p_basic_exemption_flag,'N') = 'Y'
627: and p_tax_credit_amount is not null
628: then
629: hr_utility.set_message(800,'HR_74007_BOTH_NOT_NULL');
630: hr_utility.raise_error;
631: --
632: end if;
633: hr_utility.set_location('Leaving:'||l_proc,10);
626: if nvl(p_basic_exemption_flag,'N') = 'Y'
627: and p_tax_credit_amount is not null
628: then
629: hr_utility.set_message(800,'HR_74007_BOTH_NOT_NULL');
630: hr_utility.raise_error;
631: --
632: end if;
633: hr_utility.set_location('Leaving:'||l_proc,10);
634: --
629: hr_utility.set_message(800,'HR_74007_BOTH_NOT_NULL');
630: hr_utility.raise_error;
631: --
632: end if;
633: hr_utility.set_location('Leaving:'||l_proc,10);
634: --
635: end chk_basic_exemption_flag;
636: --
637: -- ----------------------------------------------------------------------------
669: l_api_updating boolean;
670: --
671: Begin
672: --
673: hr_utility.set_location('Entering:'||l_proc, 5);
674: --
675: l_api_updating := pay_cft_shd.api_updating
676: (p_emp_fed_tax_inf_id => p_emp_fed_tax_inf_id,
677: p_effective_date => p_effective_date,
691: p_effective_date => p_effective_date) then
692: --
693: -- raise error as does not exist as lookup
694: --
695: hr_utility.set_message(800,'HR_CA_TAX_CALC_METHOD');
696: hr_utility.raise_error;
697: --
698: end if;
699: --
692: --
693: -- raise error as does not exist as lookup
694: --
695: hr_utility.set_message(800,'HR_CA_TAX_CALC_METHOD');
696: hr_utility.raise_error;
697: --
698: end if;
699: --
700: end if;
698: end if;
699: --
700: end if;
701: --
702: hr_utility.set_location('Leaving:'||l_proc,10);
703: --
704: end chk_tax_calc_method;
705: -- ----------------------------------------------------------------------------
706: -- |--------------------------< dt_update_validate >--------------------------|
741: l_integrity_error Exception;
742: l_table_name all_tables.table_name%TYPE;
743: --
744: Begin
745: hr_utility.set_location('Entering:'||l_proc, 5);
746: --
747: -- Ensure that the p_datetrack_mode argument is not null
748: --
749: hr_api.mandatory_arg_error
780: End If;
781: --
782: End If;
783: --
784: hr_utility.set_location(' Leaving:'||l_proc, 10);
785: Exception
786: When l_integrity_error Then
787: --
788: -- A referential integrity check was violated therefore
787: --
788: -- A referential integrity check was violated therefore
789: -- we must error
790: --
791: hr_utility.set_message(800, 'HR_7216_DT_UPD_INTEGRITY_ERR');
792: hr_utility.set_message_token('TABLE_NAME', l_table_name);
793: hr_utility.raise_error;
794: When Others Then
795: --
788: -- A referential integrity check was violated therefore
789: -- we must error
790: --
791: hr_utility.set_message(800, 'HR_7216_DT_UPD_INTEGRITY_ERR');
792: hr_utility.set_message_token('TABLE_NAME', l_table_name);
793: hr_utility.raise_error;
794: When Others Then
795: --
796: -- An unhandled or unexpected error has occurred which
789: -- we must error
790: --
791: hr_utility.set_message(800, 'HR_7216_DT_UPD_INTEGRITY_ERR');
792: hr_utility.set_message_token('TABLE_NAME', l_table_name);
793: hr_utility.raise_error;
794: When Others Then
795: --
796: -- An unhandled or unexpected error has occurred which
797: -- we must report
795: --
796: -- An unhandled or unexpected error has occurred which
797: -- we must report
798: --
799: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
800: hr_utility.set_message_token('PROCEDURE', l_proc);
801: hr_utility.set_message_token('STEP','15');
802: hr_utility.raise_error;
803: End dt_update_validate;
796: -- An unhandled or unexpected error has occurred which
797: -- we must report
798: --
799: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
800: hr_utility.set_message_token('PROCEDURE', l_proc);
801: hr_utility.set_message_token('STEP','15');
802: hr_utility.raise_error;
803: End dt_update_validate;
804: --
797: -- we must report
798: --
799: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
800: hr_utility.set_message_token('PROCEDURE', l_proc);
801: hr_utility.set_message_token('STEP','15');
802: hr_utility.raise_error;
803: End dt_update_validate;
804: --
805: -- ----------------------------------------------------------------------------
798: --
799: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
800: hr_utility.set_message_token('PROCEDURE', l_proc);
801: hr_utility.set_message_token('STEP','15');
802: hr_utility.raise_error;
803: End dt_update_validate;
804: --
805: -- ----------------------------------------------------------------------------
806: -- |--------------------------< dt_delete_validate >--------------------------|
847: l_rows_exist Exception;
848: l_table_name all_tables.table_name%TYPE;
849: --
850: Begin
851: hr_utility.set_location('Entering:'||l_proc, 5);
852: --
853: -- Ensure that the p_datetrack_mode argument is not null
854: --
855: hr_api.mandatory_arg_error
884: --
885: --
886: End If;
887: --
888: hr_utility.set_location(' Leaving:'||l_proc, 10);
889: Exception
890: When l_rows_exist Then
891: --
892: -- A referential integrity check was violated therefore
891: --
892: -- A referential integrity check was violated therefore
893: -- we must error
894: --
895: hr_utility.set_message(800, 'HR_7215_DT_CHILD_EXISTS');
896: hr_utility.set_message_token('TABLE_NAME', l_table_name);
897: hr_utility.raise_error;
898: When Others Then
899: --
892: -- A referential integrity check was violated therefore
893: -- we must error
894: --
895: hr_utility.set_message(800, 'HR_7215_DT_CHILD_EXISTS');
896: hr_utility.set_message_token('TABLE_NAME', l_table_name);
897: hr_utility.raise_error;
898: When Others Then
899: --
900: -- An unhandled or unexpected error has occurred which
893: -- we must error
894: --
895: hr_utility.set_message(800, 'HR_7215_DT_CHILD_EXISTS');
896: hr_utility.set_message_token('TABLE_NAME', l_table_name);
897: hr_utility.raise_error;
898: When Others Then
899: --
900: -- An unhandled or unexpected error has occurred which
901: -- we must report
899: --
900: -- An unhandled or unexpected error has occurred which
901: -- we must report
902: --
903: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
904: hr_utility.set_message_token('PROCEDURE', l_proc);
905: hr_utility.set_message_token('STEP','15');
906: hr_utility.raise_error;
907: End dt_delete_validate;
900: -- An unhandled or unexpected error has occurred which
901: -- we must report
902: --
903: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
904: hr_utility.set_message_token('PROCEDURE', l_proc);
905: hr_utility.set_message_token('STEP','15');
906: hr_utility.raise_error;
907: End dt_delete_validate;
908: --
901: -- we must report
902: --
903: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
904: hr_utility.set_message_token('PROCEDURE', l_proc);
905: hr_utility.set_message_token('STEP','15');
906: hr_utility.raise_error;
907: End dt_delete_validate;
908: --
909: -- ----------------------------------------------------------------------------
902: --
903: hr_utility.set_message(800, 'HR_6153_ALL_PROCEDURE_FAIL');
904: hr_utility.set_message_token('PROCEDURE', l_proc);
905: hr_utility.set_message_token('STEP','15');
906: hr_utility.raise_error;
907: End dt_delete_validate;
908: --
909: -- ----------------------------------------------------------------------------
910: -- |---------------------------< insert_validate >----------------------------|
918: --
919: l_proc varchar2(72) := g_package||'insert_validate';
920: --
921: Begin
922: hr_utility.set_location('Entering:'||l_proc, 5);
923: --
924: -- Call all supporting business operations
925: --
926: --dbms_output.put_line('before fed_tax_inf_id ');
991: p_object_version_number => p_rec.object_version_number);
992: --
993: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
994: --
995: hr_utility.set_location(' Leaving:'||l_proc, 10);
996: End insert_validate;
997: --
998: -- ----------------------------------------------------------------------------
999: -- |---------------------------< update_validate >----------------------------|
1007: --
1008: l_proc varchar2(72) := g_package||'update_validate';
1009: --
1010: Begin
1011: hr_utility.set_location('Entering:'||l_proc, 5);
1012: --
1013: -- Call all supporting business operations
1014: --
1015: chk_emp_fed_tax_inf_id
1078: p_datetrack_mode => p_datetrack_mode,
1079: p_validation_start_date => p_validation_start_date,
1080: p_validation_end_date => p_validation_end_date);
1081: --
1082: hr_utility.set_location(' Leaving:'||l_proc, 10);
1083: End update_validate;
1084: --
1085: -- ----------------------------------------------------------------------------
1086: -- |---------------------------< delete_validate >----------------------------|
1094: --
1095: l_proc varchar2(72) := g_package||'delete_validate';
1096: --
1097: Begin
1098: hr_utility.set_location('Entering:'||l_proc, 5);
1099: --
1100: -- Call all supporting business operations
1101: --
1102: dt_delete_validate
1104: p_validation_start_date => p_validation_start_date,
1105: p_validation_end_date => p_validation_end_date,
1106: p_emp_fed_tax_inf_id => p_rec.emp_fed_tax_inf_id);
1107: --
1108: hr_utility.set_location(' Leaving:'||l_proc, 10);
1109: End delete_validate;
1110: --
1111: --
1112: -- ---------------------------------------------------------------------------
1131: l_proc varchar2(72) := g_package||'return_legislation_code';
1132: --
1133: begin
1134: --
1135: hr_utility.set_location('Entering:'|| l_proc, 10);
1136: --
1137: -- Ensure that all the mandatory parameter are not null
1138: --
1139: hr_api.mandatory_arg_error(p_api_name => l_proc,
1149: close csr_leg_code;
1150: --
1151: -- The primary key is invalid therefore we must error
1152: --
1153: hr_utility.set_message(800,'HR_7220_INVALID_PRIMARY_KEY');
1154: hr_utility.raise_error;
1155: --
1156: end if;
1157: --
1150: --
1151: -- The primary key is invalid therefore we must error
1152: --
1153: hr_utility.set_message(800,'HR_7220_INVALID_PRIMARY_KEY');
1154: hr_utility.raise_error;
1155: --
1156: end if;
1157: --
1158: close csr_leg_code;
1156: end if;
1157: --
1158: close csr_leg_code;
1159: --
1160: hr_utility.set_location(' Leaving:'|| l_proc, 20);
1161: --
1162: return l_legislation_code;
1163: --
1164: end return_legislation_code;