templates/accounting/accounting_student_registration_fee/_table.html.twig line 1

Open in your IDE?
  1. <div class="table-responsive">
  2.     <table class="display table table-striped table-bordered">
  3.         <thead>
  4.             <tr>
  5.                 <th class="text-center" width="5%">
  6.                     <input type="checkbox" id="check-all" onclick="javascript:checkAllElt()">
  7.                 </th>
  8.                 <th width="10%">Code</th>
  9.                 <th>Libellé</th>
  10.                 <th class="text-center">Montant</th>
  11.                 <th class="text-center">Mt Payé</th>
  12.                 <th class="text-center">Mt Restant</th>
  13.                 <th class="text-center">Mt Annulé/Reporté</th>
  14.                 <th class="text-center">Validité</th>
  15.                 <th class="text-center">Action</th>
  16.             </tr>
  17.         </thead>
  18.         <tbody>
  19.         {% set amount = 0 %}
  20.         {% set amountPaid = 0 %}
  21.         {% set amountRest = 0 %}
  22.         {% set amountCancel = 0 %}
  23.         {% for accounting_student_registration_fee in registration_student_registration.accountingStudentRegistrationFees %}
  24.             {# {% if not accounting_student_registration_fee.isArchived %} #}
  25.                 {% if not accounting_student_registration_fee.isArchived or accounting_student_registration_fee.isReported %}
  26.                     {% set amount = amount + accounting_student_registration_fee.amount %}
  27.                     {% set amountPaid = amountPaid + accounting_student_registration_fee.amountPaid %}
  28.                     {% set amountRest = amountRest + accounting_student_registration_fee.amountRest %}
  29.                     {% set amountCancel = amountCancel + accounting_student_registration_fee.amountCancel %}
  30.                 {% endif %}
  31.                 <tr {% if accounting_student_registration_fee.isArchived or accounting_student_registration_fee.isReported %} style="color: red !important;"{% endif %}>
  32.                     <td class="text-center">
  33.                         {% if not accounting_student_registration_fee.isArchived and not accounting_student_registration_fee.isReported or is_granted('ROLE_SUPER_ADMIN') %}
  34.                             <input type="checkbox" class="check-elt" value="{{ accounting_student_registration_fee.id }}" onclick="javascript:checkElt()">
  35.                         {% endif %}
  36.                     </td>
  37.                     <td>#{{ accounting_student_registration_fee.code }}({{ accounting_student_registration_fee.id }})</td>
  38.                     <td>{{ accounting_student_registration_fee.label }}</td>
  39.                     <td class="text-center">{{ accounting_student_registration_fee.amount|number_format(0, ',', ' ') }}</td>
  40.                     <td class="text-center">{{ accounting_student_registration_fee.amountPaid|number_format(0, ',', ' ') }}</td>
  41.                     <td class="text-center">{{ accounting_student_registration_fee.amountRest|number_format(0, ',', ' ') }}</td>
  42.                     <td class="text-center">{{ accounting_student_registration_fee.amountCancel|number_format(0, ',', ' ') }}</td>
  43.                     <td class="text-center">{{ accounting_student_registration_fee.endAt ? accounting_student_registration_fee.endAt|date('d/m/Y') : 'Indefini' }}</td>
  44.                     <td class="text-right">
  45.                         {% if not accounting_student_registration_fee.isArchived and not accounting_student_registration_fee.isReported %}
  46.                             {% if is_granted('ROLE_ADMIN') %}
  47.                                 {% if accounting_student_registration_fee.amountRest > 0 %}
  48.                                     {% if not accounting_student_registration_fee.isCancel %}
  49.                                         <a href="#" onclick="javascript:actionByPathAndElts('{{path('accounting_student_registration_fee_cancel', {'id': accounting_student_registration_fee.id})}}')" class="btn btn-warning btn-sm" title="Abandonner">ABANDONNER</a>
  50.                                     {% endif %}
  51.                                 {% endif %}
  52.                             {% endif %}
  53.                             {% if is_granted('ROLE_ADMIN') %}
  54.                                 <a href="{{ path('accounting_student_registration_fee_edit', {'id': accounting_student_registration_fee.id}) }}" class="btn btn-primary"><i class="fa fa-calendar"></i> ECHEANCIER</a>
  55.                             {% endif %}
  56.                         {% endif %}
  57.                     </td>
  58.                 </tr>
  59.             {# {% endif %} #}
  60.         {% endfor %}
  61.         <tr>
  62.             <td class="text-center"></td>
  63.             <td></td>
  64.             <td class="text-right"><b>TOTAL</b></td>
  65.             <td class="text-center"><b>{{ registration_student_registration.gleAmount|number_format(0, ',', ' ') }}</b></td>
  66.             <td class="text-center"><b>{{ registration_student_registration.amountPaid|number_format(0, ',', ' ') }}</b></td>
  67.             <td class="text-center"><b>{{ registration_student_registration.amountRest|number_format(0, ',', ' ') }}</b></td>
  68.             <td class="text-center"><b>{{ registration_student_registration.amountCancel|number_format(0, ',', ' ') }}</b></td>
  69.             <td class="text-center"></td>
  70.             <td class="text-right"></td>
  71.         </tr>
  72.         </tbody>
  73.     </table>
  74. </div>