Skip to content

Commit

Permalink
updated grand totals
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis Rusenas committed Aug 18, 2015
1 parent e495839 commit 366878a
Showing 1 changed file with 36 additions and 15 deletions.
51 changes: 36 additions & 15 deletions templates/salesforce.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,47 @@ <h3 class="box-title"> {{ data["group_billability"]["title"] }}</h3>
</thead>
<tbody>
{% for name, values in data["group_billability"]["body"].items() %}
<tr>
<td>
{{ name }}
</td>
{% for code, aggregates in sorted(values.items()) %}
<td> {% for i, dict in enumerate(aggregates) %}
{% if dict is not None %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title='{{ data["group_billability"]["meta"]["column_info"][i] }}'>{{ dict["label"] }}</a>
<br>
{% end %}
{% if name != "Grand Total" %}
<tr>
<td>
{{ name }}
</td>
{% for code, aggregates in sorted(values.items()) %}
<td> {% for i, dict in enumerate(aggregates) %}
{% if dict is not None %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title='{{ data["group_billability"]["meta"]["column_info"][i] }}'>{{ dict["label"] }}</a>
<br>
{% end %}

{% end %}
</td>
{% end %}
</td>

</tr>
{% end %}
{% end %}
</tbody>
<tfoot>
<tr>
<th>
Grand Total
</th>
{% for code, aggregates in sorted(data["group_billability"]["body"]["Grand Total"].items()) %}
<th> {% for i, dict in enumerate(aggregates) %}
{% if dict is not None %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title='{{ data["group_billability"]["meta"]["column_info"][i] }}'>{{ dict["label"] }}</a>
<br>
{% end %}

{% end %}
</th>
{% end %}

</tr>
{% end %}

</tbody>
</tfoot>
</table>
</div>
{% else %}
Expand Down Expand Up @@ -231,7 +252,7 @@ <h3 class="box-title">Report not available</h3>

$(function () {
$('#billability').dataTable({
"bPaginate": true,
"bPaginate": false,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
Expand Down

0 comments on commit 366878a

Please sign in to comment.