{# @author: Benjamin AMOUZOU Comment: Tout le code jquery écrit l'est pour que symfony gère automatiquement les formulaires grâce à son composant form builder en se basant sur le nommage des inputs NB: Interdiction formelle d'indenter le code avec l'ide sous peine de casser l'indentation du code jquery #} {% extends 'commercial/template-commercial.html.twig' %} {% block titre_enfant %} Fournisseur {% endblock %} {% block contenu_principal_commercial %}
{% include('template-message.html.twig') %}
{{form_errors(form)}}
Edition fournisseur
{{form_label(form.denomination,"Raison sociale", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(form.denomination, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(form.activite, "Profil", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(form.activite, {'attr': {'class': 'custom-select custom-select-sm'}})}}
{{form_label(form.dateEnregistrement,"Date d'enrégistrement", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(form.dateEnregistrement, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_widget(form.actif, {'attr': {'class': 'custom-control-input'}})}} {{form_label(form.actif,"Actif", {'label_attr': {'class': 'custom-control-label col-form-label col-form-label-sm'}})}} *
{{form_label(form.nombreSite, "Nombre de site", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} {{form_widget(form.nombreSite, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(form.contact,"Numéro fixe", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} {{form_widget(form.contact, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(form.adresse,"Adresse", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} {{form_widget(form.adresse, {'attr': {'class': 'form-control form-control-sm'}})}}
{# Tabs personne contact #}

{#Affichage des personnes contacts#} {% for personne in form.personneContacts %}
Personne contact n° {{loop.index}}
{{form_label(personne.nom, "Nom", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.nom, {'attr': {'class': 'form-control form-control-sm mb-3'}})}}
{{form_label(personne.prenoms, "Prénoms", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.prenoms, {'attr': {'class': 'form-control form-control-sm mb-3'}})}}
{{form_label(personne.sexe, "Sexe", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.sexe, {'attr': {'class': 'custom-select custom-select-sm'}})}}
{{form_label(personne.contacts, "Contacts", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.contacts, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(personne.email, "Email", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.email, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(personne.poste, "Fonction", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(personne.poste, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(personne.type, "Type", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}}
{{form_widget(personne.type, {'attr': {'class': 'custom-select custom-select-sm mb-3'}})}}
{% endfor %} {# Fin affichage des personnes contacts #}
{# Fin tabs personne contact #} {# Début tabs services #}


{# Service fournisseur #} {% for serviceFourni in form.serviceFournis %} {% set numeroService = loop.index - 1 %}
Prestation de service n° {{loop.index}}
{{form_label(serviceFourni.service, "Service", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(serviceFourni.service, {'attr': {'class': 'custom-select custom-select-sm mb-2'}})}}
{{form_widget(serviceFourni.serviceALaDemande, {'attr': {'class': 'custom-control-input'}})}} {{form_label(serviceFourni.serviceALaDemande, "Service à la demande", {'label_attr': {'class': 'custom-control-label col-form-label col-form-label-sm mt-0'}})}}
{# #}
{# Facturation service #}
{% for facturation in serviceFourni.facturationServices %} {% set numeroFacturation = loop.index - 1 %}
Facturation n° {{loop.index}}
{{form_label(facturation.prixService, "Prix du service (FCFA)", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(facturation.prixService, {'attr': {'class': 'form-control form-control-sm'}})}}
{{form_label(facturation.typeFacturation, "Type de facturation", {'label_attr': {'class': 'col-form-label col-form-label-sm'}})}} *
{{form_widget(facturation.typeFacturation, {'attr': {'class': 'custom-select custom-select-sm'}})}}
{% endfor %}
{# Fin facturation service #}
{% endfor %} {# Fin service fournisseur #}
{# Fin tabs services #} {# Début tabs rachat de matières #}


{% for matiere in matierePremieres %} {% set selectionne = false %} {% set valeur = '' %} {% if matiereRachetes is defined %} {% set indice = 0 %} {% for tableau in matiereRachetes %} {% if matiere.id == tableau[0] and not selectionne %} {% set selectionne = true %} {% set indice = loop.index - 1 %}{# 0 début des collections form builder #} {% set valeur = tableau[1] %} {% endif %} {% endfor %} {% endif %}

*
{% endfor %}
{# Fin tabs rachat de matières #} {# Début tabs rachat de materiel #}


{# Fin tabs rachat de materiel #} {# Début tabs conditions enlèvements #}


{# Fin tabs conditions enlèvements #}
{{form_row(form._token)}}
  Annuler
{% endblock %} {% block script %} {% endblock %}