Merge branch 'develop'
This commit is contained in:
commit
b102750273
|
@ -318,6 +318,7 @@ class ExpenseReportAdminController extends CrudController
|
|||
->setView('form', 'admin/expense_report/_form.html.twig')
|
||||
->setView('show_entity', 'admin/expense_report/_show.html.twig')
|
||||
->setView('edit', 'admin/expense_report/edit.html.twig')
|
||||
->setView('show', 'admin/expense_report/show.html.twig')
|
||||
|
||||
->setForm('edit', Type::class, [])
|
||||
->setForm('new', Type::class)
|
||||
|
|
|
@ -1,117 +1,123 @@
|
|||
{% set total = 0 %}
|
||||
<div id="form-main">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active">
|
||||
<div class="tab-form p-0">
|
||||
{% if entity.moves|length %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th width="120">Date</th>
|
||||
<th>Évènement</th>
|
||||
<th>Trajet</th>
|
||||
<th width="120" class="text-right">Distance</th>
|
||||
<th width="120">Aller-retour</th>
|
||||
<th width="90" class="text-right">Péage(s)</th>
|
||||
<th width="90" class="text-right">Parkink(s)</th>
|
||||
<th width="90" class="text-right">Montant TTC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% if entity.moves|length %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th width="120">Date</th>
|
||||
<th>Évènement</th>
|
||||
<th>Trajet</th>
|
||||
<th width="120" class="text-right">Distance</th>
|
||||
<th width="120">Aller-retour</th>
|
||||
<th width="90" class="text-right">Péage(s)</th>
|
||||
<th width="90" class="text-right">Parkink(s)</th>
|
||||
<th width="90" class="text-right">Montant TTC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for item in entity.moves %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.date|date('d/m/Y') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.event }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.addressFrom }}<br>
|
||||
{{ item.addressTo }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.distance }}Km
|
||||
</td>
|
||||
<td>
|
||||
{{ item.isRoundTrip ? 'oui' : 'non' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.highwayPay > 0 ? (item.highwayPay|number_format(2, ',') ~ '€') : '-' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.parkingPay > 0 ? (item.parkingPay|number_format(2, ',') ~ '€') : '-' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ entity.totalAmount('move', item)|number_format(2, ',') }}€
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if entity.moves|length %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th width="120">Date</th>
|
||||
<th>Libellé</th>
|
||||
<th width="90" class="text-right">Montant TTC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for item in entity.variousPayments %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.date|date('d/m/Y') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.label }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ entity.totalAmount('various_payment', item)|number_format(2, ',') }}€
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>
|
||||
Facture(s)
|
||||
</td>
|
||||
<td class="text-right"><span class="font-weight-bold mr-3">Total</span> {{ entity.totalAmount|number_format(2, ',') }}€</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{% for item in entity.bills %}
|
||||
<div class="mb-1">
|
||||
<a class="btn btn-light border" href="{{ asset(item) }}" target="_blank">{{ item|split('/')|last }}</a>
|
||||
{% for item in entity.moves %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.date|date('d/m/Y') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.event }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.addressFrom }}<br>
|
||||
{{ item.addressTo }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.distance }}Km
|
||||
</td>
|
||||
<td>
|
||||
{{ item.isRoundTrip ? 'oui' : 'non' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.highwayPay > 0 ? (item.highwayPay|number_format(2, ',') ~ '€') : '-' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ item.parkingPay > 0 ? (item.parkingPay|number_format(2, ',') ~ '€') : '-' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ entity.totalAmount('move', item)|number_format(2, ',') }}€
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
-
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td width="250" class="text-right">
|
||||
Barème au kilomètre : {{ entity.scalePerKilometer|number_format(2, ',') }}
|
||||
<br>
|
||||
<br>
|
||||
|
||||
{% if entity.isPaid %}
|
||||
{% if entity.paidAt %}
|
||||
<span class="btn btn-success">Payée le {{ entity.paidAt|date('d/m/Y à H:i') }}</span>
|
||||
{% else %}
|
||||
<span class="btn btn-success">Payée</span>
|
||||
{% endif %}
|
||||
{% elseif entity.isRequestedPayment %}
|
||||
<span class="btn btn-warning">En attente de paiement</span>
|
||||
{% else %}
|
||||
<span class="btn btn-light">Brouillon</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% if entity.moves|length %}
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th width="120">Date</th>
|
||||
<th>Libellé</th>
|
||||
<th width="90" class="text-right">Montant TTC</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{% for item in entity.variousPayments %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.date|date('d/m/Y') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.label }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ entity.totalAmount('various_payment', item)|number_format(2, ',') }}€
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table mb-0">
|
||||
<tr>
|
||||
<td>
|
||||
Facture(s)
|
||||
</td>
|
||||
<td class="text-right"><span class="font-weight-bold mr-3">Total</span> {{ entity.totalAmount|number_format(2, ',') }}€</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{% for item in entity.bills %}
|
||||
<div class="mb-1">
|
||||
<a class="btn btn-light border" href="{{ asset(item) }}" target="_blank">{{ item|split('/')|last }}</a>
|
||||
</div>
|
||||
{% else %}
|
||||
-
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td width="250" class="text-right">
|
||||
Barème au kilomètre : {{ entity.scalePerKilometer|number_format(2, ',') }}
|
||||
<br>
|
||||
<br>
|
||||
|
||||
{% if entity.isPaid %}
|
||||
{% if entity.paidAt %}
|
||||
<span class="btn btn-success">Payée le {{ entity.paidAt|date('d/m/Y à H:i') }}</span>
|
||||
{% else %}
|
||||
<span class="btn btn-success">Payée</span>
|
||||
{% endif %}
|
||||
{% elseif entity.isRequestedPayment %}
|
||||
<span class="btn btn-warning">En attente de paiement</span>
|
||||
{% else %}
|
||||
<span class="btn btn-light">Brouillon</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
3
templates/admin/expense_report/show.html.twig
Normal file
3
templates/admin/expense_report/show.html.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% extends '@Core/admin/crud/show.html.twig' %}
|
||||
|
||||
{% block body_class %}has-form{% endblock %}
|
Loading…
Reference in a new issue