templates/rh/rh_pay_slip/_line_table.html.twig line 1

Open in your IDE?
  1. <div class="table-responsive">
  2.     <table id="defaultDataTable" class="display table table-striped table-bordered" style="width:100%">
  3.         <thead>
  4.             <tr>
  5.                 <th width="5%">
  6.                     <input type="checkbox" id="check-all" onclick="javascript:checkAllElt()">
  7.                 </th>
  8.                 <th class="text-center">#</th>
  9.                 <th>Nom & Prénoms</th>
  10.                 <th class="text-center">Salaire catégoriel</th>
  11.                 <th class="text-center">Total brute</th>
  12.                 <th class="text-center">Brute fiscal</th>
  13.                 <th class="text-center">Brute social</th>
  14.                 <th class="text-center">Retenu part salarial </th>
  15.                 {# <th class="text-center">Retenu part patronal</th> #}
  16.                 <th class="text-center">Net à payer</th>
  17.                 <th class="text-center">Etat</th>
  18.                 <th width="15%" class="text-center">Action</th>
  19.             </tr>
  20.         </thead>
  21.         <tbody>
  22.             {% set based = 0 %}
  23.             {% set grossTotal = 0 %}
  24.             {% set taxGross = 0 %}
  25.             {% set socialGross = 0 %}
  26.             {% set netSalary = 0 %}
  27.             {% set withholdingTax = 0 %}
  28.             {% set patronalWithholdingTax = 0 %}
  29.             {% set count = 0 %}
  30.             {% for salary_pay_slip in rh_pay_slip.rhSalaryPaySlips %}
  31.                 {% set based = based + salary_pay_slip.baseSalary %}
  32.                 {% set grossTotal = grossTotal + salary_pay_slip.grossTotal %}
  33.                 {% set taxGross = taxGross + salary_pay_slip.taxGross %}
  34.                 {% set withholdingTax = withholdingTax + salary_pay_slip.withholdingTax %}
  35.                 {% set patronalWithholdingTax = patronalWithholdingTax + salary_pay_slip.patronalWithholdingTax %}
  36.                 {% set socialGross = socialGross + salary_pay_slip.socialGross %}
  37.                 {% set netSalary = netSalary + salary_pay_slip.netSalary %}
  38.                 {% set count = count + 1 %}
  39.                 <tr>
  40.                     <td>
  41.                         <input type="checkbox" class="check-elt" value="{{ salary_pay_slip.id }}" onclick="javascript:checkElt()">
  42.                     </td>
  43.                     <td>{{ loop.index }}</td>
  44.                     <td>{{ salary_pay_slip.rhSalary.name }} ({{ salary_pay_slip.rhSalary.isPermanent ? "Permanent(e)" : "Vacataire" }})</td>
  45.                     <td class="text-center">{{ salary_pay_slip.baseSalary|number_format(0, ',', ' ') }}</td>
  46.                     <td class="text-center">{{ salary_pay_slip.grossTotal|number_format(0, ',', ' ') }}</td>
  47.                     <td class="text-center">{{ salary_pay_slip.taxGross|number_format(0, ',', ' ') }}</td>
  48.                     <td class="text-center">{{ salary_pay_slip.socialGross|number_format(0, ',', ' ') }}</td>
  49.                     <td class="text-center">{{ salary_pay_slip.withholdingTax|number_format(0, ',', ' ') }}</td>
  50.                     <td class="text-center">{{ salary_pay_slip.netSalary|number_format(0, ',', ' ') }}</td>
  51.                     <td class="text-center">{{ salary_pay_slip.isValidated ? 'Validé' : 'Brouillon' }}</td>
  52.                     <td class="last text-center">
  53.                         <a class="btn-sm btn-primary" onclick="$('.loader').addClass('is-active');" href="{{ path('rh_salary_pay_slip_edit', {'id': salary_pay_slip.id})}}"><i class="fa fa-edit"></i></a>
  54.                         <a class="btn-sm btn-success" onclick="$('.loader').addClass('is-active');" href="{{ path('rh_salary_pay_slip_show', {'id': salary_pay_slip.id})}}"><i class="fa fa-eye"></i></a>
  55.                         {% if not salary_pay_slip.isValidated %}
  56.                             <a href="#" title="valider" class="btn-sm btn-success" onclick="javascript:actionByPathAndElts('{{path('rh_salary_pay_slip_validated', {'id': salary_pay_slip.id })}}')"><i class="fa fa-check"></i></a>
  57.                             {% else %}
  58.                                 <a href="#" title="annuler" class="btn-sm btn-warning" onclick="javascript:actionByPathAndElts('{{path('rh_salary_pay_slip_cancel', {'id': salary_pay_slip.id })}}')"><i class="fa fa-times"></i></a>
  59.                         {% endif %}
  60.                     </td>
  61.                 </tr>
  62.             {% endfor %}
  63.             <tr>
  64.                 <td><input type="checkbox"></td>
  65.                 <td><b>{{ count + 1 }}</b></td>
  66.                 <td></td>
  67.                 <td class="text-center"><b>{{ based|number_format(0, ',', ' ') }}</b></td>
  68.                 <td class="text-center"><b>{{ grossTotal|number_format(0, ',', ' ') }}</b></td>
  69.                 <td class="text-center"><b>{{ taxGross|number_format(0, ',', ' ') }}</b></td>
  70.                 <td class="text-center"><b>{{ socialGross|number_format(0, ',', ' ') }}</b></td>
  71.                 <td class="text-center"><b>{{ withholdingTax|number_format(0, ',', ' ') }}</b></td>
  72.                 <td class="text-center"><b>{{ netSalary|number_format(0, ',', ' ') }}</b></td>
  73.                 <td class="text-center"></td>
  74.                 <td class="last text-center"></td>
  75.             </tr>
  76.         </tbody>
  77.     </table>
  78. </div>