diff options
| author | James Leong <jyleong@users.noreply.github.com> | 2020-02-08 14:17:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-08 23:17:02 +0100 |
| commit | 1f62f18154be9ffab31ce4b8d203bb8e1679e48b (patch) | |
| tree | 19f1c9c5deb8eacd1ed0591a5256f043c70df1bd /ihatemoney | |
| parent | 9aa7e62d0f77f27590dac1cae5603e8f7efb891f (diff) | |
| download | ihatemoney-mirror-1f62f18154be9ffab31ce4b8d203bb8e1679e48b.zip ihatemoney-mirror-1f62f18154be9ffab31ce4b8d203bb8e1679e48b.tar.gz ihatemoney-mirror-1f62f18154be9ffab31ce4b8d203bb8e1679e48b.tar.bz2 | |
Statistics view #323
Remove header and table column of 'Balance' in statistics view
Diffstat (limited to 'ihatemoney')
| -rw-r--r-- | ihatemoney/templates/statistics.html | 7 | ||||
| -rw-r--r-- | ihatemoney/tests/tests.py | 18 |
2 files changed, 9 insertions, 16 deletions
diff --git a/ihatemoney/templates/statistics.html b/ihatemoney/templates/statistics.html index 1b07a33..0cfe1f2 100644 --- a/ihatemoney/templates/statistics.html +++ b/ihatemoney/templates/statistics.html @@ -3,6 +3,10 @@ {% block sidebar %} <div id="table_overflow"> <table class="balance table"> + <tr> + <th></th> + <th class="balance-value">{{ _("Balance") }}</th> + </tr> {% for stat in members_stats| sort(attribute='member.name') %} <tr> <td class="balance-name">{{ stat.member.name }}</td> @@ -18,14 +22,13 @@ {% block content %} <table id="bill_table" class="split_bills table table-striped"> - <thead><tr><th>{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Spent") }}</th><th>{{ _("Balance") }}</th></tr></thead> + <thead><tr><th>{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Spent") }}</th></tr></thead> <tbody> {% for stat in members_stats %} <tr> <td>{{ stat.member.name }}</td> <td>{{ "%0.2f"|format(stat.paid) }}</td> <td>{{ "%0.2f"|format(stat.spent) }}</td> - <td>{{ "%0.2f"|format(stat.balance) }}</td> </tr> {% endfor %} </tbody> diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 876a153..0c99bca 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -933,29 +933,19 @@ class BudgetTestCase(IhatemoneyTestCase): self.assertIn( "<td>alexis</td>\n " + "<td>20.00</td>\n " - + "<td>31.67</td>\n " - + "<td>-11.67</td>\n", + + "<td>31.67</td>\n", response.data.decode("utf-8"), ) self.assertIn( - "<td>fred</td>\n " - + "<td>20.00</td>\n " - + "<td>5.83</td>\n " - + "<td>14.17</td>\n", + "<td>fred</td>\n " + "<td>20.00</td>\n " + "<td>5.83</td>\n", response.data.decode("utf-8"), ) self.assertIn( - "<td>tata</td>\n " - + "<td>0.00</td>\n " - + "<td>2.50</td>\n " - + "<td>-2.50</td>\n", + "<td>tata</td>\n " + "<td>0.00</td>\n " + "<td>2.50</td>\n", response.data.decode("utf-8"), ) self.assertIn( - "<td>toto</td>\n " - + "<td>0.00</td>\n " - + "<td>0.00</td>\n " - + "<td>0.00</td>\n", + "<td>toto</td>\n " + "<td>0.00</td>\n " + "<td>0.00</td>\n", response.data.decode("utf-8"), ) |
