From cc6b4b3120266c06e57cf881273cd82eeb07b40c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sun, 30 Jun 2013 10:32:09 +0200 Subject: [PATCH] Add number formatting in account transactions This should fix #282 where numbers are displayed in scientific notation. --- .../templates/mmcFE/account/transactions/default.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/templates/mmcFE/account/transactions/default.tpl b/public/templates/mmcFE/account/transactions/default.tpl index c76e9fae..bf64450d 100644 --- a/public/templates/mmcFE/account/transactions/default.tpl +++ b/public/templates/mmcFE/account/transactions/default.tpl @@ -32,7 +32,7 @@ {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} {if $TRANSACTIONS[transaction].height == 0}n/a{else}{$TRANSACTIONS[transaction].height}{/if} - {$TRANSACTIONS[transaction].amount} + {$TRANSACTIONS[transaction].amount|number_format:"8"} {/if} {/section} @@ -72,7 +72,7 @@ {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} {if $TRANSACTIONS[transaction].height == 0}n/a{else}{$TRANSACTIONS[transaction].height}{/if} - {$TRANSACTIONS[transaction].amount} + {$TRANSACTIONS[transaction].amount|number_format:"8"} {if $TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus'} {assign var="credits" value="`$credits+$TRANSACTIONS[transaction].amount`"} @@ -83,7 +83,7 @@ {/section} Unconfirmed Totals: - {$credits|default - $debits|default} + {($credits|default - $debits|default)|number_format:"8"} @@ -118,7 +118,7 @@ {$TRANSACTIONS[transaction].type} {$TRANSACTIONS[transaction].coin_address} {if $TRANSACTIONS[transaction].height == 0}n/a{else}{$TRANSACTIONS[transaction].height}{/if} - {$TRANSACTIONS[transaction].amount} + {$TRANSACTIONS[transaction].amount|number_format:"8"} {if $TRANSACTIONS[transaction].type == 'Orphan_Credit' or $TRANSACTIONS[transaction].type == 'Orphan_Bonus'} {assign var="orphan_credits" value="`$orphan_credits+$TRANSACTIONS[transaction].amount`"} @@ -129,7 +129,7 @@ {/section} Orphaned Totals: - {$orphan_credits|default - $orphan_debits|default} + {($orphan_credits|default - $orphan_debits|default)|number_format:"8"}