Use printf in template

This commit is contained in:
jacob1123 committed 2021-12-02 20:53:05 +00:00
1 parent 696469f6c2
commit a4659c7133
3 files changed
+5 -7

No files matched your search

+3 -1
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>