Phuduhutswana
New member
- Local time
- Today, 17:24
- Joined
- Oct 17, 2024
- Messages
- 3
I am working on creating a leave management system. The system should:
1) Leave ID (Primary key)
2) Employee ID (is a lookup from the employee table)
3) Store Employee name (is a lookup from the employee table)
2) Store employee start date (is a lookup from the employee table)
3) Store current date
4) Store accrued leave days. 1.5 of leave days is suppose to be accrued monthly (is a calculated value: ([current date] - [employee start date]) / 30 days * 1.5
5) Store Leave start date
6) store leave end date
7) Current leave days (is a calculated value: [leave end date] - [Leave start date])
8) Remaining days (is a calculated value: [accrued leave days] - [current leave days])
The above functionality works well for the employee's first record. But now the problem comes when the same employee applies for another leave. When the same employee applies for another leave, the accrued leave days should not be [employee start date] - [current date],instead it should be [remaining days] (from the first leave) + additional days accrued from the months which were not covered in the initial record. This is where i"'m stuck now
Kindly assist me the gurus
1) Leave ID (Primary key)
2) Employee ID (is a lookup from the employee table)
3) Store Employee name (is a lookup from the employee table)
2) Store employee start date (is a lookup from the employee table)
3) Store current date
4) Store accrued leave days. 1.5 of leave days is suppose to be accrued monthly (is a calculated value: ([current date] - [employee start date]) / 30 days * 1.5
5) Store Leave start date
6) store leave end date
7) Current leave days (is a calculated value: [leave end date] - [Leave start date])
8) Remaining days (is a calculated value: [accrued leave days] - [current leave days])
The above functionality works well for the employee's first record. But now the problem comes when the same employee applies for another leave. When the same employee applies for another leave, the accrued leave days should not be [employee start date] - [current date],instead it should be [remaining days] (from the first leave) + additional days accrued from the months which were not covered in the initial record. This is where i"'m stuck now
Kindly assist me the gurus