templates/rapport/Rapportprecommande.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{% endblock %}
  3. {% block body %}
  4. <style>
  5.     body{
  6.         font-family: Poppins
  7.     }
  8.     .main-content{
  9.         background: #fff;
  10.         height: auto;
  11.     }
  12.     .bouttonfilltre{
  13.         margin-top: 30px;
  14.         background: #C64864;
  15.         color: #fff;
  16.     }
  17.     .page-content {
  18.         padding: 0px 10px;
  19.     }
  20. </style>
  21.         {{ form_start(filterForm) }}
  22.         <div class="row" style="
  23.     background: #c3e2e2;
  24.     border: 1px dotted;
  25.     padding: 32px;
  26.     text-align: right;
  27. ">
  28.             <div class="col-6">
  29.                 {{ form_row(filterForm.endDate, {'attr': {'class': 'form-control'}}) }}
  30.             </div>
  31.             <div class="col-6">
  32.                 {{ form_row(filterForm.startDate, {'attr': {'class': 'form-control'}}) }}
  33.             </div>
  34.             <div class="col-12" style="text-align: center">
  35.                 {{ form_row(filterForm.filter, {'attr': {'class': 'form-control bouttonfilltre'}})}}
  36.             </div>
  37.         </div>
  38.         {{ form_end(filterForm) }}
  39. {% set current_month = "now"|date("m") %}
  40.   <h2 style=" font-family: Poppins; text-align: center ; color: #1bbc9b;margin: 30px 0px"> {{ current_month }} تقرير الطلبات الجديدة لشهر  </h2>
  41.     {% if orders is not empty %}
  42.         <h5 style="color: #fff  ;  background:#028080 ; padding: 10px ; text-align: right">  مجموع  طلباتي  {{ totalAmount }}  درهم   </h5> {# Affichez le total ici #}
  43.         <div class="table-bordered">
  44.         <table class="table">
  45.             <thead>
  46.             <tr style="text-align: right">
  47.                 <th>تاريخ الطلب</th>
  48.                 <th>مبلغ الطلب</th>
  49.                 <th>رقم الطلب</th>
  50.             </tr>
  51.             </thead>
  52.             <tbody>
  53.             {% for order in orders %}
  54.                 <tr style="text-align: right">
  55.                     <td>{{ order.date|date('Y-m-d') }}</td>
  56.                     <td>{{ order.total }}</td>
  57.                     <td>{{ order.numerocommande }}</td>
  58.                 </tr>
  59.             {% endfor %}
  60.             </tbody>
  61.         </table>
  62.     {% else %}
  63.         <p>لم يتم العثور على طلبيات  .</p>
  64.     {% endif %}
  65.     </div>
  66. <h5 style=" text-align : right ; color: #fff ; margin-top: 30px ; background:#028080  ; padding: 10px">    ملخص الطلبات والعمولات من شبكتي  </h5>
  67.     <table class="table" id="table">
  68.         <thead>
  69.         <tr style="text-align: right">
  70.             <th>مجموع الطلبيات </th>
  71.             <th>الأرباح </th>
  72.             <th>الجيل </th>
  73.         </tr>
  74.         </thead>
  75.         <tbody>
  76.         {% set totalCommissions = 0 %}
  77.         {% set totalOrders = 0 %}
  78.         {% for data in commissionsByLevel %}
  79.             {% set orderAmount = totalOrdersByLevel[data.level]|default(0) %}
  80.             {% set commissionAmount = data.totalCommissions|default(0) %}
  81.             {% set totalCommissions = totalCommissions + commissionAmount %}
  82.             {% set totalOrders = totalOrders + orderAmount %}
  83.             <tr style="text-align: right">
  84.                 <td>{{ orderAmount }}  dh </td>
  85.                 <td> {{ commissionAmount | number_format(2, '.', ',') }} <span style="text-align: left">dh</span> </td>
  86.                 <td>G {{ data.level }}</td>
  87.             </tr>
  88.         {% endfor %}
  89.         <tr   style="text-align: right">
  90.             <th style="background: #ff00ff ; color: #ffffff ; font-weight: 800;"> </th>
  91.             <td style="background: #ff00ff ; color: #ffffff ; font-weight: 800;">  <span>{{ totalCommissions }}  dh</span>   </td>
  92.             <th style="background: #ff00ff ; color: #ffffff ; font-weight: 800;"> المجموع  </th>
  93.         </tr>
  94.         </tbody>
  95.     </table>
  96.     <h5 style="text-align: right ; color: #fff ; margin-top: 30px ; background:#028080 ; padding: 10px"> تفاصيل الطلبات والعمولات من شبكتي </h5>
  97.     {% for generation, details in detailsByGeneration %}
  98.         <h5 style=" text-align: right ;    background: aquamarine;
  99.     padding: 5px;"> {{ generation }} الجيل </h5>
  100.         <div style="overflow-x: auto; /* Active le défilement horizontal si le contenu déborde */
  101.     width: 100%;
  102.     margin-bottom: 100px/* Vo">
  103.         <table class="table" id="tableo" >
  104.             <thead>
  105.             <tr style="text-align: right">
  106.                 <th>مبلغ الطلب</th>
  107.                 <th>العمولة</th>
  108.                 <th>رقم الطلب</th>
  109.               <th>رقم التسجيل</th>
  110.               <th>الإسم و النسب</th>
  111.                 
  112.             </tr>
  113.             </thead>
  114.             <tbody style="text-align: right">
  115.             {% for detail in details %}
  116.                 <tr>
  117.                     <td>{{ detail.orderAmount }} dh</td>
  118.                     <td>{{ detail.commission }} dh</td>
  119.                     <td>{{ detail.orderNumber }}</td>
  120.                           <td>{{ detail.userMatricule }}</td>
  121.                     
  122.                         <td>{{ detail.userfirstname}} {{ detail.userLastName}}</td>
  123.                     
  124.                     
  125.                 </tr>
  126.             {% else %}
  127.                 <tr>
  128.                     <td colspan="5">لا توجد بيانات متاحة</td>
  129.                 </tr>
  130.             {% endfor %}
  131.             </tbody>
  132.         </table>
  133.         </div>
  134.     {% endfor %}
  135. {% endblock %}
  136. {% block javascripts %}
  137.     {{ parent() }}
  138.     <script type="text/javascript">
  139.         $(document).ready( function () {
  140.             $('#table')({
  141.                 scrollX: true,
  142.                 language: {
  143.                     url: '//cdn.datatables.net/plug-ins/1.10.20/i18n/French.json'
  144.                 }
  145.             });
  146.         } );
  147.     </script>
  148.     <script type="text/javascript">
  149.         $(document).ready( function () {
  150.             $('#tableo')({
  151.                 scrollX: true,
  152.                 language: {
  153.                     url: '//cdn.datatables.net/plug-ins/1.10.20/i18n/French.json'
  154.                 }
  155.             });
  156.         } );
  157.     </script>
  158. {% endblock %}