2020-10-12 14:50:30 +02:00
|
|
|
{% 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>
|
|
|
|
|
2020-10-13 10:43:09 +02:00
|
|
|
<p>Liste des dernières commandes/propal récupérées depuis Dolibarr.<br>
|
|
|
|
Les commandes doivent avoir un statut "Validée", et le Propal un statut "Signée" pour apparaître dans la liste.</p>
|
2020-10-12 14:50:30 +02:00
|
|
|
<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 %}
|