templates/GestionComerciale/Panier/ligne_deplier.html.twig line 1

Open in your IDE?
  1. <tr id="article-devis-{{ p.id }}">
  2.     {% set data_image = "" %}
  3.     <td style="text-align:center;vertical-align:top;width:5%;padding-left:5px;padding-right:15px;">
  4.         {% set slug = dtc_article.getslugifArticle(p.article) %}
  5.        <a href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}">
  6.             {% set images = dtc_image_article.getImageDefaut(p.article.id) %}
  7.             {% if images[0] is defined %}
  8.                 {# <img style="text-align:center;width:auto;height:auto;max-height:110px;" src="{{ asset(images[0].getUploadDir ~ '/' ~ p.article.id ~ '/' ~ images[0].url) | imagine_filter('400x300') }}" class="product-img">#}
  9.                 <img style="text-align:center;width:auto;height:auto;max-height:110px;" src="{{ url_image_distant }}/image/400/300/{{ images[0].ulid }}" class="product-img">
  10.                 {% set data_image = asset(images[0].getUploadDir ~ '/' ~ p.article.id ~ '/' ~ images[0].url) | imagine_filter('400x300') %}
  11.             {% else %}
  12.                 <img src="{{ asset('images/defaut-img-product.jpg') }}" class="text-center product-img" style="width:auto;height:auto;max-height:110px;">
  13.                 {% set data_image = asset('images/defaut-img-product.jpg') %}
  14.             {% endif %}
  15.         </a>
  16.         <div class="_visible_mobile" style="display: inline-block; vertical-align: middle;margin-top:5px;">
  17.             QTÉ :
  18.             <input
  19.                     style="background:white; width:80px; display:inline-block; margin:0; vertical-align: middle;"
  20.                     class="text-center form-control"
  21.                     readonly
  22.                     value="{{ p.quantite }}"
  23.             />
  24.         </div>
  25.     </td>
  26.     <td style="padding-right:5px;line-height:22px;">
  27.         <a class="dark" href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}">{{ p.libelle }}</a>
  28.         <div class="product-ref">
  29.             <a href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}">Référence : {{ p.reference }}</a>
  30.         </div>
  31.         {#
  32.         {% if p.reservations is not null and p.getReservationsUnserialize|length > 0 %}
  33.             {% for r in p.getReservationsUnserialize %}
  34.                 {% if "sur commande" in r %}
  35.                     <div class="etat_stock_sur_commande">{{ r }}</div>
  36.                 {% elseif "prévue" in r %}
  37.                     <div class="etat_stock_reappro">{{ r }}</div>
  38.                 {% else %}
  39.                     <div class="etat_stock_en_stock">{{ r }}</div>
  40.                 {% endif %}
  41.             {% endfor %}
  42.         {% endif %}
  43.         #}
  44.         {% if p.article.dispo >= p.quantite %}
  45.             <div class="etat_stock_en_stock" style=""><i class="fa fa-circle etat_stock_en_stock"></i>&nbsp; En stock ({{ p.article.dispo }})</div>
  46.         {% elseif p.article.dispo > 0 %}
  47.             <div class=" green" style="">
  48.                 <i style="color:#1ABB9C;" class="bi-color-vert-jaune fa fa-circle red"></i>&nbsp; Stock
  49.                 <span class="yellow" style="color:#ffc107;">partiel&nbsp;</span>
  50.                 {% set besoin_quantite = p.quantite %}
  51.                 {% set besoin_quantite = besoin_quantite - p.article.dispo %}
  52.                 <div class="etat_stock_en_stock">{{ p.article.dispo }} en stock</div>
  53.                 {% set datesProchainesDispo = dtc_article.getDatesProchainesDispo(p.article.id) %}
  54.                 {{dump(datesProchainesDispo)}}
  55.                 {% if datesProchainesDispo|length > 0 %}
  56.                     {% for d in datesProchainesDispo %}
  57.                         {% if besoin_quantite > 0 %}
  58.                             {% set qte_ligne = d.quantite %}
  59.                             {% if qte_ligne > besoin_quantite %}
  60.                                 {% set qte_ligne = besoin_quantite %}
  61.                             {% endif %}
  62.                             {% set besoin_quantite = besoin_quantite-qte_ligne %}
  63.                             <div class="etat_stock_reappro">{{ qte_ligne }} entrée{% if d.quantite > 1 %}s{% endif %} en stock prévue{% if d.quantite > 1 %}s{% endif %} {% if d.date != "" %}le  {{ d.date|date("d/m/Y") }}{% else %} (date à confirmer){% endif %} </div>
  64.                         {% endif %}
  65.                     {% endfor %}
  66.                 {% endif %}
  67.                 {% if besoin_quantite > 0 %}
  68.                     <div class="etat_stock_sur_commande" >{{ besoin_quantite }}&nbsp;sur commande</div>
  69.                 {% endif %}
  70.             </div>
  71.         {% else %}
  72.             {% set besoin_quantite = p.quantite %}
  73.             {% set datesProchainesDispo = dtc_article.getDatesProchainesDispo(p.article.id) %}
  74.             {% if datesProchainesDispo|length > 0 %}
  75.                 <div class="etat_stock_reappro"><i class="fa fa-circle etat_stock_reappro"></i>&nbsp; En approvisionement :
  76.                     {% for d in datesProchainesDispo %}
  77.                         {% if besoin_quantite > 0 %}
  78.                             {% set qte_ligne = d.quantite %}
  79.                             {% if qte_ligne > besoin_quantite %}
  80.                                 {% set qte_ligne = besoin_quantite %}
  81.                             {% endif %}
  82.                             {% set besoin_quantite = besoin_quantite-qte_ligne %}
  83.                             <div class="etat_stock_reappro">{{ qte_ligne }} entrée{% if d.quantite > 1 %}s{% endif %} en stock prévue{% if d.quantite > 1 %}s{% endif %} {% if d.date != "" %}le  {{ d.date|date("d/m/Y") }}{% else %} (date à confirmer){% endif %} </div>
  84.                         {% endif %}
  85.                     {% endfor %}
  86.                     {% if besoin_quantite > 0 %}
  87.                         <div class="etat_stock_sur_commande">{{ besoin_quantite }}&nbsp;sur commande</div>
  88.                     {% endif %}
  89.                 </div>
  90.             {% else %}
  91.                 <div class="etat_stock_sur_commande"><i class="fa fa-circle etat_stock_sur_commande"></i>&nbsp;Sur commande</div>
  92.             {% endif %}
  93.         {% endif %}
  94.         {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':p.article.id},app.user.client) %}
  95.         {% if remise.remiseId is defined and remise.remiseId > 0 %}
  96.             <div class="_price-container" style="">
  97.                 <div class="both"></div>
  98.                 <div>Tarif public : {{ p.article.prixVente|price|raw }}&nbsp;€ HT</div>
  99.                 <div>Remise : {{ remise.valeur }}%</div>
  100.                 <div>Tarif remisé : {{ remise.prixRemise|price|raw }}&nbsp;€ HT</div>
  101.             </div>
  102.             <div class="both"></div>
  103.         {% else %}
  104.             <div class="_price-container" style="margin-bottom:0px;">
  105.                 <span class="" style="">Tarif net :  {{ p.article.prixVente|price|raw }}&nbsp;€<span class="price-ttc">HT</span></span>
  106.             </div>
  107.             <div class="both"></div>
  108.         {% endif %}
  109.         <div style="font-weight:bolder;color:#34495E;font-size:15px;">
  110.             Total  HT : <span class="total-article">{{ p.totalHt|price|raw }}&nbsp;€</span>
  111.         </div>
  112.     </td>
  113. </tr>