40: l_api_updating boolean;
41: --
42: Begin
43: --
44: hr_utility.set_location('Entering:'||l_proc, 5);
45: --
46: l_api_updating := pqh_wpr_shd.api_updating
47: (p_worksheet_period_id => p_worksheet_period_id,
48: p_object_version_number => p_object_version_number);
68: end if;
69: --
70: end if;
71: --
72: hr_utility.set_location('Leaving:'||l_proc, 10);
73: --
74: End chk_worksheet_period_id;
75: --
76: -- ----------------------------------------------------------------------------
112: where a.time_period_id = p_end_time_period_id;
113: --
114: Begin
115: --
116: hr_utility.set_location('Entering:'||l_proc,5);
117: --
118: l_api_updating := pqh_wpr_shd.api_updating
119: (p_worksheet_period_id => p_worksheet_period_id,
120: p_object_version_number => p_object_version_number);
143: close c1;
144: --
145: end if;
146: --
147: hr_utility.set_location('Leaving:'||l_proc,10);
148: --
149: End chk_end_time_period_id;
150: --
151: -- ----------------------------------------------------------------------------
187: where a.time_period_id = p_start_time_period_id;
188: --
189: Begin
190: --
191: hr_utility.set_location('Entering:'||l_proc,5);
192: --
193: l_api_updating := pqh_wpr_shd.api_updating
194: (p_worksheet_period_id => p_worksheet_period_id,
195: p_object_version_number => p_object_version_number);
218: close c1;
219: --
220: end if;
221: --
222: hr_utility.set_location('Leaving:'||l_proc,10);
223: --
224: End chk_start_time_period_id;
225: --
226: -- ----------------------------------------------------------------------------
262: where a.worksheet_detail_id = p_worksheet_detail_id;
263: --
264: Begin
265: --
266: hr_utility.set_location('Entering:'||l_proc,5);
267: --
268: l_api_updating := pqh_wpr_shd.api_updating
269: (p_worksheet_period_id => p_worksheet_period_id,
270: p_object_version_number => p_object_version_number);
293: close c1;
294: --
295: end if;
296: --
297: hr_utility.set_location('Leaving:'||l_proc,10);
298: --
299: End chk_worksheet_detail_id;
300: --
301: --
334: l_api_updating boolean;
335: --
336: Begin
337: --
338: hr_utility.set_location('Entering:'||l_proc, 5);
339: --
340: l_api_updating := pqh_wpr_shd.api_updating
341: (p_worksheet_period_id => p_worksheet_period_id,
342: p_object_version_number => p_object_version_number);
355: p_effective_date => p_effective_date) then
356: --
357: -- raise error as does not exist as lookup
358: --
359: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
360: hr_utility.raise_error;
361: --
362: end if;
363: --
356: --
357: -- raise error as does not exist as lookup
358: --
359: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
360: hr_utility.raise_error;
361: --
362: end if;
363: --
364: end if;
362: end if;
363: --
364: end if;
365: --
366: hr_utility.set_location('Leaving:'||l_proc,10);
367: --
368: end chk_budget_unit3_value_type_cd;
369: --
370: -- ----------------------------------------------------------------------------
402: l_api_updating boolean;
403: --
404: Begin
405: --
406: hr_utility.set_location('Entering:'||l_proc, 5);
407: --
408: l_api_updating := pqh_wpr_shd.api_updating
409: (p_worksheet_period_id => p_worksheet_period_id,
410: p_object_version_number => p_object_version_number);
423: p_effective_date => p_effective_date) then
424: --
425: -- raise error as does not exist as lookup
426: --
427: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
428: hr_utility.raise_error;
429: --
430: end if;
431: --
424: --
425: -- raise error as does not exist as lookup
426: --
427: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
428: hr_utility.raise_error;
429: --
430: end if;
431: --
432: end if;
430: end if;
431: --
432: end if;
433: --
434: hr_utility.set_location('Leaving:'||l_proc,10);
435: --
436: end chk_budget_unit2_value_type_cd;
437: --
438: -- ----------------------------------------------------------------------------
470: l_api_updating boolean;
471: --
472: Begin
473: --
474: hr_utility.set_location('Entering:'||l_proc, 5);
475: --
476: l_api_updating := pqh_wpr_shd.api_updating
477: (p_worksheet_period_id => p_worksheet_period_id,
478: p_object_version_number => p_object_version_number);
491: p_effective_date => p_effective_date) then
492: --
493: -- raise error as does not exist as lookup
494: --
495: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
496: hr_utility.raise_error;
497: --
498: end if;
499: --
492: --
493: -- raise error as does not exist as lookup
494: --
495: hr_utility.set_message(801,'HR_LOOKUP_DOES_NOT_EXIST');
496: hr_utility.raise_error;
497: --
498: end if;
499: --
500: end if;
498: end if;
499: --
500: end if;
501: --
502: hr_utility.set_location('Leaving:'||l_proc,10);
503: --
504: end chk_budget_unit1_value_type_cd;
505: --
506: --
521: --
522: --
523: Begin
524: --
525: hr_utility.set_location('Entering:'||l_proc,5);
526: --
527: l_api_updating := pqh_wpr_shd.api_updating
528: (p_worksheet_period_id => p_worksheet_period_id,
529: p_object_version_number => p_object_version_number);
536: --
537: -- Raise error if the value is negative
538: --
539: If p_budget_unit1_percent < 0 then
540: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
541: hr_utility.raise_error;
542: End if;
543: end if;
544: --
537: -- Raise error if the value is negative
538: --
539: If p_budget_unit1_percent < 0 then
540: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
541: hr_utility.raise_error;
542: End if;
543: end if;
544: --
545: --
551: --
552: -- Raise error if the value is negative
553: --
554: If p_budget_unit1_value < 0 then
555: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
556: hr_utility.raise_error;
557: End if;
558: end if;
559: --
552: -- Raise error if the value is negative
553: --
554: If p_budget_unit1_value < 0 then
555: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
556: hr_utility.raise_error;
557: End if;
558: end if;
559: --
560: /**
567: --
568: -- Raise error if the value is negative
569: --
570: If p_budget_unit1_available < 0 then
571: hr_utility.set_message(8302,'PQH_INVALID_UNIT1_CONSUMED');
572: hr_utility.raise_error;
573: End if;
574: end if;
575: --
568: -- Raise error if the value is negative
569: --
570: If p_budget_unit1_available < 0 then
571: hr_utility.set_message(8302,'PQH_INVALID_UNIT1_CONSUMED');
572: hr_utility.raise_error;
573: End if;
574: end if;
575: --
576: **/
584: --
585: -- Raise error if the value is negative
586: --
587: If p_budget_unit2_percent < 0 then
588: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
589: hr_utility.raise_error;
590: End if;
591: end if;
592: --
585: -- Raise error if the value is negative
586: --
587: If p_budget_unit2_percent < 0 then
588: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
589: hr_utility.raise_error;
590: End if;
591: end if;
592: --
593: --
599: --
600: -- Raise error if the value is negative
601: --
602: If p_budget_unit2_value < 0 then
603: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
604: hr_utility.raise_error;
605: End if;
606: end if;
607: --
600: -- Raise error if the value is negative
601: --
602: If p_budget_unit2_value < 0 then
603: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
604: hr_utility.raise_error;
605: End if;
606: end if;
607: --
608: --
615: --
616: -- Raise error if the value is negative
617: --
618: If p_budget_unit2_available < 0 then
619: hr_utility.set_message(8302,'PQH_INVALID_UNIT2_CONSUMED');
620: hr_utility.raise_error;
621: End if;
622: end if;
623: **/
616: -- Raise error if the value is negative
617: --
618: If p_budget_unit2_available < 0 then
619: hr_utility.set_message(8302,'PQH_INVALID_UNIT2_CONSUMED');
620: hr_utility.raise_error;
621: End if;
622: end if;
623: **/
624: --
631: --
632: -- Raise error if the value is negative
633: --
634: If p_budget_unit3_percent < 0 then
635: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
636: hr_utility.raise_error;
637: End if;
638: end if;
639: --
632: -- Raise error if the value is negative
633: --
634: If p_budget_unit3_percent < 0 then
635: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_PERCENT');
636: hr_utility.raise_error;
637: End if;
638: end if;
639: --
640: --
646: --
647: -- Raise error if the value is negative
648: --
649: If p_budget_unit3_value < 0 then
650: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
651: hr_utility.raise_error;
652: End if;
653: end if;
654: --
647: -- Raise error if the value is negative
648: --
649: If p_budget_unit3_value < 0 then
650: hr_utility.set_message(8302,'PQH_INVALID_BDGT_UNIT_VALUE');
651: hr_utility.raise_error;
652: End if;
653: end if;
654: --
655: --
662: --
663: -- Raise error if the value is negative
664: --
665: If p_budget_unit3_available < 0 then
666: hr_utility.set_message(8302,'PQH_INVALID_UNIT3_CONSUMED');
667: hr_utility.raise_error;
668: End if;
669: end if;
670: **/
663: -- Raise error if the value is negative
664: --
665: If p_budget_unit3_available < 0 then
666: hr_utility.set_message(8302,'PQH_INVALID_UNIT3_CONSUMED');
667: hr_utility.raise_error;
668: End if;
669: end if;
670: **/
671: --
669: end if;
670: **/
671: --
672: --
673: hr_utility.set_location('Leaving:'||l_proc,10);
674: --
675: End chk_numeric_values;
676: --
677: --
710: AND wks.budget_id = bdt.budget_id;
711: Begin
712: --
713: --
714: hr_utility.set_location('Entering:'||l_proc,5);
715: --
716: -- CHECK IF Start date < End date
717: --
718: Open c1;
756: )
757: or not l_api_updating) then
758: --
759: If l_start_date > l_end_date then
760: hr_utility.set_message(8302,'PQH_WPR_INVALID_TIME_PERIODS');
761: hr_utility.raise_error;
762: End if;
763: --
764: -- CHECK IF THE TIME-PERIOD OF THE WORKSHEET LIES within time-period
757: or not l_api_updating) then
758: --
759: If l_start_date > l_end_date then
760: hr_utility.set_message(8302,'PQH_WPR_INVALID_TIME_PERIODS');
761: hr_utility.raise_error;
762: End if;
763: --
764: -- CHECK IF THE TIME-PERIOD OF THE WORKSHEET LIES within time-period
765: -- of Budget
773: --
774: -- raise error as FK does not relate to PK in per_time_periods
775: -- table.
776: --
777: hr_utility.set_message(8302,'PQH_BUDGET_DATE_NOT_FOUND');
778: hr_utility.raise_error;
779: --
780: end if;
781: **/
774: -- raise error as FK does not relate to PK in per_time_periods
775: -- table.
776: --
777: hr_utility.set_message(8302,'PQH_BUDGET_DATE_NOT_FOUND');
778: hr_utility.raise_error;
779: --
780: end if;
781: **/
782: Close c3;
782: Close c3;
783: --
784: If l_start_date < l_budget_start_date OR
785: l_end_date > l_budget_end_date then
786: hr_utility.set_message(8302,'PQH_WKS_PERIOD_OUTSIDE_BDGT');
787: hr_utility.raise_error;
788: End if;
789: --
790: end if;
783: --
784: If l_start_date < l_budget_start_date OR
785: l_end_date > l_budget_end_date then
786: hr_utility.set_message(8302,'PQH_WKS_PERIOD_OUTSIDE_BDGT');
787: hr_utility.raise_error;
788: End if;
789: --
790: end if;
791: --
788: End if;
789: --
790: end if;
791: --
792: hr_utility.set_location('Leaving:'||l_proc,10);
793: --
794: End chk_invalid_time_periods;
795: --
796: --
802: --
803: l_proc varchar2(72) := g_package||'insert_validate';
804: --
805: Begin
806: hr_utility.set_location('Entering:'||l_proc, 5);
807: --
808: -- Call all supporting business operations
809: --
810: chk_worksheet_period_id
862: p_object_version_number => p_rec.object_version_number);
863: --
864: --
865: --
866: hr_utility.set_location(' Leaving:'||l_proc, 10);
867: End insert_validate;
868: --
869: -- ----------------------------------------------------------------------------
870: -- |---------------------------< update_validate >----------------------------|
874: --
875: l_proc varchar2(72) := g_package||'update_validate';
876: --
877: Begin
878: hr_utility.set_location('Entering:'||l_proc, 5);
879: --
880: -- Call all supporting business operations
881: --
882: chk_worksheet_period_id
934: p_object_version_number => p_rec.object_version_number);
935: --
936: --
937: --
938: hr_utility.set_location(' Leaving:'||l_proc, 10);
939: End update_validate;
940: --
941: -- ----------------------------------------------------------------------------
942: -- |---------------------------< delete_validate >----------------------------|
946: --
947: l_proc varchar2(72) := g_package||'delete_validate';
948: --
949: Begin
950: hr_utility.set_location('Entering:'||l_proc, 5);
951: --
952: -- Call all supporting business operations
953: --
954: hr_utility.set_location(' Leaving:'||l_proc, 10);
950: hr_utility.set_location('Entering:'||l_proc, 5);
951: --
952: -- Call all supporting business operations
953: --
954: hr_utility.set_location(' Leaving:'||l_proc, 10);
955: End delete_validate;
956: --
957: end pqh_wpr_bus;