{% extends'@admin/base.html.twig' %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block breadcrumb %}{% endblock %} {% block bodycontent %}
{#Titre document#}

VENTES - MODIFICATION DU BON D'ECHANGE

{% if document.deliveryTotal %}{{ document.deliveryTotal }}{% else %}0{% endif %}TND
{# ===== Template produit (1 seule fois) ===== #} {# ===== Template commentaire ===== #} {# ligne delivery legacy cachee: conservee pour compatibilite JS #} {% set i = 0 %} {% if commande.documentDeclinationProduits is not empty %} {% for key, documentDeclinationProduit in document.documentDeclinationProduits %} {% set checked = (documentDeclinationProduit.produitDeclinationValue.id in (commande.documentDeclinationProduits |filter(p => p.type == "declinationEchange") |map(p => p.produitDeclinationValue.id)) ) ? true : false %} {% set i = key %} {% set cbId = 'cb-echange-edit-' ~ (key+1) %} {# Colonne cachée (alignement avec ) + données POST #} {# Checkbox overlay + Image cliquable #} {# Référence #} {# Description #} {# Prix HT (readonly + hidden value pour calcul) #} {# Remise #} {# TVA (si tu veux figé: disabled ; sinon enlève disabled) #} {# Qté (readonly) #} {# Total TTC #} {# Colonne actions (vide ici) #} {% endfor %} {% endif %} {% if commande.documentDeclinationProduits is not empty %} {% for key, documentDeclinationProduit in commande.documentDeclinationProduits|filter(prod => prod.type != "declinationEchange") %} {% set i = i + 1 %} {# Colonne cachée (alignement) + hidden nécessaires #} {# Image #} {# Référence #} {# Description (readonly comme ton code actuel) #} {# PU HT (disabled + hidden posté) #} {# Remise #} {# TVA #} {# Qt #} {# Total TTC #} {# Actions #} {% endfor %} {% endif %} {% if false and document.documentComments is not empty %} {% for key, documentComment in document.documentComments %} {% endfor %} {% endif %}
# Image Référence Description P.U HT Remise TVA Qt Net à payer
Cocher le(s) produit(s) à échanger
#
{% set picture = asset('/images/galery_placeholder_200.png') %} {% for image in documentDeclinationProduit.produitDeclinationValue.picture %} {% if image.isSelected %} {% set picture = app.request.getSchemeAndHttpHost() ~ vich_uploader_asset(image, 'file') %} {% endif %} {% endfor %}
{{ documentDeclinationProduit.totalAmountTtc }} TND
Ajouter le(s) nouveau(x) produit(s)
{% set picture = asset('/images/galery_placeholder_200.png') %} {% for image in documentDeclinationProduit.produitDeclinationValue.picture %} {% if image.isSelected %} {% set picture = app.request.getSchemeAndHttpHost() ~ vich_uploader_asset(image, 'file') %} {% endif %} {% endfor %}
{{ documentDeclinationProduit.totalAmountTtc }} TND
{% if document.documentProduits is empty and document.documentDeclinationProduits is empty %}
Ajoutez une ligne pour commencer votre document
{% endif %}
{% if type == 'commande' %} {% endif %}
{# Totaux #}
Total HT {{ document.totalAmountHt ?? 0 }} TND
TVA {{ document.totalTva ?? 0 }} TND
Total TTC {{ document.totalAmountTtc ?? 0 }} TND
Remise {% if document.discountType == 'percent' %} ({{ document.discount ~ "%" }}) {% endif %} {{ document.discount ?? 0 }} {% if document.discountType == "percent" %}%{% else %}TND{% endif %}
Frais de port {{ document.deliveryTotal ?? 0 }} TND
Total Net {{ document.totalAmountTtc ?? 0 }} TND
{# -- Partie droite : Document + Client + Paiement + Livraison -- #}
Motif d'échange
{# == DOCUMENT == #}
Document
{# == INFO CLIENT == #}
Info Client
{{ document.client.civility }} {{ document.client.firstName }}
{{ document.client.username }}
{{ document.client.phone }} {% if document.client.secondPhone %} | {{ document.client.secondPhone }} {% endif %}
{% if document.client.adress %}
{% if document.adress %} {{ document.adress|replace({'Tunisie': ""}) }} {% else %} {{ document.client.adress|replace({'Tunisie': ""}) }} {% endif %} , {{ document.client.city }} {{ document.client.region }}
{% if document.client.multiAddress is not empty %} {% endif %}
{% if document.client.multiAddress is not empty %} {% endif %} {% else %}
Pas d'adresse !
{% endif %}
{# == INFOS PAIEMENT == #}
Infos Paiement
{# Bouton Annuler à gauche #} Annuler et Fermer {# Bouton Enregistrer à droite #}
{{ include('@admin/includes/modals/_modal_edit_user.html.twig') }} {{ include('@admin/includes/modals/_modal_catalogue_produit.html.twig') }} {% endblock %}