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