Status: Patch Available
Affects Version/s: Trunk
Fix Version/s: None
Windows XP, JDK 1.6
Sprint:Bug Crush Event - 21/2/2015
I wish to do some enhancement in existing Leave functionality taking Party benefits into consideration in OFBiz.
Existing functionalities :
- Currently employee can create leave by selecting his approver.
- Approver will approve the leave applied by the employee.
New functionality :
- Admin party will credit leaves at the beginning of a financial year for employees
- These leaves can be taken by employee under available benefits from Party Benefit
- Party Benefits will be setup for each employee as per existing flow
- Whenever employee creates leave application, his/her benefits will be checked for validation purpose(relation will be set between leave reason type and benefit type) along with exclusion of weekend and organization wide holidays.
- On leave approval, corresponding number of leaves would be deducted from employee's leave account.
For implementing this, following modifications are being thought of :
- Adding foreign key column 'benefitTypeId' in 'EmplLeaveReasonType' (reference from
By maintaining this relation, each time employee creates a leave application (with some leave reason type Id),we can keep track of 'availableTime' for this particular employee/party-benefitType combination
- We can have CreditEmplLeave,EmplLeave and Holiday tables as mention in the below thread
Following is a demo flow of above mentioned functionality :
1.Admin credits leaves for an employee.
2.Employee applies for leave for first time with leave reason type as 'Medical' (for time being lets assume 'Sick Leave' is benefit type for this leave reason type in 'EmplLeaveReasonType' table)
3.Before creating leave application, we would check following two things :
- If that employee has enough leave balance
- If employee has not crossed 'availableTime' threshold for benefit type 'Sick Leave'(using Party Benefits already setup through other existing screen)
4.After leave application is created, approver can approve/reject it
5.Corresponding updations will be made in 'EmplLeave'(changing status to approve/rejected) and CreditEmplLeave tables(deduction if approved)
Thanks & Regards,