templates/GestionComerciale/Commande/detail_datatable.html.twig line 1

Open in your IDE?
  1. <style>
  2.     .table_detail_document_vente tbody tr {
  3.         background-color: white !important;
  4.     }
  5.     .table_detail_document_vente tbody tr:nth-of-type(2n+1) {
  6.         background-color: white !important;
  7.     }
  8.     .detail_commande thead th {
  9.         background-color: #2A3F54 !important;
  10.         color:white;
  11.     }
  12.     .detail_commande tbody tr {
  13.         background-color: #f8f8f8 !important;
  14.     }
  15.     .detail_commande tbody tr:nth-of-type(2n+1) {
  16.         background-color: white !important;
  17.     }
  18.     .detail_commande thead th,.detail_commande thead td {
  19.         border-color:transparent;
  20.     }
  21.     #tableau-panier tbody tr {
  22.         background-color: rgba(0,0,0,.05);
  23.         background-color: #f5f5f5;
  24.     }
  25.     #tableau-panier tbody tr:nth-of-type(2n+1) {
  26.         background-color: rgba(0,0,0,.05);
  27.         background-color: white;
  28.     }
  29. </style>
  30. <div style="max-height:600px;overflow-y:auto;border-bottom:2px solid black;">
  31.     {% if commande.origine == "ERP" or commande.origineSaisie == "MODIFIE_ERP" %}
  32.     <embed src="{{ path('dtc_commande_pdf', {id: commande.id}) }}" type="application/pdf" width="100%" height="800px">
  33.     {% else %}
  34.         <table id="tableau-panier" class="table table-hover mb-0 _table-striped table-bordered _table-hover">
  35.             <thead class="thead">
  36.             <tr>
  37.                 <th style="background:#e2e2e2;vertical-align:middle;width:17%;padding-left:15px;padding-right:15px;">Image</th>
  38.                 <th style="background:#e2e2e2;padding-right:5px;line-height:20px;">Produit</th>
  39.             </tr>
  40.             </thead>
  41.             <tbody>
  42.             {% for p in commande.articleCommande %}
  43.                 {% include 'GestionComerciale/Panier/ligne_deplier.html.twig' with( {'p': p} )%}
  44.             {% endfor %}
  45.             </tbody>
  46.         </table>
  47.         <style>
  48.             @media (max-width: 768px) {
  49.                 .table_detail_document_vente td {
  50.                     width : 100%;
  51.                     display: block;
  52.                     width: 100%;
  53.                 }
  54.             }
  55.         </style>
  56.         <table style="width:100%;margin-bottom:10px;border:0px;background:white;" class="_table table_detail_document_vente">
  57.             <tr style="background-color:transparent;border:0px;padding:10px;">
  58.                 {% if commande.origine != "ERP" and commande.origineSaisie != "MODIFIE_ERP" %}
  59.                     <td style="border:0px;">
  60.                         <div><u>Adresse de livraison</u></div>
  61.                         <div><b>{{ commande.libelleLivraison }}</b></div>
  62.                         <div>{{ commande.numeroLivraison }} {{ commande.rueLivraison }}</div>
  63.                         <div>{{ commande.complementLivraison }}</div>
  64.                         <div>{{ commande.complementLivraison2 }}</div>
  65.                         <div>{{ commande.codePostalLivraisonTxt }} {{ commande.villeLivraisonTxt }}</div>
  66.                         <div>{{ commande.paysLivraisonTxt }}</div>
  67.                     </td>
  68.                     <td style="border:0px;">
  69.                         <div><u>Récapitulatif</u></div>
  70.                         {% set totalTva = commande.totalTva+commande.TotalTvaFraisPort %}
  71.                         <div>Transporteur : {{ commande.transporteur.libelle }} ({{ commande.totalFraisPort|price|raw }} &euro; HT)</div>
  72.                         <div>TOTAL HT : {{ commande.total|price|raw }} &euro;</div>
  73.                         <div>TVA HT : {{ totalTva|price|raw }} &euro;</div>
  74.                         <div>TOTAL TTC : {{ commande.totalTtc|price|raw }} &euro;</div>
  75.                     </td>
  76.                 {% endif %}
  77.                 {% if commande.typeDocumentCommercial ==1 %}
  78.                     <td style="border:0px;">
  79.                         <ul class="to_do dark">
  80.                             <li style="padding-top:1px;padding-bottom:1px;padding-left:0px;padding-right:0px;">
  81.                         <span style="cursor:pointer;padding-top:0px;padding-bottom:0px;" class="open-modal-form dropdown-item" data-link="{{ path ("dtc_devis_transformer_panier", {"id":commande.id,"action":"commander"} ) }}"  data-taille="modal-lg" data-target="#blocModal" data-toggle="modal">
  82.                             <i class="fa fa-shopping-cart"></i> Commander
  83.                         </span>
  84.                             </li>
  85.                             <li style="padding-top:1px;padding-bottom:1px;padding-left:0px;padding-right:0px;">
  86.                         <span style="cursor:pointer;padding-top:0px;padding-bottom:0px;" class="open-modal-form dropdown-item" data-link="{{ path ("dtc_devis_transformer_panier", {"id":commande.id,"action":"editer"} ) }}"  data-taille="modal-lg" data-target="#blocModal" data-toggle="modal">
  87.                         <i class="fa fa-edit"></i> Ã‰diter
  88.                     </span>
  89.                             </li>
  90.                             <li style="padding-top:1px;padding-bottom:1px;padding-left:0px;padding-right:0px;">
  91.                     <span style="cursor:pointer;padding-top:0px;padding-bottom:0px;" class="dropdown-item">
  92.                         <i class="fa fa-envelope"></i> Recevoir devis par email
  93.                     </span>
  94.                             </li>
  95.                             <li style="padding-top:1px;padding-bottom:1px;padding-left:0px;padding-right:0px;">
  96.                     <span data-link="{{ path ("dtc_contact_modal", {"devis":commande.id} ) }}" class="dropdown-item open-modal-form" data-taille="" data-target="#blocModal" data-toggle="modal" style="cursor:pointer;padding-top:0px;padding-bottom:0px;">
  97.                         <i class="fa fa-question"></i> Demande d'informations
  98.                     </span>
  99.                             </li>
  100.                         </ul>
  101.                     </td>
  102.                 {% endif %}
  103.             </tr>
  104.         </table>
  105.         <table style="width:100%;margin-bottom:0px;" class="off detail_commande table  table-bordered ">
  106.             {% if 1 == 1 %}
  107.             <thead>
  108.             <tr>
  109.                 <th class="{% if mode != "simplifie" %}off{% endif %}">{% trans %}Img{% endtrans %}</th>
  110.                 <th style="padding-left:20px;">{% trans %}REF{% endtrans %}</th>
  111.                 <th>{% trans %}DESIGNATION{% endtrans %}</th>
  112.                 <th class="{% if mode == "simplifie" %}off{% endif %}">{% trans %}PU&nbsp;HT{% endtrans %}</th>
  113.                 <th class="{% if mode == "simplifie" %}off{% endif %}">{% trans %}TX&nbsp;REMISE{% endtrans %}</th>
  114.                 <th class="{% if mode == "simplifie" %}off{% endif %}">{% trans %}PU&nbsp;TTC{% endtrans %}</th>
  115.                 <th>{% trans %}QTE{% endtrans %}</th>
  116.                 <th class="{% if mode == "simplifie" %}off{% endif %}">{% trans %}TOTAL&nbsp;HT{% endtrans %}</th>
  117.                 <th class="{% if mode == "simplifie" %}off{% endif %}">{% trans %}TOTAL&nbsp;TTC{% endtrans %}</th>
  118.             </tr>
  119.             </thead>
  120.             <tbody>
  121.             {% set colspan = 7 %}
  122.             {% for a in commande.articleCommande %}
  123.                 {% if a.article.estCommentaire %}
  124.                     <tr>
  125.                         <td style="padding-left:20px;" colspan="{{ colspan }}">
  126.                             <b>{{ a.commentaireSuppl }}</b>
  127.                         </td>
  128.                     </tr>
  129.                 {% else %}
  130.                     {% if commande.typeDocumentCommercial == constant('App\\Model\\GestionCommerciale\\TypeDocumentCommercial::DEVIS') %}
  131.                         {% set qteDejaLivree = 0 %}
  132.                     {% else %}
  133.                         {% set qteDejaLivree = dtc_article.qteDejaLivree2(a) %}
  134.                     {% endif %}
  135.                     <tr class="{% if a.quantite == qteDejaLivree and commande.typeDocumentCommercial != 1 %}ligne_livre_totalement{% endif %}">
  136.                         {% if a.quantite != 0 %}
  137.                             {% set prixFinal = a.totalHtV2 / a.quantite %}
  138.                             {% set prixFinal = a.prixBase %}
  139.                         {% else %}
  140.                             {% set prixFinal = a.totalHtV2 %}
  141.                             {% set prixFinal = a.prixBase %}
  142.                         {% endif %}
  143.                         {% set prixFinalTtc = prixFinal + (prixFinal * a.tva / 100) %}
  144.                         {% set totalHtFinal = (a.totalHtV2) %}
  145.                         {% set totalTtcFinal = a.totalHtV2 + a.tvaVente %}
  146.                         {% if a.prixUnitaireTtc != '' %}
  147.                             {% set prixFinalTtc = a.prixUnitaireTtc %}
  148.                         {% endif %}
  149.                         {% if a.totalWithTax != '' %}
  150.                             {% set totalTtcFinal = a.totalWithTax %}
  151.                         {% endif %}
  152.                         <td class="text-center {% if mode != "simplifie" %}off{% endif %}">
  153.                             {% set break_image = false %}
  154.                             {% set image_trouve = false %}
  155.                             {% if a.article.images|length > 0 %}
  156.                                 {% for img in a.article.images %}
  157.                                     {% if not break_image %}
  158.                                         {% set chemin_test = kernelRootDir~"/public/"~img.getUploadDir ~ '/' ~ a.article.id ~ '/small/' ~ img.url %}
  159.                                         {% if chemin_test|file_exists == 1 %}
  160.                                             {% set break_image = true %}
  161.                                             {% set image_trouve = true %}
  162.                                             <a data-gallery="" href="{{ asset(img.getUploadDir ~ '/' ~ a.article.id ~ '/large/' ~ img.url) }}">
  163.                                                 <img src="{{ asset(img.getUploadDir ~ '/' ~ a.article.id ~ '/medium/' ~ img.url) }}" style="max-width:50px;">
  164.                                             </a>
  165.                                         {% endif %}
  166.                                     {% endif %}
  167.                                 {% endfor %}
  168.                             {% endif %}
  169.                             {% if  a.article.images|length == 0 or image_trouve == false %}
  170.                                 <span style="font-size:3em;max-width: 50px;display: inline-flex;  align-items: center;" class="fa fa-photo"></span>
  171.                             {% endif %}
  172.                         </td>
  173.                         {% set slug = dtc_article.getslugifArticle(a.article) %}
  174.                         <td style="padding-left:20px;">
  175.                             <a class="dark" href="{{ path("dtc_article_afficher" , { 'id': a.article.id,'slug':slug }) }}">
  176.                                 {% if a.article.divers == 1 %}
  177.                                     <b>{{ a.article.referenceClient }}</b>
  178.                                 {% else %}
  179.                                     <b>{{ a.article.reference }}</b>
  180.                                 {% endif %}
  181.                             </a>
  182.                         </td>
  183.                         <td>
  184.                             <a class="dark" href="{{ path("dtc_article_afficher" , { 'id': a.article.id,'slug':slug }) }}">
  185.                                 {{ a.libelle }}
  186.                             </a>
  187.                         </td>
  188.                         <td class="text-right prix {% if mode == "simplifie" %}off{% endif %}">{{ prixFinal|price|raw }}&nbsp;&euro;</td>
  189.                         <td class="text-right prix {% if mode == "simplifie" %}off{% endif %}">{{ a.remise|price|raw }}&nbsp;%</td>
  190.                         <td class="text-right prix {% if mode == "simplifie" %}off{% endif %}">{{ prixFinalTtc|price|raw }}&nbsp;&euro;</td>
  191.                         <td style="text-align:center;">{{ a.quantite }} </td>
  192.                         <td class="text-right prix {% if mode == "simplifie" %}off{% endif %}">{{ totalHtFinal|price|raw }}&nbsp;&euro;</td>
  193.                         <td class="text-right prix {% if mode == "simplifie" %}off{% endif %}">{{ totalTtcFinal|price|raw }}&nbsp;&euro;</td>
  194.                     </tr>
  195.                 {% endif %}
  196.             {% endfor %}
  197.             {% if commande.totalFraisPort != 0 and mode != "simplifie" %}
  198.                 <tr style="{% if mode == "simplifie" %}off{% endif %}">
  199.                     <td style="padding-left:20px;">{% if commande.transporteur.libelle is defined %}{{ commande.transporteur.libelle }}{% else %}Transporteur{% endif %}</td>
  200.                     <td></td>
  201.                     <td class="prix text-right">{{ commande.totalFraisPort|price|raw }}&nbsp;&euro;</td>
  202.                     <td></td>
  203.                     <td class="prix text-right">{{ commande.TotalFraisPortTtc|price|raw }}&nbsp;&euro;</td>
  204.                     <td></td>
  205.                     <td></td>
  206.                     <td class="prix text-right">{{ commande.TotalFraisPortTtc|price|raw }}&nbsp;&euro;</td>
  207.                 </tr>
  208.             {% endif %}
  209.             {% if commande.fraisPortSupplementaire != 0 and mode != "simplifie" %}
  210.                 <tr class="{% if mode == "simplifie" %}off{% endif %}">
  211.                     <td style="padding-left:20px;">Frais de port suppl.</td>
  212.                     <td></td>
  213.                     <td></td>
  214.                     <td></td>
  215.                     <td class="prix">{{ commande.fraisPortSupplementaire|price|raw }}</td>
  216.                     <td></td>
  217.                     <td></td>
  218.                     <td class="prix">{{ commande.fraisPortSupplementaire|price|raw }}</td>
  219.                 </tr>
  220.             {% endif %}
  221.             {% endif %}
  222.             </tbody>
  223.         </table>
  224.     {% endif %}
  225. </div>