Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m developing Leave application.

each employee get 1 casual leave in month(i.e 1 paid leave).if he does
not taken leave on that month leave should be carry forward to next
month.how to carry forward that leave?just give me some idea
Posted
Comments
R. Giskard Reventlov 30-Aug-12 13:18pm    
What have you tried for yourself?
invisible@123 30-Aug-12 13:27pm    
Sir, i have done tracking part of overall leave in month just getting confused with carry forward
ridoy 30-Aug-12 13:22pm    
question isn't clear..where is your code?

You need to keep track of how many leave days they have overall, and then just add one each month. You should attack problems like this by writing down what you need and thinking about how to represent them in code.
 
Share this answer
 
Comments
invisible@123 30-Aug-12 13:26pm    
Sir, i have done tracking part of overall leave in month just getting confused with carry forward
Christian Graus 30-Aug-12 13:28pm    
Well, there is no carry forward. There's only a grand total. If you must track it per month, then that becomes more complex, in terms of looking for the oldest month to remove a day from, but getting the total is still trivial, it's a select sum(x) where x is 0 or 1, the number of days left to use for that month.
One way would be to have a column (bit field, default 0) that represents that they have/have not taken a day in any given month (mark as 1 if they take the day). To find out totals, carry forward, etc, do a count of 0 columns for a given period. That will give you the number of days to carry forward.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900