Is it possible to do the calculation like in normal loop.
my condition is to calculate remaining holiday
employee will enter to total holiday i had in last year and this year and i have to calculate total available holiday and when he applies leave then total available holiday should be one day minus.
Holiday_lastyear(HLY)
Holiday_thisyear(HTY)
Total_available_holiday(TAH) = HLY+ HTY
leave = TAH - 1
my doubt is if i use the above formula it will work correctly when he applies first leave, after that TAH remains same and leave will be calculated from that.
Please help me to calculate and update the values.
For(leave = 0; leave >=TAH;leave++)
{
current_Leave = TAH -1;
TAH = Current_leave;
}