PER Accrual Balances

Description

Categories
Enginatics
Repository
GitHub
Leave balances of the employees enrolled in an accrual plan at the Effective Date, one row per assignment and plan.

The figures are those of Oracle's accrual calculation at the Effective Date, as the Accruals window shows them. Accrual Term Start Date is the start of the plan's current accrual term. Accrued is the time accrued in the term, Taken the absences recorded for the plan in the term, Carried Over the time brought forward from the previous term, and Other Contributions the total of the other elements in the plan's net calculation rules, such as time bought or sold. Net Balance is Accrued less Taken plus Carried Over plus Other Contributions.

Leave Liability is the net balance times the unit rate. For a plan in days the unit rate is the annualized salary divided by Working Days per Year. For a plan in hours it is the salary of an employee on an hourly salary basis, otherwise the annualized salary divided by the annual working hours of the assignment. The salary is the latest approved salary at the Effective Date.

The calculation runs the accrual formula of the plan for every row. An enrollment whose formula fails, for example because its payroll has no periods for the whole accrual term, is listed without figures and with the error in Calculation Message. Calculation Errors only lists these enrollments.

SQL 130 lines

Parameters 12

ParameterTypeList of values SQL
Business GroupLOV
haouv.name=:business_group
Effective DateDate
Accrual PlanLOV
pap.accrual_plan_name=:accrual_plan
Accrual CategoryLOV
pap.accrual_category=:accrual_category
OrganizationLOV
haouv2.name=:organization
EmployeeLOV
papf.full_name=:employee
PayrollLOV
paaf.payroll_id in (select paypf.payroll_id from pay_all_payrolls_f paypf where paypf.payroll_name=:payroll)
SupervisorLOV
paaf.supervisor_id=:supervisor_id
Supervisor HierarchyLOV
paaf.assignment_id in (select h.assignment_id from (select paaf2.assignment_id, paaf2.person_id, paaf2.supervisor_id from per_all_assignments_f paaf2 where :effective_date between paaf2.effective_start_date and paaf2.effective_end_date and paaf2.assignment_type in ('E','C')) h start with :top_supervisor_id=h.supervisor_id connect by nocycle prior h.person_id=h.supervisor_id)
Working Days per YearNumber
Minimum Net BalanceNumber
z.net_balance>=:minimum_net_balance
Calculation Errors onlyLOV
z.calculation_message is not null