DBA Data[Home] [Help]

APPS.HR_PAYROLLS dependencies on HR_UTILITY

Line 37: hr_utility.set_location(proc_name, 1);

33: --
34: no_periods per_time_period_types.number_per_fiscal_year%type;
35: --
36: begin
37: hr_utility.set_location(proc_name, 1);
38: select tp.number_per_fiscal_year
39: into no_periods
40: from per_time_period_types tp
41: where tp.period_type = p_proc_period_type;

Line 77: hr_utility.set_message(801, 'PAY_6601_PAYROLL_INV_PERIOD_TP');

73: p_base_period_type := WEEKLY;
74: p_multiple := 1;
75: else
76: -- Unknown period type.
77: hr_utility.set_message(801, 'PAY_6601_PAYROLL_INV_PERIOD_TP');
78: hr_utility.raise_error;
79: end if;
80: --
81: end get_period_details;

Line 78: hr_utility.raise_error;

74: p_multiple := 1;
75: else
76: -- Unknown period type.
77: hr_utility.set_message(801, 'PAY_6601_PAYROLL_INV_PERIOD_TP');
78: hr_utility.raise_error;
79: end if;
80: --
81: end get_period_details;
82: --

Line 94: hr_utility.set_location(func_name, 1);

90: last_of_month date;
91: temp_day varchar2(2);
92: func_name CONSTANT varchar2(50) := 'hr_payrolls.next_semi_month';
93: begin
94: hr_utility.set_location(func_name, 1);
95: day_of_month := substr(to_char(p_fpe_date, 'DD-MON-YYYY'), 1, 2);
96: if (day_of_month = '15') OR (last_day(p_fpe_date) = p_fpe_date) then
97: -- The first period's end-date is either the 15th or the end-of-month
98: if last_day(p_semi_month_date) = p_semi_month_date then

Line 142: hr_utility.set_location(func_name, 1);

138: temp_day varchar2(2);
139: func_name CONSTANT varchar2(50) := 'hr_payrolls.prev_semi_month';
140: begin
141: -- Get the day of the current month.
142: hr_utility.set_location(func_name, 1);
143: day_of_month := substr(to_char(p_fpe_date, 'DD-MON-YYYY'), 1, 2);
144: if (day_of_month = '15') OR (last_day(p_fpe_date) = p_fpe_date) then
145: -- The first period's end-date is either the 15th or the end-of-month
146: if last_day(p_semi_month_date) = p_semi_month_date then

Line 318: hr_utility.set_location(func_name, 1);

314: --
315: begin
316: -- Errors can occur when performing date manipulation.
317: if p_base_period_type = WEEKLY then
318: hr_utility.set_location(func_name, 1);
319: return (p_target_date + (7 * p_multiple));
320: elsif p_base_period_type = MONTHLY then
321: hr_utility.set_location(func_name, 2);
322:

Line 321: hr_utility.set_location(func_name, 2);

317: if p_base_period_type = WEEKLY then
318: hr_utility.set_location(func_name, 1);
319: return (p_target_date + (7 * p_multiple));
320: elsif p_base_period_type = MONTHLY then
321: hr_utility.set_location(func_name, 2);
322:
323: -- Replacing add_months with customized_add_months for Bug #3697834.
324:
325: if not p_regular_pay_mode then

Line 341: hr_utility.set_location(func_name, 3);

337: end if;
338: -- added following code for 10 day Payroll Bug #5935976
339: elsif p_base_period_type = TEN_DAYS then
340:
341: hr_utility.set_location(func_name, 3);
342: l_day := to_char(p_target_date, 'DD');
343: l_month := to_char(p_target_date, 'MM');
344: l_year := to_char(p_target_date, 'YYYY');
345: l_start_day :='01' ;

Line 390: hr_utility.trace('pay date ' || to_char(temp_date, 'dd-mon-yyyy'));

386: -- semimonth period: Current pay-date -> Current end-date ->
387: -- Previous period's end-date -> Previous period's pay-date.
388: temp_date := prev_semi_month (p_target_date - p_pay_date_offset,
389: p_fpe_date) + p_pay_date_offset ;
390: hr_utility.trace('pay date ' || to_char(temp_date, 'dd-mon-yyyy'));
391: return(temp_date);
392: -- OLD CODE
393: -- Now period's are not guaranteed to end on the 15th or the end_of_month.
394: --

Line 403: -- hr_utility.trace('1st half ' || to_char(temp_date, 'dd-mon-yyyy'));

399: -- then
400: -- -- First half of month, put to 15th and subtract a period.
401: -- temp_date := to_date(('15' || rest_of_date), 'DD-MON-YYYY');
402: -- temp_date := prev_semi_month(temp_date) + p_pay_date_offset;
403: -- hr_utility.trace('1st half ' || to_char(temp_date, 'dd-mon-yyyy'));
404: -- return(temp_date);
405: -- else
406: -- -- We are in second half of month.
407: -- temp_date := last_day(p_target_date);

Line 409: -- hr_utility.trace('2nd half ' || to_char(temp_date, 'dd-mon-yyyy'));

405: -- else
406: -- -- We are in second half of month.
407: -- temp_date := last_day(p_target_date);
408: -- temp_date := prev_semi_month(temp_date) + p_pay_date_offset;
409: -- hr_utility.trace('2nd half ' || to_char(temp_date, 'dd-mon-yyyy'));
410: -- return(temp_date);
411: -- end if;
412: -- OLD CODE
413: end if;

Line 439: hr_utility.set_location(proc_name, 1);

435: --
436: begin
437: -- Find the start and end dates of the earliest and latest periods
438: -- generated for the payroll.
439: hr_utility.set_location(proc_name, 1);
440: select min(start_date),
441: max(end_date),
442: count(time_period_id)
443: into earliest_start_date,

Line 455: hr_utility.set_location(proc_name, 2);

451: -- No periods have been generated for the payroll before.
452: --
453: --
454: -- The start date must be derived.
455: hr_utility.set_location(proc_name, 2);
456: -- added for 10 day payroll Bug 5935976
457: if p_pay_det.base_period_type = TEN_DAYS then
458: p_pay_det.first_start_date
459: := add_multiple_of_base(p_pay_det.first_end_date,

Line 479: hr_utility.set_location(proc_name, 3);

475: else
476: --
477: -- Periods have been generated for the payroll before.
478: --
479: hr_utility.set_location(proc_name, 3);
480: p_pay_det.first_gen_start_date := latest_end_date + 1;
481: p_pay_det.first_start_date := earliest_start_date;
482: --
483: -- The end date of the first period to be generated must be

Line 485: hr_utility.set_location(proc_name, 4);

481: p_pay_det.first_start_date := earliest_start_date;
482: --
483: -- The end date of the first period to be generated must be
484: -- derived.
485: hr_utility.set_location(proc_name, 4);
486: p_pay_det.first_gen_end_date
487: := add_multiple_of_base((p_pay_det.first_gen_start_date)-1,
488: p_pay_det.base_period_type,
489: p_pay_det.multiple,

Line 518: hr_utility.set_location(proc_name, 1);

514: select to_char(p_date,'IW') from dual;
515: --
516: BEGIN
517: --
518: hr_utility.set_location(proc_name, 1);
519: --
520: -- Reset the Payroll Periods for Lunar Month
521: --
522:

Line 607: hr_utility.set_location(proc_name, 5);

603:
604: end if;
605: end if;
606:
607: hr_utility.set_location(proc_name, 5);
608: --
609: END chk_reset;
610: --
611: PROCEDURE clear_warnings IS

Line 617: hr_utility.set_location(proc_name, 1);

613: proc_name CONSTANT varchar2(50) := 'hr_payrolls.clear_warnings';
614: --
615: BEGIN
616: --
617: hr_utility.set_location(proc_name, 1);
618:
619: g_weeks_reset_warn := false;
620: g_end_date_changed_warn := false;
621: g_no_of_weeks_reset := 0;

Line 625: hr_utility.set_location(proc_name, 5);

621: g_no_of_weeks_reset := 0;
622: g_reset_period_name := null;
623: g_new_end_date := null;
624:
625: hr_utility.set_location(proc_name, 5);
626: --
627: END clear_warnings;
628: --
629: --

Line 640: hr_utility.set_location(proc_name, 1);

636: proc_name CONSTANT varchar2(50) := 'hr_payrolls.get_warnings';
637: --
638: BEGIN
639: --
640: hr_utility.set_location(proc_name, 1);
641:
642: p_weeks_reset_warn := g_weeks_reset_warn;
643: p_end_date_changed_warn := g_end_date_changed_warn;
644: p_no_of_weeks_reset := g_no_of_weeks_reset;

Line 648: hr_utility.set_location(proc_name, 5);

644: p_no_of_weeks_reset := g_no_of_weeks_reset;
645: p_reset_period_name := g_reset_period_name;
646: p_new_end_date := g_new_end_date;
647:
648: hr_utility.set_location(proc_name, 5);
649: --
650: END get_warnings;
651: --
652: -- This procedure is called either to create payroll processing

Line 712: hr_utility.set_location(proc_name, 1);

708: --
709: begin
710: --
711: -- Derive the complete date range for this payroll.
712: hr_utility.set_location(proc_name, 1);
713: select min(ppy.effective_start_date),
714: max(ppy.effective_end_date)
715: into payroll_start_date,
716: payroll_end_date

Line 735: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');

731: -- arise).
732: --
733: if p_pay_det.first_start_date < payroll_start_date or
734: p_pay_det.first_end_date > payroll_end_date then
735: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');
736: hr_utility.raise_error;
737: end if;
738: --
739: --

Line 736: hr_utility.raise_error;

732: --
733: if p_pay_det.first_start_date < payroll_start_date or
734: p_pay_det.first_end_date > payroll_end_date then
735: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');
736: hr_utility.raise_error;
737: end if;
738: --
739: --
740: -- Derive the period number of the first period. It is not necessarily

Line 752: hr_utility.set_location(proc_name, 2);

748: -- Loop back to find the first time period with its regular pay date
749: -- in the current legislative year. This is period 1, so from this
750: -- the period number of the first period to be generated can be
751: -- derived.
752: hr_utility.set_location(proc_name, 2);
753:
754: -- Adjust regular pay date for the first generated period if required.
755:
756: l_leap_year_offset := 0;

Line 778: hr_utility.set_location(proc_name, 3);

774: -- Changed for MLS compliance to query the rule mode of the
775: -- format DD/MM, then make up the actual date using the regular
776: -- pay for the year element as before.
777: --
778: hr_utility.set_location(proc_name, 3);
779: begin
780: select to_date(plr.rule_mode || '/' ||
781: to_char(regular_pay_date, 'YYYY'), 'DD/MM/YYYY')
782: into leg_start_date

Line 796: hr_utility.set_location(proc_name, 11);

792: end;
793: --
794: -- Now establish whether the payment date must always lie within
795: -- the period. Default already set to FALSE.
796: hr_utility.set_location(proc_name, 11);
797: --
798: declare
799: rulemode pay_legislation_rules.rule_mode%type;
800: begin

Line 818: hr_utility.set_location(proc_name, 4);

814: end;
815: --
816: if leg_start_date > regular_pay_date then
817: -- Must reduce the legislative start date by a year.
818: hr_utility.set_location(proc_name, 4);
819: leg_start_date := add_months(leg_start_date, -12);
820: end if;
821: --
822: -- Remove the l_leap_year_offset added to the regular pay date

Line 853: hr_utility.set_location('per_num '||per_num,10);

849:
850: end loop;
851: --
852: per_num := no_periods;
853: hr_utility.set_location('per_num '||per_num,10);
854: end; -- Deriving period number.
855: --
856:
857: -- Clear the Global Warning Variables

Line 865: hr_utility.set_location(proc_name, 5);

861: --
862: -- Insert time periods for the number of years required.
863: --
864: --
865: hr_utility.set_location(proc_name, 5);
866: end_years_marker := add_months(p_pay_det.first_start_date,
867: (12 * p_pay_det.no_years));
868: --
869: -- Hold the start date of the next legislative year in order to

Line 871: hr_utility.set_location(proc_name, 6);

867: (12 * p_pay_det.no_years));
868: --
869: -- Hold the start date of the next legislative year in order to
870: -- determine when we are crossing the year boundary.
871: hr_utility.set_location(proc_name, 6);
872: next_leg_start_date := add_months(leg_start_date, 12);
873: period_start_date := p_pay_det.first_gen_start_date;
874: period_end_date := p_pay_det.first_gen_end_date;
875: --

Line 916: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');

912: g_end_date_changed_warn := true;
913: g_new_end_date := period_end_date;
914:
915: if p_pay_det.first_end_date > payroll_end_date then
916: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');
917: hr_utility.raise_error;
918: end if;
919: else
920: p_pay_det.first_gen_end_date := period_end_date;

Line 917: hr_utility.raise_error;

913: g_new_end_date := period_end_date;
914:
915: if p_pay_det.first_end_date > payroll_end_date then
916: hr_utility.set_message(801, 'PAY_6603_PAYROLL_NOGEN_PERIODS');
917: hr_utility.raise_error;
918: end if;
919: else
920: p_pay_det.first_gen_end_date := period_end_date;
921: end if;

Line 957: hr_utility.set_message(801, 'PAY_6999_PAYROLL_INV_PAY_DATE');

953: --
954: if within_period_flag = TRUE then
955: if ( current_regular_pay_date < period_start_date ) or
956: ( current_regular_pay_date > period_end_date ) then
957: hr_utility.set_message(801, 'PAY_6999_PAYROLL_INV_PAY_DATE');
958: hr_utility.raise_error;
959: end if;
960: end if;
961: --

Line 958: hr_utility.raise_error;

954: if within_period_flag = TRUE then
955: if ( current_regular_pay_date < period_start_date ) or
956: ( current_regular_pay_date > period_end_date ) then
957: hr_utility.set_message(801, 'PAY_6999_PAYROLL_INV_PAY_DATE');
958: hr_utility.raise_error;
959: end if;
960: end if;
961: --
962: -- Bug 493007

Line 1021: hr_utility.set_location('l_period_name '||l_period_name,10);

1017: g_reset_period_name := l_period_name;
1018: end if;
1019:
1020: --
1021: hr_utility.set_location('l_period_name '||l_period_name,10);
1022: -- Insert the processing time period.
1023: hr_utility.set_location(proc_name, 7);
1024: insert into per_time_periods
1025: (time_period_id,

Line 1023: hr_utility.set_location(proc_name, 7);

1019:
1020: --
1021: hr_utility.set_location('l_period_name '||l_period_name,10);
1022: -- Insert the processing time period.
1023: hr_utility.set_location(proc_name, 7);
1024: insert into per_time_periods
1025: (time_period_id,
1026: payroll_id,
1027: start_date,

Line 1069: hr_utility.set_location(proc_name, 8);

1065: Current_regular_pay_date + p_pay_det.payslip_view_date_offset
1066: from sys.dual;
1067: --
1068: -- Increment loop variables.
1069: hr_utility.set_location(proc_name, 8);
1070: -- Store the first period end date, on the first loop.
1071: if l_period_generate_count = 1 then
1072: l_first_period_end_date := period_end_date;
1073: end if;

Line 1084: hr_utility.set_location(proc_name, 9);

1080: p_pay_det.multiple,
1081: p_pay_det.first_end_date);
1082:
1083: -- Determine the period number.
1084: hr_utility.set_location(proc_name, 9);
1085:
1086: -- Adjust regular pay date if required.
1087:
1088: l_leap_year_offset := 0;

Line 1103: hr_utility.set_location(proc_name, 10);

1099:
1100: -- Reset the period number since we have just crossed the year
1101: -- boundary. Also, advance next_leg_start_date to next year.
1102: per_num := 1;
1103: hr_utility.set_location(proc_name, 10);
1104: next_leg_start_date := add_months(next_leg_start_date, 12);
1105: else
1106: per_num := per_num + 1;
1107: end if;

Line 1243: hr_utility.set_location(proc_name, 1);

1239: -- the correct number of years is retrieved. All other payroll
1240: -- attributes that we are interested in cannot be date-effectively
1241: -- updated.
1242: --
1243: hr_utility.set_location(proc_name, 1);
1244: select ppy.number_of_years,
1245: ppy.period_type,
1246: ppy.pay_date_offset,
1247: ppy.cut_off_date_offset,

Line 1273: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');

1269: -- appropriate.
1270: --
1271: -- Number of years must be > 0.
1272: if payroll_details.no_years <= 0 then
1273: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');
1274: hr_utility.raise_error;
1275: end if;
1276: --
1277: -- All of the supported time period types map to either a weekly or

Line 1274: hr_utility.raise_error;

1270: --
1271: -- Number of years must be > 0.
1272: if payroll_details.no_years <= 0 then
1273: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');
1274: hr_utility.raise_error;
1275: end if;
1276: --
1277: -- All of the supported time period types map to either a weekly or
1278: -- monthly base period and multiple eg. fortnight = 2 * week,

Line 1335: hr_utility.set_location(proc_name, 1);

1331: -- the correct number of years is retrieved. All other payroll
1332: -- attributes that we are interested in cannot be date-effectively
1333: -- updated.
1334: --
1335: hr_utility.set_location(proc_name, 1);
1336: select ppy.number_of_years,
1337: ppy.period_type,
1338: ppy.pay_date_offset,
1339: ppy.cut_off_date_offset,

Line 1367: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');

1363: -- appropriate.
1364: --
1365: -- Number of years must be > 0.
1366: if payroll_details.no_years <= 0 then
1367: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');
1368: hr_utility.raise_error;
1369: end if;
1370: --
1371: -- All of the supported time period types map to either a weekly or

Line 1368: hr_utility.raise_error;

1364: --
1365: -- Number of years must be > 0.
1366: if payroll_details.no_years <= 0 then
1367: hr_utility.set_message(801, 'PAY_6604_PAYROLL_INV_NO_YEARS');
1368: hr_utility.raise_error;
1369: end if;
1370: --
1371: -- All of the supported time period types map to either a weekly or
1372: -- monthly base period and multiple eg. fortnight = 2 * week,