Display cost of contribution with to digit after comma

This commit is contained in:
Benjamin Renard 2014-01-18 00:26:11 +01:00
parent 1c13315cce
commit a7e0ef9076

View file

@ -166,7 +166,7 @@ show_contributions=function(group,contributor_name) {
sum=0;
for (idx in contributions) {
col_actions='<td><div class="btn-group" data-uuid="'+contributions[idx].uuid+'"><button type="button" class="btn btn-default contribution_edit_btn"><span class="glyphicon glyphicon-edit"></span></button><button type="button" class="btn btn-default contribution_delete_btn"><span class="glyphicon glyphicon-trash"></span></button></div></td>';
tbody.append('<tr><td>'+contributions[idx].getTitle()+'</td><td>'+contributions[idx].cost+' €</td>'+col_actions+'</tr>');
tbody.append('<tr><td>'+contributions[idx].getTitle()+'</td><td>'+contributions[idx].cost.toFixed(2)+' €</td>'+col_actions+'</tr>');
sum+=contributions[idx].cost;
}
total.html(sum.toFixed(2)+' €');