Implement budgeting views by calculating most values locally
This commit is contained in:
@@ -8,4 +8,16 @@
|
||||
<td class="right {{if .IsZero}}zero{{else if not .IsPositive}}negative{{end}}">
|
||||
{{printf "%.2f" .GetFloat64}}
|
||||
</td>
|
||||
{{end}}
|
||||
|
||||
{{define "amountf64"}}
|
||||
<span class="right {{if eq . 0.0}}zero{{else if lt . 0.0}}negative{{end}}">
|
||||
{{printf "%.2f" .}}
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
{{define "amountf64-cell"}}
|
||||
<td class="right {{if eq . 0.0}}zero{{else if lt . 0.0}}negative{{end}}">
|
||||
{{printf "%.2f" .}}
|
||||
</td>
|
||||
{{end}}
|
@@ -41,10 +41,10 @@
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
{{template "amount-cell" .AvailableLastMonth}}
|
||||
{{template "amount-cell" .Assigned}}
|
||||
{{template "amount-cell" .Activity}}
|
||||
{{template "amount-cell" .Available}}
|
||||
{{template "amountf64-cell" .AvailableLastMonth}}
|
||||
{{template "amountf64-cell" .Assigned}}
|
||||
{{template "amountf64-cell" .Activity}}
|
||||
{{template "amountf64-cell" .Available}}
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user