Skip to content

Commit

Permalink
Highlight sub/grand totals to distinguish costs sum #1350
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Apr 3, 2021
1 parent 9ff735c commit 8c873c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions dsmr_frontend/static/dsmr_frontend/css/dsmr-reader/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
border-top: 1px solid #eee;
}

.table tr.highlight {
background-color: #F8F8F8;
}

.fa-rotate-45 {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
Expand Down
4 changes: 2 additions & 2 deletions dsmr_frontend/templates/dsmr_frontend/energy-contracts.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{% endif %}

{# Electricity sub totals #}
<tr>
<tr {% if not frontend_settings.merge_electricity_tariffs %}class="highlight"{% endif %}>
<td>
{% if not frontend_settings.merge_electricity_tariffs %}
<strong>{% translate "Total electricity" %}</strong>
Expand Down Expand Up @@ -105,7 +105,7 @@
{% endif %}

{# Grand totals #}
<tr>
<tr class="highlight">
<td style="font-weight: bold;" colspan="3">{% translate "Total costs" %}</td>
<td><span class="badge bg-black">{{ current.summary.total_cost|default:'-' }}</span></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<td><span class="badge bg-black">{{ statistics.fixed_cost|default:'-' }}</span></td>
</tr>
{% endif %}
<tr>
<tr class="highlight">
<td style="font-weight: bold;">{% translate "Total" %}</td>
<td>{% if capabilities.electricity and statistics.electricity_merged %}<span class="badge bg-red">{{ statistics.electricity_merged|default:'-' }} </span>{% endif %}</td>
<td>{% if capabilities.electricity_returned and statistics.electricity_returned_merged %}<span class="badge bg-green">{{ statistics.electricity_returned_merged|default:'-' }}</span>{% endif %}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</tr>
{% endif %}

<tr>
<tr {% if not frontend_settings.merge_electricity_tariffs %}class="highlight"{% endif %}>
<td>
{% if capabilities.electricity %}
{% if not frontend_settings.merge_electricity_tariffs %}
Expand Down Expand Up @@ -75,7 +75,7 @@
{% endif %}

{% if capabilities.costs and data.total_cost %}
<tr>
<tr class="highlight">
<td colspan="3" style="font-weight: bold;">{% translate "Total costs" %}</td>
<td><span class="badge bg-black">{{ data.total_cost|default:'-' }}</span></td>
</tr>
Expand Down

0 comments on commit 8c873c7

Please sign in to comment.