Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

70 líneas
1.8 KiB

  1. {{define "summary"}}
  2. <section id="summary">
  3. <table>
  4. <thead><tr>
  5. <th></th>{{range $l := .Estimate.Loans}}<th>{{$l.Name}}</th>{{end}}
  6. </tr></thead>
  7. <tbody>
  8. <tr><td>Type</td>
  9. {{range .Estimate.Loans}}<td>{{.Type.Name}}</td>{{end}}</tr>
  10. <tr><td>Term</td>
  11. {{range .Estimate.Loans}}<td>{{.Term}} Years</td>{{end}}</tr>
  12. <tr><td>Amortization</td>
  13. {{range .Estimate.Loans}}<td>{{.Amortization}}</td>{{end}}</tr>
  14. <tr><td>Interest rate</td>
  15. {{range .Estimate.Loans}}<td>{{.Interest}}%</td>{{end}}</tr>
  16. <tr><td>Monthly MI</td>
  17. {{range .Estimate.Loans}}<td>${{dollars .Mi.Premium}}/month</td>{{end}}</tr>
  18. <tr><td>Real estate taxes</td>
  19. {{range .Estimate.Loans}}<td>${{dollars .Tax}}/month</td>{{end}}</tr>
  20. <tr class="total"><td>Total monthly</td>
  21. {{range .Estimate.Loans}}<td>${{dollars .Result.TotalMonthly}}</td>{{end}}</tr>
  22. <tr class="gap"></tr>
  23. <tr><td>Purchase price</td>
  24. {{range .Estimate.Loans}}<td>${{dollars $.Estimate.Price}}</td>{{end}}</tr>
  25. <tr><td>Loan amount</td>
  26. {{range .Estimate.Loans}}<td>${{dollars .Amount}}</td>{{end}}</tr>
  27. <tr><td>Down payment</td>
  28. {{range .Estimate.Loans}}<td>${{diff .Amount $.Estimate.Price}}</td>{{end}}</tr>
  29. <tr><td>Closing costs</td>
  30. {{range .Estimate.Loans}}<td>${{dollars .Result.TotalFees}}</td>{{end}}</tr>
  31. <tr><td>MI Premium</td>
  32. {{range .Estimate.Loans}}<td>${{.Mi.Upfront}}</td>{{end}}</tr>
  33. <tr><td>Credits</td>
  34. {{range .Estimate.Loans}}<td>${{dollars .Result.TotalCredits}}</td>{{end}}</tr>
  35. <tr class="total"><td>Cash to close</td>
  36. {{range .Estimate.Loans}}<td>${{dollars .Result.CashToClose}}</td>{{end}}</tr>
  37. </tbody>
  38. </table>
  39. </section>
  40. <style scoped>
  41. table {
  42. width: 100%;
  43. margin-top: 20px;
  44. }
  45. tr.gap {
  46. height: 20px;
  47. }
  48. tr.total {
  49. text-decoration: underline;
  50. font-weight: bold;
  51. }
  52. table td:first-child {
  53. font-weight: bold;
  54. }
  55. tbody tr:nth-child(odd) {
  56. background: #F5F5F3;
  57. }
  58. table td {
  59. padding: 4px;
  60. }
  61. </style>
  62. {{end}}