Преглед на файлове

Fix monthly MI calculation

master
Immanuel Onyeka преди 10 месеца
родител
ревизия
67479195e2
променени са 2 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. +0
    -3
      components/new/summary.vue
  2. +2
    -2
      skouter.go

+ 0
- 3
components/new/summary.vue Целия файл

@@ -80,7 +80,6 @@ function summarize() {
}).then(resp => {
if (resp.ok && resp.status == 200) return resp.json()
}).then(e => {
console.log(e)
emit('update', e)
})

@@ -100,8 +99,6 @@ function create() {
saved.value = true
return
} else {
// resp.text().then(t => this.errors = [t])
// window.location.hash = 'new'
resp.text().then(t => console.log(t))
saved.value = false
}


+ 2
- 2
skouter.go Целия файл

@@ -331,7 +331,7 @@ func (estimate *Estimate) makeResults() []Result {
for i := range estimate.Loans {
var loan = &estimate.Loans[i]
var result Result
var result Result = Result{}
// Monthly payments use amortized loan payment formula plus monthly MI,
// plus all other recurring fees
result.LoanPayment = amortize(float64(loan.Amount),
@@ -340,7 +340,7 @@ func (estimate *Estimate) makeResults() []Result {
result.TotalMonthly = result.LoanPayment + loan.Hoi + loan.Tax + loan.Hazard
if loan.Mi.Monthly {
result.TotalMonthly = result.TotalMonthly +
int(loan.Mi.Rate/100*float32(loan.Amount))
int(loan.Mi.Rate/100/12*float32(loan.Amount))
}
for i := range loan.Fees {


Loading…
Отказ
Запис