Skip to content

Commit

Permalink
Update invoice dashboard to use "g" suffixed floatformats for thousan…
Browse files Browse the repository at this point in the history
…ds separation
  • Loading branch information
jb3 committed Oct 27, 2024
1 parent f9e5a67 commit 5c34b9d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions RIGS/templates/invoice_dashboard.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends 'base_rigs.html' %}

{% load humanize %}
{% block content %}

<form method="GET" action="{% url 'invoice_dashboard' %}">
Expand Down Expand Up @@ -31,15 +32,15 @@ <h3>Overview</h3>
<a href="{% url 'invoice_waiting' %}" class="text-decoration-none text-white">
<div class="card-body bg-primary">
<h5 class="card-title text-center">Total Waiting</h5>
<p class="card-text text-center h3"><strong>£{{ total_waiting|floatformat:2 }}</strong></p>
<p class="card-text text-center h3"><strong>£{{ total_waiting|floatformat:"2g" }}</strong></p>
</div>
</a>
</div>
<div class="card">
<a href="{% url 'invoice_list' %}" class="text-decoration-none text-dark">
<div class="card-body bg-info">
<h5 class="card-title text-center">Total Outstanding</h5>
<p class="card-text text-center h3"><strong>£{{ total_outstanding|floatformat:2 }}</strong></p>
<p class="card-text text-center h3"><strong>£{{ total_outstanding|floatformat:"2g" }}</strong></p>
</div>
</a>
</div>
Expand Down Expand Up @@ -71,7 +72,7 @@ <h4>Sources</h4>
<div class="card">
<div class="card-body">
<h5 class="card-title"><strong>{{ source.method }}</strong></h5>
<p class="card-text h3">£{{ source.total|floatformat:2 }}</p>
<p class="card-text h3">£{{ source.total|floatformat:"2g" }}</p>
</div>
</div>
{% endfor %}
Expand All @@ -85,7 +86,7 @@ <h4>Total</h4>
<div class="card">
<div class="card-body">
<h5 class="card-title text-center">Total Income</h5>
<p class="card-text text-center h3"><strong>£{{ total_income|floatformat:2 }}</strong></p>
<p class="card-text text-center h3"><strong>£{{ total_income|floatformat:"2g" }}</strong></p>
</div>
</div>

Expand All @@ -98,7 +99,7 @@ <h4>Invoice Payment Time</h4>
<div class="card">
<div class="card-body">
<h5 class="card-title text-center">Average Time to Pay</h5>
<p class="card-text text-center h3"><strong>{{ mean_invoice_to_payment|floatformat:2 }} days</strong></p>
<p class="card-text text-center h3"><strong>{{ mean_invoice_to_payment|floatformat:"2g" }} days</strong></p>
</div>
</div>

Expand Down

0 comments on commit 5c34b9d

Please sign in to comment.