Fix billable mapping (0=billable, 1=non-billable, 2=unproductive)
Some checks failed
Frontend / Frontend verification (push) Has been cancelled
Lint PHP / Linting (8.2) (push) Has been cancelled
Check .lock files / Verify lock file integrity (push) Has been cancelled
Release Drafter / Verify repository (push) Has been cancelled
Release Drafter / Draft next release (push) Has been cancelled
Tests / Integration (8.2) (push) Has been cancelled
Tests / Integration (8.3) (push) Has been cancelled
Tests / Integration (8.4) (push) Has been cancelled
Tests / Integration (8.5) (push) Has been cancelled
Actions Security Analysis / Scan workflows (push) Has been cancelled
Some checks failed
Frontend / Frontend verification (push) Has been cancelled
Lint PHP / Linting (8.2) (push) Has been cancelled
Check .lock files / Verify lock file integrity (push) Has been cancelled
Release Drafter / Verify repository (push) Has been cancelled
Release Drafter / Draft next release (push) Has been cancelled
Tests / Integration (8.2) (push) Has been cancelled
Tests / Integration (8.3) (push) Has been cancelled
Tests / Integration (8.4) (push) Has been cancelled
Tests / Integration (8.5) (push) Has been cancelled
Actions Security Analysis / Scan workflows (push) Has been cancelled
- Swapped billable/non-billable SQL values to match migrated data - All 3 pivot tables always render (empty ones show 'No data') - Added grand total row to pivot tables - Initialize unprodRows/userColumnsUP to prevent undefined var error
This commit is contained in:
@@ -65,7 +65,6 @@
|
||||
</table>
|
||||
|
||||
{% macro pivot(rows, cols, title) %}
|
||||
{% if rows is not empty %}
|
||||
<h4 class="mt-4">{{ title }}</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-sm" style="font-size:11px">
|
||||
@@ -75,6 +74,9 @@
|
||||
<th class="text-end">TOTAL</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
{% if rows is empty %}
|
||||
<tr><td colspan="{{ cols|length + 3 }}" class="text-center text-muted">No data for this period</td></tr>
|
||||
{% else %}
|
||||
{% for pr in rows %}
|
||||
<tr>
|
||||
<td>{{ pr.company }}</td>
|
||||
@@ -85,9 +87,19 @@
|
||||
<td class="text-end"><strong>{{ pr.total|number_format(1) }}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="table-active fw-bold">
|
||||
<td colspan="2">TOTAL</td>
|
||||
{% set gt = 0 %}
|
||||
{% for uc in cols %}
|
||||
{% set ct = 0 %}{% for pr in rows %}{% set ct = ct + pr.users[uc]|default(0) %}{% endfor %}
|
||||
<td class="text-end"><strong>{{ ct > 0 ? ct|number_format(1) }}</strong></td>
|
||||
{% set gt = gt + ct %}
|
||||
{% endfor %}
|
||||
<td class="text-end"><strong>{{ gt|number_format(1) }}</strong></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table></div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% import _self as self %}
|
||||
|
||||
Reference in New Issue
Block a user