MMEX Desktop v1.3.4.rc.3 is ready https://github.com/moneymanagerex/money ... 1.3.4-rc.3

Currency formating

Build and share your cool customized reports built w/ one sql, Chart.js and Lua (https://github.com/moneymanagerex/general-reports)
Post Reply
Nikolay
MMEX Developer
Posts: 1176
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Currency formating

Post by Nikolay »

Currency formating

Code: Select all

<td class="money" style="text-align:right"><TMPL_VAR xxxxxx></td>

<script type="text/javascript">
  function currency(n) {n = parseFloat(n); return isNaN(n) ? 0 : n.toFixed(2);}
  var elements= document.getElementsByClassName("money");
  for (var i = 0; i < elements.length; i++) {elements[i].innerHTML = currency(elements[i].innerHTML);}
</script>
</html>

Post Reply