Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.
I have a situation. An employee takes advance from his gpf account. when he takes advance installment amount is decided along with No Of Installments. now the problem that i am facing is Employee has taken advance for 4 consecutive years. There is a field in which i have to add installment amount for every month and show it in a report. For example

Year  Advance    NoOfInstallment Installment   StartMonth
2000  34000       34              1000           June
2001
2002  31000       32              969            July
2003  25000       30              833.33         October
2004  20000       20              1000           april



now year 2000 has 34 installments starting from june so installments will end on december 2002. Similarly 2002 has installments and so on

the problem that i am facing is there is a monthlyInstallment Field for each year
Now monthly installment for 2000 from june will be 1000. Also monthly Installment for year 2002 upto june will be 1000 but from july it will be 1000 + 969 = 1969 till the end of this year when installment for 2000 stops then installments will be 969 till oct 2003 after which it will be 969 +833.33. in year 2004 from april it will be 969+833.33+1000 until installment for year 2002 are over
and so on
I have taken variables to count total no of installment and noOfInstallmentPaid
problem is that when entering oct 2003 NOofinstallment gets changed to 30 from 32 where as it should remain 32 and 30 should be saved in some other variable.But i can't keep on adding variable i need some solution which will not need to add variable everytime there are two or more than two Installments in a year..

please tell me how to do this. I have spent whole morning over this but unable to find a solution. :'(
Posted
Updated 27-Jun-12 0:21am
v4

1 solution

On every month after payment of installment you can decrease the no of installments or you can create new field for remaining no of installments. Is will help to keep track of remaining no of installments and also makes easy to calculate total installment amount.
 
Share this answer
 
Comments
Aakash Sharma 27-Jun-12 6:00am    
yeah i did that but the problem remains the same. Say for example no of installment = 32 for 2002 now when it enters 2003 october no of intallment will get changed for this fieldto 30 and we will lost track of installments for 2002
shah dipen 27-Jun-12 6:03am    
don't you use another record for another advance?
Aakash Sharma 27-Jun-12 7:45am    
i can't add fields according to advance.. if there are 5 advances for a year then wt i am going to do ??
shah dipen 27-Jun-12 8:08am    
what i'm try to tell you is that, in example you have given you said previous "advance" data is over written by new data, i'm saying can't you add new record for each new "advance" withdraw?
Aakash Sharma 27-Jun-12 8:14am    
hmm. i gave it a thought but how to do it?? i thought about using a hash table with installments as key and Installment amount as value but the problem is that key cannot be updated while in a loop for the same

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