{% extends 'base.html.twig' %} {% block title %}Len's Backoffice - Stock {% endblock %} {% block stylesheets %} {% endblock %} {% block header %}
{# delete input group #}
{% endblock %} {% block drawer_button %}
{% endblock %} {% block body %} To Top {% for compo in composants %} {% endfor %} {% for pc in pcs %} {% endfor %}

PC ({{ pcs|length }})

Nombre de pc : {{ pcRepo.sumQuantite() }}
Montant du stock : {{ pcRepo.prixStock() }} €
Image
Modèle
SKU
Benchmark
Emplacement
{% set url = 'arrow-down.svg' %} {% set tmp = 'ASC' %} {% if sort == 'pc_qte' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Stock Réel
Capacité de fabrication
Prix
Simulation
{% for pc in pcRepo.getPcOrderBy('pc_qte','DESC') %}
arrow
{% if pc.hasFiche() %} fiche {% endif %} img
{{ pc.modele }}
{% include "stock/component/input.html.twig" with {'id' : 'editPcModele_'~pc.sku , 'input_value' : pc.modele, 'function' : 'updatePcModele("'~pc.sku~'","'~path('stock.edit.pc')~'")'} %}
{{ pc.sku }}
{% include "stock/component/input.html.twig" with {'id' : 'editPcSku_'~pc.sku , 'input_value' : pc.sku, 'function' : 'updatePcSku("'~pc.sku~'","'~path('stock.edit.pc')~'")'} %}
{{ pc.benchmark }}
{% include "stock/component/input.html.twig" with {'id' : 'editPcBenchmark_'~pc.sku , 'input_value' : pc.benchmark, 'function' : 'updatePcBenchmark("'~pc.sku~'","'~path('stock.edit.pc')~'")'} %}
{{ pc.getEmplacement() }} edit
{{ pc.quantite }}
{% include "stock/component/input.html.twig" with {'id' : 'editPcStock_'~pc.sku , 'input_value' : pc.quantite, 'function' : 'updatePcStock("'~pc.sku~'","'~path('stock.edit.pc')~'")'} %}
{{ pc.getQteFab() }}
{{ pc.prix }} €
{% include "stock/component/input.html.twig" with {'id' : 'editPrice_'~pc.getSku() , 'input_value' : pc.prix, 'function' : 'newPrice(\''~pc.getSku()~'\',"'~path('stock.edit.pc')~'")'} %}
0
{% endfor %}
{% set catName = 'laptop' %}

Laptops ({{ laptops|length }})

{% for laptop in laptops %} {% endfor %}
{% set url = 'arrow-down.svg' %} {% set tmp = 'ASC' %} {% if sort == 'marque' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Marque {% set url = 'arrow-down.svg' %} {% set tmp = 'ASC' %} {% if sort == 'modele' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Modele SKU Fournisseur Specs {% set url = 'arrow-down.svg' %} {% set tmp = 'ASC' %} {% if sort == 'prix' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Prix
{% if laptop.images != null %} {% else %} {% endif %} {{ laptop.marque }} {{ laptop.modele }} {{ laptop.sku }} {% for item in laptop.fournisseur %} {{ item }}
{% endfor %}
{{ laptop.specs }} {{ laptop.prix }} € {% if laptop.hasFiche %} fiche {% endif %} {% if laptop.hasImage() %}{% endif %}
{% for cat in categorie %} {% if cat.id not in [16,34] %} {% if section is defined and section == cat | replace({' ': '_'}) %} {% set class = "" %} {% else %} {% set class = 'hide' %} {% endif %}
{% if cat.icone != null %} {% endif %}

{{ cat.getLibelle() }} ({{ cat.getComposants()|length }})

Nombre de {{ cat }} : {{ cat.sumQuantiteCompo() }}
Montant du stock : {{ cat.prixStock() }} €
Image
{% set url = 'arrow-down.svg' %} {% set tmp = 'ASC' %} {% if sort == 'marque' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Marque {% set catName = cat.getLibelle() | replace({' ':'_'}) %}
{% set url = 'arrow-down.svg' %} {% if sort == 'model' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Modele
{% set url = 'arrow-down.svg' %} {% if sort == 'specs' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Specs
EAN
{% set url = 'arrow-down.svg' %} {% if sort == 'prix' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Prix
Fiche
{% set url = 'arrow-down.svg' %} {% if sort == 'quantite' %} {% if order == 'ASC' %} {% set tmp = 'DESC' %} {% set url = 'arrow-down-fill.svg' %} {% else %} {% set tmp = 'ASC' %} {% set url = 'arrow-up-fill.svg' %} {% endif %} {% endif %} Quantité
Modifier la quantité
{% for composant in cat.getComposantsOrderBy(sort | default('quantite'),order | default('DESC')) %}
Modifier
{% if composant.hasImage() %} {% else %} {% endif %}
{{ composant.marque }}
{% include "stock/component/input.html.twig" with {'id' : 'editMarque_'~composant.id , 'input_value' : composant.marque, 'function' : 'updateMarque("'~composant.id~'","'~path('stock.compo.edit')~'")'} %}
{{ composant.model }}
{% include "stock/component/input.html.twig" with {'id' : 'editModele_'~composant.id , 'input_value' : composant.model, 'function' : 'updateModele("'~composant.id~'","'~path('stock.compo.edit')~'")'} %}
{{ composant.specs }}
{% include "stock/component/input.html.twig" with {'id' : 'editSpecs_'~composant.id , 'input_value' : composant.specs, 'function' : 'updateSpecs("'~composant.id~'","'~path('stock.compo.edit')~'")'} %}
{{ composant.isbn }}
{% include "stock/component/input.html.twig" with {'id' : 'editEAN_'~ composant.id , 'input_value' : composant.isbn, 'function' : 'updateEAN("'~composant.id~'","'~path('stock.compo.edit')~'")'} %}
{{ composant.prix }}
{% include "stock/component/input.html.twig" with {'id' : 'editPrix_'~composant.id , 'input_value' : composant.prix, 'function' : 'updatePrix("'~composant.id~'","'~path('stock.compo.edit')~'")'} %}
{% if composant.hasFiche() %} fiche {% endif %}
{% if composant.quantite > limiteQteCompo.value %} {% set warning = 'success text-white' %} {% elseif composant.quantite > 0 %} {% set warning = 'warning' %} {% else %} {% set warning = 'danger text-white' %} {% endif %} {{ composant.quantite }}
moins 0 plus
{% endfor %}
{% endif %} {% endfor %}
{% include "stock/component/modals.html.twig" %} {% endblock %} {% block javascripts %}{% endblock %}