Skip to content

Commit 39d5184

Browse files
committed
fix - use spacecomma filter for large amounts
1 parent 2d4e381 commit 39d5184

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

cesnet_service_path_plugin/templates/cesnet_service_path_plugin/contractinfo.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% extends 'generic/object.html' %}
22
{% load helpers %}
33
{% load plugins %}
4+
{% load custom_filters %}
45
{% load render_table from django_tables2 %}
56

67
{% block content %}
@@ -54,7 +55,7 @@ <h5 class="card-header">Financial Information</h5>
5455
</tr>
5556
<tr>
5657
<th scope="row">Recurring Charge</th>
57-
<td class="text-end">{{ object.charge_currency }} {{ object.recurring_charge|floatformat:2 }}</td>
58+
<td class="text-end">{{ object.charge_currency }} {{ object.recurring_charge|floatformat:2|spacecomma }}</td>
5859
</tr>
5960
<tr>
6061
<th scope="row">Recurring Period</th>
@@ -70,23 +71,23 @@ <h5 class="card-header">Financial Information</h5>
7071
</tr>
7172
<tr>
7273
<th scope="row">Total Recurring Cost</th>
73-
<td class="text-end"><strong>{{ object.charge_currency }} {{ object.total_recurring_cost|floatformat:2 }}</strong></td>
74+
<td class="text-end"><strong>{{ object.charge_currency }} {{ object.total_recurring_cost|floatformat:2|spacecomma }}</strong></td>
7475
</tr>
7576
{% if object.non_recurring_charge %}
7677
<tr>
7778
<th scope="row">Non-Recurring Charge</th>
78-
<td class="text-end">{{ object.charge_currency }} {{ object.non_recurring_charge|floatformat:2 }}</td>
79+
<td class="text-end">{{ object.charge_currency }} {{ object.non_recurring_charge|floatformat:2|spacecomma }}</td>
7980
</tr>
8081
{% endif %}
8182
{% if object.total_cumulative_non_recurring %}
8283
<tr>
8384
<th scope="row">Cumulative Non-Recurring</th>
84-
<td class="text-end"><em>{{ object.charge_currency }} {{ object.total_cumulative_non_recurring|floatformat:2 }}</em></td>
85+
<td class="text-end"><em>{{ object.charge_currency }} {{ object.total_cumulative_non_recurring|floatformat:2|spacecomma }}</em></td>
8586
</tr>
8687
{% endif %}
8788
<tr class="table-active">
8889
<th scope="row">Total Contract Value</th>
89-
<td class="text-end"><strong>{{ object.charge_currency }} {{ object.total_contract_value|floatformat:2 }}</strong></td>
90+
<td class="text-end"><strong>{{ object.charge_currency }} {{ object.total_contract_value|floatformat:2|spacecomma }}</strong></td>
9091
</tr>
9192
</table>
9293
</div>

cesnet_service_path_plugin/templates/cesnet_service_path_plugin/segment.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ <h5 class="card-header">
242242
<tr>
243243
<th scope="row">Recurring Charge</th>
244244
<td class="text-end">
245-
<strong>{{ contract_info.charge_currency }} {{ contract_info.recurring_charge|floatformat:2 }}</strong>
245+
<strong>{{ contract_info.charge_currency }} {{ contract_info.recurring_charge|floatformat:2|spacecomma }}</strong>
246246
</td>
247247
</tr>
248248
<tr>
@@ -256,19 +256,19 @@ <h5 class="card-header">
256256
<tr>
257257
<th scope="row">Total Recurring Cost</th>
258258
<td class="text-end">
259-
<strong>{{ contract_info.charge_currency }} {{ contract_info.total_recurring_cost|floatformat:2 }}</strong>
259+
<strong>{{ contract_info.charge_currency }} {{ contract_info.total_recurring_cost|floatformat:2|spacecomma }}</strong>
260260
</td>
261261
</tr>
262262
{% if contract_info.non_recurring_charge %}
263263
<tr>
264264
<th scope="row">Non-Recurring Charge</th>
265-
<td class="text-end">{{ contract_info.charge_currency }} {{ contract_info.non_recurring_charge|floatformat:2 }}</td>
265+
<td class="text-end">{{ contract_info.charge_currency }} {{ contract_info.non_recurring_charge|floatformat:2|spacecomma }}</td>
266266
</tr>
267267
{% endif %}
268268
<tr class="table-active">
269269
<th scope="row">Total Contract Value</th>
270270
<td class="text-end">
271-
<strong>{{ contract_info.charge_currency }} {{ contract_info.total_contract_value|floatformat:2 }}</strong>
271+
<strong>{{ contract_info.charge_currency }} {{ contract_info.total_contract_value|floatformat:2|spacecomma }}</strong>
272272
</td>
273273
</tr>
274274
<tr>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cesnet_service_path_plugin"
7-
version = "5.4.0b2"
7+
version = "5.4.0b3"
88
description = "Adds ability to create, edit and view service paths in the network."
99
authors = [
1010
{name = "Jan Krupa", email = "jan.krupa@cesnet.cz"},

0 commit comments

Comments
 (0)