Hello Everyone,
I found an old thread on this subject and was directed to Dr. Peter's Learn Alpha website http://www.learn alpha.com/Amorts/Amorts.htm this worked great.
In this tutorial the user entered term is expressed in number of YEARS, how would I need to change the script If I want to have the term entered in number of MONTHS instead?
Here is an extract of the script:
Would it just be a matter of changing
to
and
to
Thank you for any pointers
I found an old thread on this subject and was directed to Dr. Peter's Learn Alpha website http://www.learn alpha.com/Amorts/Amorts.htm this worked great.
In this tutorial the user entered term is expressed in number of YEARS, how would I need to change the script If I want to have the term entered in number of MONTHS instead?
Here is an extract of the script:
Code:
no_of_payments=term*12 (more code here) while count < no_of_payments 'setup the Loop to_int=(remaining*(rate/100))/12 'get int. amount to_prin=payment-to_int 'get principal amount pmt_total=pmt_total+cpayment 'update total fields int_total=int_total+to_int prin_total=prin_total+to_prin nbrdays=pmt_date-Date1 t.enter_begin() 'create extract record t.Loan_nbr=cloan_nbr t.Payment_nbr=paymnt_nbr t.pmt_date=pmt_date t.loan_bal=remaining t.rate=(crate*100) t.pmt_amt=cpayment t.Nbrofdays=nbrdays t.to_interest=to_int t.to_principal=to_prin t.tot_pmts=pmt_total t.tot_int=int_total t.tot_prin=prin_total t.enter_end(.t.) remaining=remaining-(payment-to_int) 'update remaining balance pmt_date=addmonths(pmt_date,1) 'increment pmt date Date1=addmonths(pmt_date,-1) paymnt_nbr=paymnt_nbr+1 'increment paymnt_nbr count=count+1 'increment count end while
Code:
no_of_payments=term*12
Code:
no_of_payments=term
Code:
to_int=(remaining*(rate/100))/12
Code:
to_int=(remaining*(rate/100))
Comment