';
txt+='Payment Number | Payment Amount | Interest | Principle | Balance |
';
amount=eval(amount);
for(i=1;i<=n*npy;i++){
tbldata='';
interest=amount*apr/npy/100;
amount+=interest;
principle=payment-interest;
amount-=payment;
txt+=' | '+tbldata+i+':'+tbldata+round(payment)+''+tbldata+round(interest)+''+tbldata+round(principle)+''+tbldata+round(amount)+'
';
}
txt+='