templates/admin/invoices_table_content.html.twig line 1

Open in your IDE?
  1. <table class="table table-hover my-data-table">
  2.                     <thead class="thead-dark">
  3.                     <tr>
  4.                         <th>{{ 'admin.number' | trans }}</th>
  5.                         <th>{{ 'admin.date' | trans }}</th>
  6.                         <th>{{ 'admin.customer' | trans }}</th>
  7.                         <th>{{ 'admin.totalHT' | trans }}</th>
  8.                         <th>{{ 'admin.totalTTC' | trans }}</th>
  9.                         <th>{{ 'admin.paye' | trans }}</th>
  10.                         <th>{{ 'admin.reste_a_payer' | trans }}</th>
  11.                         <th class="text-center">{{ 'admin.actions' | trans }}</th>
  12.                     </tr>
  13.                     </thead>
  14.                     <tbody>
  15. {% set ht = 0 %}
  16.             {% set tva = 0 %}
  17.             {% set remise = 0 %}
  18.             {% set ttc = 0 %}
  19.             {% set totalPaye = 0 %}
  20.             {% set totalResteAPayer = 0 %}
  21.             {% for proposal in invoices %}
  22.                 {% set totalPaye = proposal.montantPaye + totalPaye %}
  23.                 {% set totalResteAPayer = proposal.resteAPayer + totalResteAPayer %}
  24.                 {% set tva = tva + proposal.totalTVA %}
  25.                 {% set ht = ht + proposal.totalHT %}
  26.                 {% set remise = remise + proposal.remise %}
  27.                 {% set ttc = ttc + proposal.totalTTC %}
  28.               <tr>
  29.                 <td>{{ proposal.numero }}</td>
  30.                 <td>{{ proposal.laDate | date('d/m/Y') }}</td>
  31.                 <td>
  32.                     {% if proposal.tiers is not null %}
  33.                     {{ proposal.tiers.nom }}
  34.                     {% endif %}
  35.                 </td>
  36.                 <td>{{ proposal.totalHTApresRemise | number_format(0, '', ' ') }}</td>
  37.                 <td>{{ proposal.totalTTC | number_format(0, '', ' ') }}</td>
  38.                 <td>{{ proposal.montantPaye | number_format(0, '', ' ') }}</td>
  39.                 <td>{{ proposal.resteAPayer | number_format(0, '', ' ') }}</td>
  40.                 <td class="py-3 align-middle">
  41.                 
  42.                 
  43.                     <span type="button" class="btn btn-outline-info btn-icon element-commande" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.detail' | trans }}">
  44.                     <i class="bi bi-eye me-1"></i><span class="id-commande" hidden>{{ proposal.id }}</span>
  45.                     </span>
  46.             
  47.                 {% if userBoutique.droits[3].valeurDroit.modification == true %}
  48.                         {% if proposal.tokenFNE == '' %}
  49.                         <a href="{{ path('admin.edit_sale', {'slug': boutique.slug, 'type': proposal.typeFacture, 'id': proposal.id}) }}" type="button" class="btn btn-outline-info btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.edit' | trans }}">
  50.                                   <i class="bi bi-pencil me-1"></i>
  51.                         </a>
  52.                         {% endif %}
  53.                 {% endif %}
  54.                 {% if userBoutique.droits[4].valeurDroit.ajout == true %}
  55.                         {% if proposal.resteAPayer > 0 %}
  56.                          <a type="button" href="{{ path('admin.new_payment', {'slug': boutique.slug, 'id': proposal.id}) }}" class="btn btn-outline-info item-menu-travail btn-icon"  data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.make_a_payment' | trans }}">
  57.                           <i class="bi bi-cash me-1"></i>
  58.                         </a>
  59.                         {% endif %}
  60.                 {% endif %}
  61.                         
  62.                          <a target="_blank" href="{{ proposal.lienPDF }}" type="button" class="btn btn-outline-info btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.export_pdf' | trans }}">
  63.                           <i class="bi bi-printer me-1"></i>
  64.                         </a>
  65.                         {% if proposal.tokenFNE != '' %}
  66.                             <a target="_blank" href="{{ proposal.tokenFNE }}" type="button" class="btn btn-outline-success btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.imprimer_fne' | trans }}">
  67.                               <i class="bi bi-printer me-1">FNE</i>
  68.                             </a>
  69.                         {% else %}
  70.                             {% if userBoutique.droits[3].valeurDroit.ajout == true %}
  71.                             <a href="{{ path('admin_url_generer_facture_fne', {'slug': boutique.slug, 'id': proposal.id}) }}" type="button" class="item-generer-fne btn btn-outline-danger btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.generer_fne' | trans }}">
  72.                               <i class="bi bi-printer me-1">FNE</i>
  73.                             </a>
  74.                             {% endif %}
  75.                         {% endif %}
  76.                         <a target="_blank" href="{{ path('admin.bon_de_livraison', {'slug': boutique.slug, 'id': proposal.id}) }}" type="button" class="btn btn-outline-info btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.bon_de_livraison' | trans }}">
  77.                           <i class="bi bi-file-earmark-break-fill me-1"></i>
  78.                         </a> 
  79.                         {% if userBoutique.droits[3].valeurDroit.ajout == true %}
  80.                          <a href="{{ path('admin_url_generer_facture_d_avoir_fne', {'slug': boutique.slug, 'id': proposal.id}) }}" type="button" class="item-menu-travail btn btn-outline-info btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="Facture d'avoir">
  81.                           <i class="bi bi-arrow-return-left me-1"></i>
  82.                         </a>
  83.                         {% endif %}
  84.                         {% if userBoutique.droits[3].valeurDroit.ajout == true %}
  85.                          <a href="{{ path('admin.duplicate_sale', {'slug': boutique.slug, 'id': proposal.id}) }}" type="button" class="btn btn-outline-info btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.duplicate' | trans }}">
  86.                           <i class="bi bi-copy me-1"></i>
  87.                         </a>
  88.                         {% endif %}
  89.                         {% if userBoutique.droits[3].valeurDroit.ajout == true %}
  90.                         {% if proposal.tokenFNE == '' %}
  91.                         <a href="{{ path('admin.delete_sale', {'slug': boutique.slug, 'id': proposal.id, 'type': proposal.typeFacture}) }}" type="button" class="btn btn-outline-danger delete-item btn-icon" data-bs-toggle="tooltip"  data-bs-placement="top" title="{{ 'admin.delete' | trans }}">
  92.                                   <i class="bi bi-trash me-1"></i>
  93.                             </a>
  94.                         {% endif %}
  95.                         {% endif %}
  96.                     
  97.                 </td>
  98.               </tr>
  99.               {% endfor %}
  100.               
  101.             
  102. </tbody>
  103.     </table>
  104. <div class="container">
  105.     <div class="row">
  106.         <div class="col-md-4">
  107.             <div class="assie-card">
  108.                 {{ 'admin.totalHT' | trans }}: {{ ht | number_format(0, '', ' ') }}
  109.             </div>
  110.         </div>
  111.         <div class="col-md-4">
  112.             <div class="assie-card">
  113.                 {{ 'admin.totalTVA' | trans }}: {{ tva | number_format(0, '', ' ') }}
  114.             </div>
  115.         </div>
  116.         <div class="col-md-4">
  117.             <div class="assie-card">
  118.                 {{ 'admin.totalTTC' | trans }}: {{ ttc | number_format(0, '', ' ') }}
  119.             </div>
  120.         </div>
  121.     </div>
  122.     <div class="row">
  123.         <div class="col-md-6">
  124.             <div class="assie-card">
  125.                 {{ 'admin.paye' | trans }}: {{ totalPaye | number_format(0, '', ' ') }}
  126.             </div>
  127.         </div>
  128.         <div class="col-md-6">
  129.             <div class="assie-card">
  130.                 {{ 'admin.reste_a_payer' | trans }}: {{ totalResteAPayer | number_format(0, '', ' ') }}
  131.             </div>
  132.         </div>
  133.     </div>
  134. </div>            
  135. <br/>