Add budgeting
This commit is contained in:
37
web/budgeting.html
Normal file
37
web/budgeting.html
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
{{template "base" .}}
|
||||
|
||||
{{define "title"}}Budget{{end}}
|
||||
|
||||
{{define "new"}}
|
||||
{{template "transaction-new"}}
|
||||
{{end}}
|
||||
|
||||
{{define "main"}}
|
||||
<div class="budget-item">
|
||||
<a href="#newtransactionmodal" data-toggle="modal" data-target="#newtransactionmodal">New Transaction</a>
|
||||
<span class="time"></span>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/budget/{{.Budget.ID}}/{{.Date.Year}}/{{.Date.Month}}">Next Month</a>
|
||||
<a href="/budget/{{.Budget.ID}}/{{.Date.Year}}/{{.Date.Month}}">Previous Month</a>
|
||||
</div>
|
||||
<table class="container col-lg-12" id="content">
|
||||
{{range .Categories}}
|
||||
<tr>
|
||||
<td>{{.Group}}</td>
|
||||
<td>{{.Name}}</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td style="text-align: right;{{if .Balance.GetPositive}}{{else}}color: red;{{end}}">
|
||||
{{printf "%.2f" .Balance.GetFloat64}}
|
||||
</td>
|
||||
<td style="text-align: right;{{if .Activity.GetPositive}}{{else}}color: red;{{end}}">
|
||||
{{printf "%.2f" .Activity.GetFloat64}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{end}}
|
Reference in New Issue
Block a user