diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2017-01-16 21:13:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-16 21:13:56 +0100 |
| commit | dc75a72dd0caeafce20b09d3ad538bdcbabf4408 (patch) | |
| tree | 49b0a33793fd626a0251b3662e8af45f3bb5b4ff /budget/templates/settle_bills.html | |
| parent | d33f4a92a6384937169881f78e52afdb76412a20 (diff) | |
| parent | d6cf89008fdb5e40395d3ccc879db2255f13e461 (diff) | |
| download | ihatemoney-mirror-dc75a72dd0caeafce20b09d3ad538bdcbabf4408.zip ihatemoney-mirror-dc75a72dd0caeafce20b09d3ad538bdcbabf4408.tar.gz ihatemoney-mirror-dc75a72dd0caeafce20b09d3ad538bdcbabf4408.tar.bz2 | |
Merge pull request #164 from zorun/fix_zero_transfers
Fix zero-amount transfers and other rounding issues
Diffstat (limited to 'budget/templates/settle_bills.html')
| -rw-r--r-- | budget/templates/settle_bills.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/budget/templates/settle_bills.html b/budget/templates/settle_bills.html index 4066b16..16c60b3 100644 --- a/budget/templates/settle_bills.html +++ b/budget/templates/settle_bills.html @@ -11,11 +11,11 @@ <div id="table_overflow"> <table class="balance table"> {% set balance = g.project.balance %} - {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id] != 0 %} + {% for member in g.project.members | sort(attribute='name') if member.activated or balance[member.id]|round(2) != 0 %} <tr id="bal-member-{{ member.id }}" action={% if member.activated %}delete{% else %}reactivate{% endif %}> <td class="balance-name">{{ member.name }}</td> - <td class="balance-value {% if balance[member.id] > 0 %}positive{% elif balance[member.id] < 0 %}negative{% endif %}"> - {% if balance[member.id] > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} + <td class="balance-value {% if balance[member.id]|round(2) > 0 %}positive{% elif balance[member.id]|round(2) < 0 %}negative{% endif %}"> + {% if balance[member.id]|round(2) > 0 %}+{% endif %}{{ "%.2f" | format(balance[member.id]) }} </td> </tr> {% endfor %} |
