templates/piece/index.html.twig line 1

Open in your IDE?
  1. {% form_theme form 'bootstrap_4_layout.html.twig' %}
  2. {% extends 'back.html.twig' %}
  3. {% block title %}Listes des factures{% endblock %}
  4. {% block body %}
  5.     <div class="row">
  6.         <div class="col-md-12">
  7.             <h3>Rechnungen Liste</h3>
  8.             <hr>
  9.         </div>
  10.     </div>
  11.     <div class="row">
  12.         <div class="col-md-12 m_t_20">
  13.             <ul class="ul_action">
  14.                 <li><a href="{{ path('piece_new') }}" class="btn btn-sm btn-primary"> <span class="fa fa-plus"></span>
  15.                         Rechnung</a></li>
  16.             </ul>
  17.         </div>
  18.     </div>
  19.     {% set col_user='col-md-4' %}
  20.     {% set col_date='col-md-3' %}
  21.     {% if app.user.isSuperAdmin %}
  22.         {% set col_user='col-md-3' %}
  23.         {% set col_date='col-md-2' %}
  24.         {% endif %}
  25.     {{ form_start(form) }}
  26.     <div class="row">
  27.         <div class="col-md-2">
  28.             {{ form_row(form.code,{'value':app.request.get('code')}) }}
  29.         </div>
  30.         <div class="col-md-3">
  31.             {{ form_row(form.client,{'value':app.request.get('client')}) }}
  32.         </div>
  33.         {% if app.user.isSuperAdmin %}
  34.         <div class="{{ col_user }}">
  35.             {{ form_row(form.user,{'value':app.request.get('user')}) }}
  36.         </div>
  37.         {% endif %}
  38.         <div class="{{ col_date }}">
  39.             {{ form_row(form.dateDu,{'value':app.request.get('dateDu')}) }}
  40.         </div>
  41.         <div class="{{ col_date }}">
  42.             {{ form_row(form.dateAu,{'value':app.request.get('dateAu')}) }}
  43.         </div>
  44.     </div>
  45.     <div class="row">
  46.         <div class="col-md-2">
  47.             {{ form_row(form.amountHTMin,{'value':app.request.get('amountHTMin')}) }}
  48.         </div>
  49.         <div class="col-md-2">
  50.             {{ form_row(form.amountHTMax,{'value':app.request.get('amountHTMax')}) }}
  51.         </div>
  52.         <div class="col-md-2">
  53.             {{ form_row(form.amountTVAMin,{'value':app.request.get('amountTVAMin')}) }}
  54.         </div>
  55.         <div class="col-md-2">
  56.             {{ form_row(form.amountTVAMax,{'value':app.request.get('amountTVAMax')}) }}
  57.         </div>
  58.         <div class="col-md-2">
  59.             {{ form_row(form.discountMin,{'value':app.request.get('discountMin')}) }}
  60.         </div>
  61.         <div class="col-md-2">
  62.             {{ form_row(form.discountMax,{'value':app.request.get('discountMax')}) }}
  63.         </div>
  64.     </div>
  65.     <div class="row">
  66.         <div class="col-md-2">
  67.             {{ form_row(form.amountDiscountMin,{'value':app.request.get('amountDiscountMin')}) }}
  68.         </div>
  69.         <div class="col-md-2">
  70.             {{ form_row(form.amountDiscountMax,{'value':app.request.get('amountDiscountMax')}) }}
  71.         </div>
  72.         <div class="col-md-2">
  73.             {{ form_row(form.amountTTCMin,{'value':app.request.get('amountTTCMin')}) }}
  74.         </div>
  75.         <div class="col-md-2">
  76.             {{ form_row(form.amountTTCMax,{'value':app.request.get('amountTTCMax')}) }}
  77.         </div>
  78.         <div class="col-md-2">
  79.             {{ form_row(form.soldeMin,{'value':app.request.get('soldeMin')}) }}
  80.         </div>
  81.         <div class="col-md-2">
  82.             {{ form_row(form.soldeMax,{'value':app.request.get('soldeMax')}) }}
  83.         </div>
  84.     </div>
  85.     <div class="row m_b_20">
  86.         <div class="col-md-2">
  87.             {{ form_row(form.modePaiement,{'value':app.request.get('modePaiement')}) }}
  88.         </div>
  89.         <div class="col-md-2">
  90.             {{ form_row(form.marque,{'value':app.request.get('marque')}) }}
  91.         </div>
  92.         <div class="col-md-1 m_t_30">
  93.             <button type="submit" class="btn btn-success btn-sm"><span class="fa fa-search"
  94.                                                                        title="Recherche"></span>
  95.             </button>
  96.             <a href="{{ path('piece_index') }}" class="btn btn-danger btn-sm" title="Initilisieren"><span
  97.                         class="fa fa-redo"></span></a>
  98.         </div>
  99.     </div>
  100.     {{ form_end(form) }}
  101.     <div class="row">
  102.         <div class="col-md-12">
  103.             <div class="table-responsive">
  104.                 <table class="table table-condensed">
  105.                     <thead>
  106.                     <tr>
  107.                         <th>Datum</th>
  108.                         <th>N°</th>
  109.                         <th>Kunde</th>
  110.                         {% if app.user.isSuperAdmin %}
  111.                         <th class="text-right">Betrag Einkauf</th>
  112.                         <th class="text-right">Betrag Marge</th>
  113.                         {% endif %}
  114.                         <th class="text-right">Betrag Ohne Mwst</th>
  115.                         <th class="text-right">Betrag Mwst</th>
  116.                         <th class="text-right">Betrag Rabatt</th>
  117.                         <th class="text-right">Gute Rabatt</th>
  118.                         <th class="text-right">Betrag Inkl Mwst</th>
  119.                         <th class="text-right">Solde</th>
  120.                         <th class="text-right">Aktion</th>
  121.                     </tr>
  122.                     </thead>
  123.                     <tbody>
  124.                     {% if pieces|length>0 %}
  125.                     {% for piece in pieces %}
  126.                         <tr>
  127.                             <td>{{ piece.date ? piece.date|date('d/m/Y') : '' }}</td>
  128.                             <td>{{ piece.numero }}</td>
  129.                             <td>{{ piece.client ? piece.client.nomComplet }}</td>
  130.                             {% if app.user.isSuperAdmin %}
  131.                             <td class="text-right">{{ piece.amountBuyHT }}</td>
  132.                             <td class="text-right">{{ piece.amountMarge }}</td>
  133.                             {% endif %}
  134.                             <td class="text-right">{{ piece.amountHT }}</td>
  135.                             <td class="text-right">{{ piece.amountTVA }}</td>
  136.                             <td class="text-right">{{ piece.amountDiscount }}</td>
  137.                             <td class="text-right">{{ piece.amountDiscountTotal ? piece.amountDiscountTotal : '0.00' }}</td>
  138.                             <td class="text-right">{{ piece.amountTTC }}</td>
  139.                             <td class="text-right">
  140.                                     {% if piece.solde == 0 %}
  141.                                         <span class="badge badge-success" style="font-size: 100% !important">
  142.                                     {% else %}
  143.                                         <span class="badge badge-danger" style="font-size: 100% !important">
  144.                                     {% endif %}
  145.                                     {{ piece.solde|number_format(2, '.', ' ') }}
  146.                                     </span>
  147.                             </td>
  148.                             <td>
  149.                                 <ul class="ul_action">
  150.                                     <li><a href="{{ path('piece_show', {'id': piece.id}) }}"
  151.                                            class="btn btn-sm btn-info"><span class="fa fa-info-circle"></span>
  152.                                             Détails</a></li>
  153.                                     {% if app.user.isSuperAdmin or getParam('param_title') != 'IRON-APP' %}
  154.                                     <li><a href="{{ path('piece_edit', {'id': piece.id}) }}"
  155.                                            class="btn btn-sm btn-warning"><span class="fa fa-edit"></span> Aendern</a>
  156.                                     </li>
  157.                                     {% endif %}
  158.                                 </ul>
  159.                             </td>
  160.                         </tr>
  161.                     {% endfor %}
  162.                     <tr>
  163.                         <th colspan="3">SUMME</th>
  164.                         {% if app.user.isSuperAdmin %}
  165.                         <th class="text-right">{{ totaux['amountBuyHT']|number_format(2, '.', ' ') }}</th>
  166.                         <th class="text-right">{{ totaux['amountMarge']|number_format(2, '.', ' ') }}</th>
  167.                         {% endif %}
  168.                         <th class="text-right">{{ totaux['amountHT']|number_format(2, '.', ' ') }}</th>
  169.                         <th class="text-right">{{ totaux['amountTVA']|number_format(2, '.', ' ') }}</th>
  170.                         <th class="text-right">{{ totaux['amountDiscount']|number_format(2, '.', ' ') }}</th>
  171.                         <th class="text-right">{{ totaux['amountDiscountTotal']|number_format(2, '.', ' ') }}</th>
  172.                         <th class="text-right">{{ totaux['amountTTC']|number_format(2, '.', ' ') }}</th>
  173.                         <th class="text-right">{{ totaux['soldeTotal']|number_format(2, '.', ' ') }}</th>
  174.                         <th colspan="2"></th>
  175.                     </tr>
  176.                     {% else %}
  177.                     <tr>
  178.                         <td colspan="12">
  179.                             <div class="alert alert-info">Kein elemente Verfügbar</div>
  180.                         </td>
  181.                     </tr>
  182.                     {% endif %}
  183.                     </tbody>
  184.                 </table>
  185.             </div>
  186.         </div>
  187.     </div>
  188.     <div class="row">
  189.         <div class="col-md-12">
  190.             <div class="navigation">
  191.                 {{ knp_pagination_render(pieces) }}
  192.             </div>
  193.         </div>
  194.     </div>
  195. {% endblock %}
  196.     {% block javascripts %}
  197.         <script>
  198.             $('#piece_search_client').select2();
  199.         </script>
  200.     {% endblock %}