Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 54 additions & 82 deletions View/ReportServicioAT.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -120,40 +120,6 @@
{% include includeView['path'] %}
{% endfor %}

{# Gráficos por mes y por año #}
<div class="row">
<div class="col-12 col-lg-8 mb-4">
<div class="card shadow-sm">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">
<i class="fa-solid fa-chart-bar me-2"></i>
{{ trans('services-by-month') }}
</h6>
</div>
<div class="card-body">
<div style="position:relative;height:300px;">
<canvas id="chartByMonth"></canvas>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-4 mb-4">
<div class="card shadow-sm">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">
<i class="fa-solid fa-chart-bar me-2"></i>
{{ trans('services-by-year') }}
</h6>
</div>
<div class="card-body">
<div style="position:relative;height:300px;">
<canvas id="chartByYear"></canvas>
</div>
</div>
</div>
</div>
</div>

{# Importes por mes y por año #}
<div class="row">
<div class="col-12 col-lg-8 mb-4">
Expand Down Expand Up @@ -198,54 +164,60 @@

{# Tabla por estado #}
<div class="row">
<div class="col-12 mb-4">
<div class="card shadow-sm">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">
<i class="fa-solid fa-chart-pie me-2"></i>
{{ trans('services-by-status') }}
</h6>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead class="table-light">
<tr>
<th>{{ trans('status') }}</th>
<th class="text-end">{{ trans('quantity') }}</th>
<th class="text-end">{{ trans('net') }}</th>
</tr>
</thead>
<tbody>
{% for row in fsc.servicesByStatus %}
<tr>
<td>
<a href="{{ row.editable ? 'ListServicioAT' : 'ListServicioAT?activetab=ListServicioAT-closed' }}">
{% if row.color %}
<span class="d-inline-block me-2 rounded" style="width:14px;height:14px;background-color:{{ row.color }};vertical-align:middle;"></span>
{% else %}
<span class="d-inline-block me-2 rounded bg-secondary" style="width:14px;height:14px;vertical-align:middle;"></span>
{% endif %}
{{ row.nombre }}
</a>
</td>
<td class="text-end fw-bold">{{ row.total }}</td>
<td class="text-end">{{ money(row.neto) }}</td>
</tr>
{% else %}
<tr>
<td colspan="3" class="text-center text-muted py-3">
{{ trans('no-data') }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 mb-4">
<div class="card shadow-sm">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">
<i class="fa-solid fa-chart-pie me-2"></i>
{{ trans('services-by-status') }}
</h6>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead class="table-light">
<tr>
<th>{{ trans('status') }}</th>
<th class="text-end">{{ trans('quantity') }}</th>
<th class="text-end">{{ trans('percentage') }} %</th>
<th class="text-end">{{ trans('net') }}</th>
</tr>
</thead>
<tbody>
{% for row in fsc.servicesByStatus %}
<tr>
<td>
<a href="{{ row.editable ? 'ListServicioAT' : 'ListServicioAT?activetab=ListServicioAT-closed' }}">
{% if row.color %}
<span class="d-inline-block me-2 rounded"
style="width:14px;height:14px;background-color:{{ row.color }};vertical-align:middle;"></span>
{% else %}
<span class="d-inline-block me-2 rounded bg-secondary"
style="width:14px;height:14px;vertical-align:middle;"></span>
{% endif %}
{{ row.nombre }}
</a>
</td>
<td class="text-end fw-bold">{{ row.total }}</td>
<td class="text-end text-muted">
{{ fsc.totalServices > 0 ? ((row.total / fsc.totalServices) * 100)|number_format(1) ~ ' %' : '0 %' }}
</td>
<td class="text-end">{{ money(row.neto) }}</td>
</tr>
{% else %}
<tr>
<td colspan="4" class="text-center text-muted py-3">
{{ trans('no-data') }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

{% for includeView in getIncludeViews('ReportServicioAT', 'afterStatus') %}
{% include includeView['path'] %}
Expand Down