225: SELECT ptp.start_date
226: , ptp.end_date
227: , ptp.regular_payment_date
228: FROM pay_all_payrolls_f papf
229: , per_time_periods ptp
230: WHERE papf.payroll_id = p_payroll_id
231: AND trunc(p_run_date)
232: BETWEEN papf.effective_start_date
233: AND papf.effective_end_date
498:
499: if l_rule = 'A' then
500:
501: open c_ref for 'select 1
502: from pay_payrolls_f ppf, per_Assignments_f paf, per_time_periods ptp
503: where paf.assignment_id = '||p_assignment_id||' '||'
504: and trunc(sysdate) between paf.effective_Start_Date and paf.effective_end_date
505: and paf.payroll_id = ppf.payroll_id
506: and trunc(sysdate) between ppf.effective_start_Date and ppf.effective_end_date
518:
519: elsif l_rule = 'U' then
520:
521: open c_ref for 'select 1
522: from pay_payrolls_f ppf, per_Assignments_f paf, per_time_periods ptp
523: where paf.assignment_id = '||p_assignment_id||' '||'
524: and trunc(sysdate) between paf.effective_Start_Date and paf.effective_end_date
525: and paf.payroll_id = ppf.payroll_id
526: and trunc(sysdate) between ppf.effective_start_Date and ppf.effective_end_date
551: SELECT ptp.start_date
552: , ptp.end_date
553: , ptp.regular_payment_date
554: FROM pay_all_payrolls_f papf
555: , per_time_periods ptp
556: , per_all_assignments_f paf
557: WHERE papf.payroll_id = paf.payroll_id
558: AND paf.assignment_id = p_assignment_id
559: AND trunc(sysdate)