<tr id="article-devis-{{ p.id }}"> {% set data_image = "" %} <td style="text-align:center;vertical-align:top;width:5%;padding-left:5px;padding-right:15px;"> {% set slug = dtc_article.getslugifArticle(p.article) %} <a href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}"> {% set images = dtc_image_article.getImageDefaut(p.article.id) %} {% if images[0] is defined %} {# <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">#} <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"> {% set data_image = asset(images[0].getUploadDir ~ '/' ~ p.article.id ~ '/' ~ images[0].url) | imagine_filter('400x300') %} {% else %} <img src="{{ asset('images/defaut-img-product.jpg') }}" class="text-center product-img" style="width:auto;height:auto;max-height:110px;"> {% set data_image = asset('images/defaut-img-product.jpg') %} {% endif %} </a> <div class="_visible_mobile" style="display: inline-block; vertical-align: middle;margin-top:5px;"> QTÉ : <input style="background:white; width:80px; display:inline-block; margin:0; vertical-align: middle;" class="text-center form-control" readonly value="{{ p.quantite }}" /> </div> </td> <td style="padding-right:5px;line-height:22px;"> <a class="dark" href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}">{{ p.libelle }}</a> <div class="product-ref"> <a href="{{ path("dtc_article_afficher" , { 'id': p.article.id,'slug':slug }) }}">Référence : {{ p.reference }}</a> </div> {# {% if p.reservations is not null and p.getReservationsUnserialize|length > 0 %} {% for r in p.getReservationsUnserialize %} {% if "sur commande" in r %} <div class="etat_stock_sur_commande">{{ r }}</div> {% elseif "prévue" in r %} <div class="etat_stock_reappro">{{ r }}</div> {% else %} <div class="etat_stock_en_stock">{{ r }}</div> {% endif %} {% endfor %} {% endif %} #} {% if p.article.dispo >= p.quantite %} <div class="etat_stock_en_stock" style=""><i class="fa fa-circle etat_stock_en_stock"></i> En stock ({{ p.article.dispo }})</div> {% elseif p.article.dispo > 0 %} <div class=" green" style=""> <i style="color:#1ABB9C;" class="bi-color-vert-jaune fa fa-circle red"></i> Stock <span class="yellow" style="color:#ffc107;">partiel </span> {% set besoin_quantite = p.quantite %} {% set besoin_quantite = besoin_quantite - p.article.dispo %} <div class="etat_stock_en_stock">{{ p.article.dispo }} en stock</div> {% set datesProchainesDispo = dtc_article.getDatesProchainesDispo(p.article.id) %} {{dump(datesProchainesDispo)}} {% if datesProchainesDispo|length > 0 %} {% for d in datesProchainesDispo %} {% if besoin_quantite > 0 %} {% set qte_ligne = d.quantite %} {% if qte_ligne > besoin_quantite %} {% set qte_ligne = besoin_quantite %} {% endif %} {% set besoin_quantite = besoin_quantite-qte_ligne %} <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> {% endif %} {% endfor %} {% endif %} {% if besoin_quantite > 0 %} <div class="etat_stock_sur_commande" >{{ besoin_quantite }} sur commande</div> {% endif %} </div> {% else %} {% set besoin_quantite = p.quantite %} {% set datesProchainesDispo = dtc_article.getDatesProchainesDispo(p.article.id) %} {% if datesProchainesDispo|length > 0 %} <div class="etat_stock_reappro"><i class="fa fa-circle etat_stock_reappro"></i> En approvisionement : {% for d in datesProchainesDispo %} {% if besoin_quantite > 0 %} {% set qte_ligne = d.quantite %} {% if qte_ligne > besoin_quantite %} {% set qte_ligne = besoin_quantite %} {% endif %} {% set besoin_quantite = besoin_quantite-qte_ligne %} <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> {% endif %} {% endfor %} {% if besoin_quantite > 0 %} <div class="etat_stock_sur_commande">{{ besoin_quantite }} sur commande</div> {% endif %} </div> {% else %} <div class="etat_stock_sur_commande"><i class="fa fa-circle etat_stock_sur_commande"></i> Sur commande</div> {% endif %} {% endif %} {% set remise = dtc_article.getRemisesPossibleArticleClient({'article':p.article.id},app.user.client) %} {% if remise.remiseId is defined and remise.remiseId > 0 %} <div class="_price-container" style=""> <div class="both"></div> <div>Tarif public : {{ p.article.prixVente|price|raw }} € HT</div> <div>Remise : {{ remise.valeur }}%</div> <div>Tarif remisé : {{ remise.prixRemise|price|raw }} € HT</div> </div> <div class="both"></div> {% else %} <div class="_price-container" style="margin-bottom:0px;"> <span class="" style="">Tarif net : {{ p.article.prixVente|price|raw }} €<span class="price-ttc">HT</span></span> </div> <div class="both"></div> {% endif %} <div style="font-weight:bolder;color:#34495E;font-size:15px;"> Total HT : <span class="total-article">{{ p.totalHt|price|raw }} €</span> </div> </td></tr>