Extract amount template

This commit is contained in:
2021-12-07 14:49:58 +00:00
parent 4a0759af8f
commit 6f4bff929e
6 changed files with 20 additions and 13 deletions

11
web/amount.tpl Normal file
View File

@ -0,0 +1,11 @@
{{define "amount"}}
<span class="right {{if .GetPositive}}{{else}}negative{{end}}">
{{printf "%.2f" .GetFloat64}}
</span>
{{end}}
{{define "amount-cell"}}
<td class="right {{if .GetPositive}}{{else}}negative{{end}}">
{{printf "%.2f" .GetFloat64}}
</td>
{{end}}