From 1570f58835f612f13668681bd07f5d64c9f5bae5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 23 Feb 2015 16:42:59 +0100 Subject: [PATCH] [IMP] chart of accounts: only display non-zero amounts --- _static/chart-of-accounts.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_static/chart-of-accounts.js b/_static/chart-of-accounts.js index 407075282..6cb0e4bf2 100644 --- a/_static/chart-of-accounts.js +++ b/_static/chart-of-accounts.js @@ -84,13 +84,15 @@ React.DOM.td({className: React.addons.classSet({ 'text-right': true, 'highlight-op': highlight === 'debit' - })}, data.get('debit')), + })}, data.get('debit') || ''), React.DOM.td({className: React.addons.classSet({ 'text-right': true, 'highlight-op': highlight === 'credit' - })}, data.get('credit')), - React.DOM.td({className: 'text-right'}, - data.get('debit') - data.get('credit')) + })}, data.get('credit') || ''), + React.DOM.td( + {className: 'text-right'}, + (data.get('debit') - data.get('credit')) || '' + ) ); }).toArray() )