我写了小的“金”利害关系标记。
- it is calculating amount of credit from monthly re-payment
www.un.org/Depts/DGACM/index_spanish.htm 问题是,我的利息计算逻辑完全是错误的。
look:
//Get the value - monhtly repayment
var InputedValue = $( form input[name="val1"] ).val();
// 12 ,18, 24, 30, 36 - NumberOfMonths
for (var i = 12; i <= 36; i += 12) {
// j = 20 - Deposit in %
for (var j = 10; j <= 10; j += 10) {
// g = 20, 30 - InterestPerYear in %
for (var g = 10; g <= 10; g += 10) {
var InScaleOfYear = i / 12;
// Amount of payment excluding deposit
var AmountOfPayments = (InputedValue * (i - 1)); // rat bedzie o jedna mniej niz ilosc miesiecy, bo wplata poczatkowa
// Amount of payment including deposit
var AmountInTotal = (AmountOfPayments * 100) / (100 - j);
// Deposit
var Deposit = AmountInTotal - AmountOfPayments;
// Amount of payment in one year
var AmountOfPaymentInOneYear = (AmountOfPayments / InScaleOfYear);
var InterestPerYear = ((AmountOfPaymentInOneYear * g) / 100);
// Interest in total
var InterestInTotal = InterestPerYear * InScaleOfYear;
// Amount of credit
var AmountOfCredit = (AmountOfPayments + Deposit) - InterestInTotal;
$( table tbody ).append( <tr><td>
+ i + </td><td>
+ "at " + j + "% = " + Deposit.toFixed(2) + </td><td>
+ "at " + g + "% = " + InterestPerYear.toFixed(2) + </td><td>
+ "at " + g + "% = " + InterestInTotal.toFixed(2) + </td><td>
+ AmountOfPayments.toFixed(2) + </td><td>
+ AmountInTotal.toFixed(2) + </td><td>
+ AmountOfCredit.toFixed(2) + </td></tr> );
}
}
}
任何从事类似工作的人? • 我如何在以下信息中计算利息:
- number of month / years (
i = months
) - amount of monthly payment (
$( form input[name="val1"] ).val();
) - amount of the deposit (
j = deposit
) - interest rate (
g = interest rate
)
www.un.org/Depts/DGACM/index_spanish.htm 如你所看到,休息时间为几个月/月/月/日。 仅需要一些帮助,以计算对 lo的兴趣。