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-1 m_t_30">
  87.             <button type="submit" class="btn btn-success btn-sm"><span class="fa fa-search"
  88.                                                                        title="Recherche"></span>
  89.             </button>
  90.             <a href="{{ path('piece_index') }}" class="btn btn-danger btn-sm" title="Initilisieren"><span
  91.                         class="fa fa-redo"></span></a>
  92.         </div>
  93.     </div>
  94.     {{ form_end(form) }}
  95.     <div class="row">
  96.         <div class="col-md-12">
  97.             <div class="table-responsive">
  98.                 <table class="table table-condensed">
  99.                     <thead>
  100.                     <tr>
  101.                         <th>Datum</th>
  102.                         <th>N°</th>
  103.                         <th>Kunde</th>
  104.                         {% if app.user.isSuperAdmin %}
  105.                         <th class="text-right">Betrag Einkauf</th>
  106.                         <th class="text-right">Betrag Marge</th>
  107.                         {% endif %}
  108.                         <th class="text-right">Betrag Ohne Mwst</th>
  109.                         <th class="text-right">Betrag Mwst</th>
  110.                         <th class="text-right">Betrag Rabatt</th>
  111.                         <th class="text-right">Gute Rabatt</th>
  112.                         <th class="text-right">Betrag Inkl Mwst</th>
  113.                         <th class="text-right">Solde</th>
  114.                         <th class="text-right">Aktion</th>
  115.                     </tr>
  116.                     </thead>
  117.                     <tbody>
  118.                     {% if pieces|length>0 %}
  119.                     {% for piece in pieces %}
  120.                         <tr>
  121.                             <td>{{ piece.date ? piece.date|date('d/m/Y') : '' }}</td>
  122.                             <td>{{ piece.numero }}</td>
  123.                             <td>{{ piece.client ? piece.client.nomComplet }}</td>
  124.                             {% if app.user.isSuperAdmin %}
  125.                             <td class="text-right">{{ piece.amountBuyHT }}</td>
  126.                             <td class="text-right">{{ piece.amountMarge }}</td>
  127.                             {% endif %}
  128.                             <td class="text-right">{{ piece.amountHT }}</td>
  129.                             <td class="text-right">{{ piece.amountTVA }}</td>
  130.                             <td class="text-right">{{ piece.amountDiscount }}</td>
  131.                             <td class="text-right">{{ piece.amountDiscountTotal ? piece.amountDiscountTotal : '0.00' }}</td>
  132.                             <td class="text-right">{{ piece.amountTTC }}</td>
  133.                             <td class="text-right">
  134.                                     {% if piece.solde == 0 %}
  135.                                         <span class="badge badge-success" style="font-size: 100% !important">
  136.                                     {% else %}
  137.                                         <span class="badge badge-danger" style="font-size: 100% !important">
  138.                                     {% endif %}
  139.                                     {{ piece.solde|number_format(2, '.', ' ') }}
  140.                                     </span>
  141.                             </td>
  142.                             <td>
  143.                                 <ul class="ul_action">
  144.                                     <li><a href="{{ path('piece_show', {'id': piece.id}) }}"
  145.                                            class="btn btn-sm btn-info"><span class="fa fa-info-circle"></span>
  146.                                             Détails</a></li>
  147.                                     {% if app.user.isSuperAdmin or getParam('param_title') != 'IRON-APP' %}
  148.                                     <li><a href="{{ path('piece_edit', {'id': piece.id}) }}"
  149.                                            class="btn btn-sm btn-warning"><span class="fa fa-edit"></span> Aendern</a>
  150.                                     </li>
  151.                                     {% endif %}
  152.                                 </ul>
  153.                             </td>
  154.                         </tr>
  155.                     {% endfor %}
  156.                     <tr>
  157.                         <th colspan="3">SUMME</th>
  158.                         {% if app.user.isSuperAdmin %}
  159.                         <th class="text-right">{{ totaux['amountBuyHT']|number_format(2, '.', ' ') }}</th>
  160.                         <th class="text-right">{{ totaux['amountMarge']|number_format(2, '.', ' ') }}</th>
  161.                         {% endif %}
  162.                         <th class="text-right">{{ totaux['amountHT']|number_format(2, '.', ' ') }}</th>
  163.                         <th class="text-right">{{ totaux['amountTVA']|number_format(2, '.', ' ') }}</th>
  164.                         <th class="text-right">{{ totaux['amountDiscount']|number_format(2, '.', ' ') }}</th>
  165.                         <th class="text-right">{{ totaux['amountDiscountTotal']|number_format(2, '.', ' ') }}</th>
  166.                         <th class="text-right">{{ totaux['amountTTC']|number_format(2, '.', ' ') }}</th>
  167.                         <th class="text-right">{{ totaux['soldeTotal']|number_format(2, '.', ' ') }}</th>
  168.                         <th colspan="2"></th>
  169.                     </tr>
  170.                     {% else %}
  171.                     <tr>
  172.                         <td colspan="12">
  173.                             <div class="alert alert-info">Kein elemente Verfügbar</div>
  174.                         </td>
  175.                     </tr>
  176.                     {% endif %}
  177.                     </tbody>
  178.                 </table>
  179.             </div>
  180.         </div>
  181.     </div>
  182.     <div class="row">
  183.         <div class="col-md-12">
  184.             <div class="navigation">
  185.                 {{ knp_pagination_render(pieces) }}
  186.             </div>
  187.         </div>
  188.     </div>
  189. {% endblock %}
  190.     {% block javascripts %}
  191.         <script>
  192.             $('#piece_search_client').select2();
  193.         </script>
  194.     {% endblock %}