set template

This commit is contained in:
2020-10-12 14:50:30 +02:00
parent 1691620986
commit e5863fdd0a

View File

@@ -0,0 +1,74 @@
{% extends "base.html.twig" %}
{% block localstyle %}
td {
padding:5px !important;
}
{% if fgprint is defined and fgprint %}
table { font-size:10px;}
th,td {
border: 1px solid #37474F;
}
thead {
display: table-header-group;
}
tr { page-break-inside: avoid; }
{%endif%}
{% endblock %}
{% block body %}
<h1 class="page-header">
Nouvelles Commandes Dolibarr
</h1>
<p></p>
<div class="card">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover small" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="70px" class="no-sort no-print">Action</th>
<th width="300px">client</th>
<th width="150px">ref</th>
<th width="150px">ref_client</th>
<th width="50">statut</th>
<th width="100px" class="text-center no-sort no-string">total_ht</th>
<th width="100px" class="text-center no-sort no-string">total_tva</th>
<th width="100px" class="text-center no-sort no-string">total_ttc</th>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td class="no-print">
<a href="{{path("app_offer_convert", {type:order.type, id:order.id})}}"><i class="fas fa-file-download"></i></a>
</td>
<td>{{order.customer_name}}</td>
{% if order.type =="commande" %}<td><a href="https://doli.cadoles.com/dolibarr/commande/card.php?id={{order.id}}" target="_blank">{{order.ref}}</td>{% endif %}
{% if order.type =="propal" %}<td><a href="https://doli.cadoles.com/dolibarr/comm/propal/card.php?id={{order.id}}" target="_blank">{{order.ref}}</td>{% endif %}
<td>{{order.ref_client}}</td>
<td>{{order.statut}}</td>
<td class="text-right">{{order.total_ht|number_format(2, '.', ' ')}}</td>
<td class="text-right">{{order.total_tva|number_format(2, '.', ' ')}}</td>
<td class="text-right">{{order.total_ttc|number_format(2, '.', ' ')}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 2, "asc" ]]
});
});
{% endblock %}