Use printf in template

This commit is contained in:
2021-12-02 20:53:05 +00:00
parent 696469f6c2
commit a4659c7133
3 changed files with 5 additions and 7 deletions

View File

@ -19,7 +19,9 @@
<td>
<a href="transaction/{{.ID}}">{{.Memo}}</a>
</td>
<td style="text-align: right;{{if .GetPositive()}}{{else}}color: red;{{end}}">{{.GetAmount}}</td>
<td style="text-align: right;{{if .GetPositive}}{{else}}color: red;{{end}}">
{{printf "%.2f" .GetAmount}}
</td>
</tr>
{{end}}
</table>