From a6d9c76af2b4c7f3accf27fce5ecd83fbdcaf0c1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 6 Aug 2014 00:25:02 -0700 Subject: Tidy up transactions list --- public/js/report.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'public/js/report.js') diff --git a/public/js/report.js b/public/js/report.js index 09d16a6f..69794ad5 100644 --- a/public/js/report.js +++ b/public/js/report.js @@ -63,15 +63,15 @@ received = parseFloat(this.received); amount = received * exchange; received *= 1000; - return $('.report tbody').append("\n " + this.date + "\n " + this.address + "\n " + (exchange.toFixed(2)) + "\n " + (received.toFixed(5)) + "\n " + (amount.toFixed(2)) + "\n"); + return $('.report tbody').append("\n " + (moment(this.date, 'YYYY-MM-DD h:mm:ss').format('MMM D h:mma')) + "\n " + (exchange.toFixed(2)) + "\n " + (received.toFixed(5)) + "\n " + (amount.toFixed(2)) + "\n"); }); btc = 0; - $('table.report td:nth-child(4)').each(function() { + $('table.report tbody td:nth-child(3)').each(function() { return btc += parseFloat($(this).html()); }); $('#btc').html(btc.toFixed(5)); cad = 0; - $('table.report td:nth-child(5)').each(function() { + $('table.report tbody td:nth-child(4)').each(function() { return cad += parseFloat($(this).html()); }); return $('#cad').html(cad.toFixed(2)); -- cgit v1.2.3