templates/common/cotisation/_summary_cotisation.html.twig line 1

Open in your IDE?
  1. {% set totalOrderHtTva = 0 %}
  2. {% set totalOrderHt = 0 %}
  3. {% set totalOrderTtc = 0 %}
  4. {% set totalProduct = 0 %}
  5. {% set reduced = (cotisation.cotisationType.tag ?? '') == 'integral' and (cotisation.priceNationalPartCalculated ?? 0) > (cotisation.priceNationalPart ?? 0) %}
  6. <div class="card {{ attrs.class ?? '' }}">
  7.     <div class="card-header card-header-dark">
  8.         {{ title }}
  9.     </div>
  10.     <div class="card-body card-body-dark">
  11.         {% if displayStatus is defined and displayStatus == true %}
  12.             <div class="row mb-3">
  13.                 <div class="col-2 text-bold">Statut</div>
  14.                 <div class="col-10">{{ bagdeStatusCotisation(cotisation.cotisationStatut.id) }}</div>
  15.             </div>
  16.         {% endif %}
  17.         {% if displayFirm is defined and displayFirm == true %}
  18.             <div class="row mb-3">
  19.                 <div class="col-2 text-bold">Entreprise</div>
  20.                 <div class="col-10">{{ cotisation.entreprise.raisonSocial }}</div>
  21.             </div>
  22.         {% endif %}
  23.         <div class="row mb-3">
  24.             <div class="col-2 text-bold">Type d'offre</div>
  25.             <div class="col-10">
  26.                 {{ cotisation.cotisationType ? cotisation.cotisationType.name : 'Autre' }}
  27.                 {% if cotisation.cotisationType and cotisation.cotisationType.tag == 'young_member' %}
  28.                     <span><i> - Année {{ cotisation.youngMemberYearNumber }}</i></span>
  29.                 {% endif %}
  30.             </div>
  31.         </div>
  32.         <div class="row mb-3">
  33.             <div class="col-2 text-bold">Chiffre d'affaire</div>
  34.             <div class="col-10">{{ cotisation.revenue ? cotisation.revenue|number_format(2, ',', ' ') ~ ' €' }}</div>
  35.         </div><div class="row mb-3">
  36.             <div class="col-2 text-bold">Date de cloture du dernier exercice</div>
  37.             <div class="col-10">{{ cotisation.revenueDate ? cotisation.revenueDate|date('d/m/Y') }}</div>
  38.         </div>
  39.         <div class="row mb-3">
  40.             <div class="col-2 text-bold">Justificatif CA</div>
  41.             <div class="col-10">
  42.                 {% if cotisation.document %}
  43.                     <a href="{{ vich_uploader_asset(cotisation, 'documentFile') }}" target="_blank">
  44.                         {{ cotisation.originalDocumentName is null ? cotisation.document : cotisation.originalDocumentName }}
  45.                     </a>
  46.                 {% endif %}
  47.             </div>
  48.         </div>
  49.         {% set order = cotisation.associetedOrder %}
  50.         {% if order %}
  51.             <table class="mt-5 mb-5 table table-striped" style="width: 100%;">
  52.                 <thead class="thead-dark">
  53.                 <tr>
  54.                     <th class="align-left">Code</th>
  55.                     <th class="align-left">{{ cotisation ? 'Désignation' : 'Produit' }}</th>
  56.                     <th class="align-left">Quantité</th>
  57.                     <th class="align-left">Prix unit. HT</th>
  58.                     <th class="align-left">Prix total. HT</th>
  59.                     <th class="align-left">Taux Tva</th>
  60.                     <th class="align-left">Prix total TTC</th>
  61.                 </tr>
  62.                 </thead>
  63.                 <tbody class="col-pt">
  64.                     {% for line in order.orderLines %}
  65.                         <tr>
  66.                             <td>{{ line.product.code|upper }}</td>
  67.                             <td>{{ line.product.name }}{{ reduced and line.product.code|upper == 'PARTN' ? '*' }}</td>
  68.                             <td>{{ line.quantity }}</td>
  69.                             <td>{{ line.unitPrice|number_format(2, ',', ' ') }} €</td>
  70.                             <td>{{ line.totalPrice|number_format(2, ',', ' ') }} €</td>
  71.                             <td>{{ line.vat }}%</td>
  72.                             <td>{{ (line.totalPrice * (1 + line.vat / 100))|number_format(2, ',', ' ') }} €</td>
  73.                         </tr>
  74.                         {% if line.vat > 0 %}
  75.                             {% set totalOrderHtTva = totalOrderHtTva + (totalOrderHt * line.quantity) %}
  76.                         {% endif %}
  77.                         {% set totalOrderHt = totalOrderHt + (line.unitPrice * line.quantity) %}
  78.                         {% set totalOrderTtc = totalOrderTtc + (line.totalPrice * (1 + line.vat / 100)) %}
  79.                         {% set totalProduct = totalProduct + line.quantity %}
  80.                     {% endfor %}
  81.                 </tbody>
  82.             </table>
  83.         {% endif %}
  84.         {% if displayPaymentDate is defined and displayPaymentDate == true %}
  85.             <div class="row mb-3">
  86.                 <div class="col-2 text-bold">Date de paiement</div>
  87.                 <div class="col-10">{{ cotisation.datePaiement ? cotisation.datePaiement|date('d/m/Y') }}</div>
  88.             </div>
  89.         {% endif %}
  90.         {% if displayProofOfPayment is defined and displayProofOfPayment == true %}
  91.             <div class="row mb-3">
  92.                 <div class="col-2 text-bold">Justificatif paiement</div>
  93.                 <div class="col-10">
  94.                     {% if cotisation.proofOfPayment %}
  95.                         <a href="{{ vich_uploader_asset(cotisation, 'proofOfPaymentFile') }}" target="_blank">
  96.                             {{ cotisation.originalProofOfPaymentName is null ? cotisation.proofOfPayment : cotisation.originalProofOfPaymentName }}
  97.                         </a>
  98.                     {% endif %}
  99.                 </div>
  100.             </div>
  101.         {% endif %}
  102.         {% if displayComment is defined and displayComment == true %}
  103.             <hr>
  104.             <div class="row mb-3">
  105.                 <div class="col-2 text-bold">Commentaire</div>
  106.                 <div class="col-10">{{ cotisation.commentaire|raw }}</div>
  107.             </div>
  108.         {% endif %}
  109.         {% if
  110.             displayPaymentInfo is defined and
  111.             displayPaymentInfo == true and
  112.             paymentInfos is defined and
  113.             paymentInfos|length > 0 and
  114.             (cotisation.associetedOrder and cotisation.associetedOrder.paymentType.id == 2)
  115.         %}
  116.             <hr>
  117.             <div class="row mb-3">
  118.                 <div class="col-2 text-bold">Informations de paiement</div>
  119.                 <div class="col-10">
  120.                     <div class="alert alert-info">
  121.                         {% for info in paymentInfos %}
  122.                             {% if info.valuetype == 'file' %}
  123.                                 {% if info.value %}
  124.                                     <a
  125.                                             href="{{ rib.value }}"
  126.                                             class="btn btn-primary"
  127.                                             download
  128.                                     >
  129.                                         <i class="fa-solid fa-download"></i> Télécharger le RIB de la FFCB
  130.                                     </a>
  131.                                 {% endif %}
  132.                             {% else %}
  133.                             <div class="mb-3">
  134.                                 <span class="text-bold">{{ info.title|capitalize }}: </span>
  135.                                 <span>{{ info.value }}</span>
  136.                             </div>
  137.                         {% endif %}
  138.                         {% endfor %}
  139.                     </div>
  140.                 </div>
  141.             </div>
  142.         {% endif %}
  143.     </div>
  144. </div>