The dates and day are coming from :
1. Starting Date(x) : The date when the member started working,
2. Adding days per month(y) : Are days that are leave days added per month to each member,
This you can easily calculate from the start date to the current date. I assume you can handle this one. Look at the
months for your calculations.
3. Present Date(z) : Is the present date,
Yes, the function
Date() will return the present date
4. Given Days(i) : Are days that the member take when going on leave ,
Is this a value types in, read from the DB? Either way, it gets specified somehow.
5. Remain Days(j) : Are days that the member will have left after taking a leave.
Now subtract the value in #4 from the value in #2
The result I want to store and desplay in field that will deplay the total leave credit days a member has on the form that will deplay his/her personal details.
From the above you have:
Total leave days accumulated
Leave days taken
Leave days left
I'd recommend storing only leave days taken. The other two can easily be calculated when you need the values.
Reputation Points: 3278
Solved Threads: 894
Posting Sage
Offline 7,747 posts
since May 2006