This commit is contained in:
2024-12-26 17:45:58 +01:00
parent 9a2e4755e1
commit 4b798fd1f9
39 changed files with 1445 additions and 71 deletions

View File

@ -0,0 +1,40 @@
{% extends 'base.html.twig' %}
{% block title %} = {{title}}{% endblock %}
{% block body %}
<h1>{{title}}</h1>
{{ form_start(form) }}
{{ form_widget(form.submit) }}
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
{%if mode=="update" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
{% include('include/error.html.twig') %}
<div class="row">
<div class="col-md-6 mx-auto">
<div class="card mt-3">
<div class="card-header">Information</div>
<div class="card-body">
{{ form_row(form.date) }}
{{ form_row(form.title) }}
{{ form.debit is defined ? form_row(form.debit):"" }}
{{ form.credit is defined ? form_row(form.credit):"" }}
{{ form_row(form.montant) }}
</div>
</div>
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$("#operation_title").focus();
});
</script>
{% endblock %}

View File

@ -0,0 +1,48 @@
{% extends 'base.html.twig' %}
{% block title %} = {{title}}{% endblock %}
{% block body %}
<h1>{{title}}</h1>
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="70px" class="no-sort">Action</th>
<th width="70px" class="no-sort">Date</th>
<th>Titre</th>
<th>Débit</th>
<th>Crédit</th>
<th width="150px">Montant</th>
</tr>
</thead>
<tbody>
{% for operation in operations %}
<tr>
<td><a href="{{ path(routeupdate,{id:operation.id}) }}"><i class="fas fa-file fa-2x"></i></a></td>
<td>{{operation.date|date("d/m/y")}}</td>
<td>{{operation.title}}</td>
<td>{{operation.debit.num01}}-{{operation.debit.num02}} = {{operation.debit.title}}</td>
<td>{{operation.credit.num01}}-{{operation.credit.num02}} = {{operation.credit.title}}</td>
<td>{{operation.montant}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
{% block localscript %}
<script>
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 1, "asc" ]]
});
});
</script>
{% endblock %}