mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-28 07:58:29 +01:00
refine details presentation
This commit is contained in:
parent
17cce5cd64
commit
d5abd12d74
1 changed files with 3 additions and 2 deletions
|
@ -25,14 +25,15 @@ app.controller( 'BalanceCtrl',
|
||||||
return function( key, x, y, e, graph ) {
|
return function( key, x, y, e, graph ) {
|
||||||
var details = $scope.balance.details[ key ];
|
var details = $scope.balance.details[ key ];
|
||||||
return '<h3>' + details.key + '</h3>'
|
return '<h3>' + details.key + '</h3>'
|
||||||
+ '<table><tr><th>Date</th><th>Payee</th><th>Amount</th></tr>'
|
+ '<table>'
|
||||||
+ _(details.values).map( function( transaction ) {
|
+ _(details.values).map( function( transaction ) {
|
||||||
return '<tr><td>'
|
return '<tr><td>'
|
||||||
+ transaction.date + '</td><td>'
|
+ transaction.date + '</td><td>'
|
||||||
+ transaction.payee + '</td><td style="text-align: right">'
|
+ transaction.payee + '</td><td style="text-align: right">'
|
||||||
+ transaction.amount + ' '
|
+ $filter( 'number' )( transaction.amount, 2 ) + ' '
|
||||||
+ transaction.currency + '</td></tr>';
|
+ transaction.currency + '</td></tr>';
|
||||||
}).join( '' )
|
}).join( '' )
|
||||||
|
+ '<tr><th></th><th>Total :</th><th>' + x + ' €</th></tr>'
|
||||||
+ '</table>';
|
+ '</table>';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue