{% for article in cmd.contenu %} {% if article.isPc() %}
{{article}}
{% set pc = pcs.find(article.article.id) %} {% endif %} {% if article.isComposant() %} {% else %} {% endif %} {# {{ dump(article.article) }}#} {% if article.isPc() and pc.getCompoLimitant() is not null %} {% set ListSousProduit = article.getSousProduit() %} {% set ListSousProduitSorted = [] %} {% for produit in ListSousProduit | sort((a,b) => a.article.id <=> b.article.id) %} {% set ListSousProduitSorted = ListSousProduitSorted|merge([produit]) %} {% endfor %} {% for composantPC in pc.getPcComposants() | sort((a,b) => a.composant.id <=> b.composant.id) %} {% set ite = loop.index0 %} {% set SousProduit = ListSousProduitSorted[ite] %} {% if SousProduit.article.id == composantPC.composant.id %} {% if SousProduit.hasCommandeFournisseur() %} {% set cmdSupplier = SousProduit.commandeFournisseur %} {% if SousProduit.commandeFournisseur.status.id == 13 %} {% elseif SousProduit.commandeFournisseur.status.id == 9 %} {% else %} {% endif %} {% else %} {% endif %} {% endif %} {% endfor %} {% else %} {% if article.hasCommandeFournisseur() %} {% set cmdSupplier = article.commandeFournisseur %} {% if article.commandeFournisseur.status.id == 13 %} {% elseif article.commandeFournisseur.status.id == 9 %} {% else %} {% endif %} {% elseif article.isComposant() %} {% else %} {% endif %} {% endif %}
InfosInfos de la CommandesArticle CF - En stock Requis
Commande passée le {{ cmdSupplier.getFormattedDateOrder() }} Commande reçue le {{ cmdSupplier.getFormattedDateOrder() }} Commande à effectuer Produit en stocks {{composantPC.composant.model}} {{composantPC.composant.quantite}} {{composantPC.quantite*article.getQuantite}}
Commande passée le {{ cmdSupplier.getFormattedDateOrder() }} Commande reçue le {{ cmdSupplier.getFormattedDateOrder() }} Commande à effectuer {{ article.id }} PC a assemblé{{article.article}} {{ article.quantite }} - {{article.article.quantite}} {{article.quantite}}
{% endfor %}