DECLARE
p number:=3133300.00; -- principal amout
n number:=20 ; -- payament period in years
r number:=9.25 ; -- rate of interest yearly
ins number:=0.00 ; -- monthly installment
pins number:=0.00 ; -- monthle principal paid
iins number:=0.00 ; -- monthly interest paid
ins1 number:=0.00 ; -- interest of first month
dateofloan date :=to_date('01/10/2009','dd/mm/yyyy');
BEGIN---- Calculating rate of interest for period
dbms_output.put_line('==================================================== ');
dbms_output.put_line('Total Loan Amount : '||p);
dbms_output.put_line('Rate of Interest(Yearly) : '||r);r:=round(r/1200,8);
dbms_output.put_line('Applied Rate of Interest : '||r);----- Calculating period
dbms_output.put_line('Periods (Years) : '||n);n:=n*12;
dbms_output.put_line('Total Installments : '||n);------ Calculating monthly installment
ins:=round((p*r*power((1+r),240))/(power((1+r),240)-1),0);
ins1:=round (p*r,0);
dbms_output.put_line('Monthly Insatllment : '||round(ins,0));
dbms_output.put_line('==================================================== ');
dbms_output.put_line('*********** Amortization Schedule **************** ');
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
dbms_output.put_line('Date '||' | Amount for cal |'||' Installment |'||' Interst paid |'||' Principal Paid |'||' Outstanding Amount till date ');
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
For i in 1..n
loop
dbms_output.put_line(add_months(to_date(dateofloan,'dd/mm/yyyy'),i-1)||' |'||rtrim(p,12)||' '||'|'||ins||' |'||ins1||' |'||(ins-ins1)||' |'||(p-ins+ins1));
p:=p-ins+ins1;
ins1:=round (p*r,0);
end loop;
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
EXCEPTION
when others then
dbms_output.put_line('Error : '||SQLERRM);
END;
By
Shrikesh Pandey
p number:=3133300.00; -- principal amout
n number:=20 ; -- payament period in years
r number:=9.25 ; -- rate of interest yearly
ins number:=0.00 ; -- monthly installment
pins number:=0.00 ; -- monthle principal paid
iins number:=0.00 ; -- monthly interest paid
ins1 number:=0.00 ; -- interest of first month
dateofloan date :=to_date('01/10/2009','dd/mm/yyyy');
BEGIN---- Calculating rate of interest for period
dbms_output.put_line('==================================================== ');
dbms_output.put_line('Total Loan Amount : '||p);
dbms_output.put_line('Rate of Interest(Yearly) : '||r);r:=round(r/1200,8);
dbms_output.put_line('Applied Rate of Interest : '||r);----- Calculating period
dbms_output.put_line('Periods (Years) : '||n);n:=n*12;
dbms_output.put_line('Total Installments : '||n);------ Calculating monthly installment
ins:=round((p*r*power((1+r),240))/(power((1+r),240)-1),0);
ins1:=round (p*r,0);
dbms_output.put_line('Monthly Insatllment : '||round(ins,0));
dbms_output.put_line('==================================================== ');
dbms_output.put_line('*********** Amortization Schedule **************** ');
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
dbms_output.put_line('Date '||' | Amount for cal |'||' Installment |'||' Interst paid |'||' Principal Paid |'||' Outstanding Amount till date ');
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
For i in 1..n
loop
dbms_output.put_line(add_months(to_date(dateofloan,'dd/mm/yyyy'),i-1)||' |'||rtrim(p,12)||' '||'|'||ins||' |'||ins1||' |'||(ins-ins1)||' |'||(p-ins+ins1));
p:=p-ins+ins1;
ins1:=round (p*r,0);
end loop;
dbms_output.put_line('---------------------------------------------------------------------------------------------------------------------------------------');
EXCEPTION
when others then
dbms_output.put_line('Error : '||SQLERRM);
END;
By
Shrikesh Pandey
how do we handle multiple disbursements at various date?
ReplyDeleteFantastic blog! Do you have any tips and hints for aspiring writers? I’m planning to start my own website soon but I’m a little lost on everything. Would you propose starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m completely overwhelmed .. Any suggestions? Many thanks! Development Finance calculator
ReplyDeleteMy name is Fajar. I live in Bedono in Central Java I was in a very chronic financial issue and terminal health situation some few weeks back. After all my search for assistance from friends and neighbors proved abortive, I feel there was no one who truly cares. I became so exhausted due to lack of funds to expand my business and my 2 kids aged 5 and 8 were also not good looking due to lack of proper care as a result of finance. One faithful morning I saw an old time friend of my late husband and I told him all I have been going through and he said the only way he could help was to direct me to a good loan officer in USA that also helped him, He explained to me on how he was financially down and how he got boosted by this loan officer ( Mr Pedro who grant him 7,000,000.00 USD loan at an affordable rate of 2% rate . He further assured me that they were the only legit loan firm he found online. He gave me their email & That was how i applied and was also granted a loan and my life changed for the good. CONTACT THE ONLY GENUINE LENDER Mr Pedro VIA Email: pedroloanss@gmail.com to resolve your financial mess.
ReplyDelete