src/Flexy/FrontBundle/templates/cart/showDevis.html.twig line 1

Open in your IDE?
  1. {% extends "@Flexy/FrontBundle/templates/layout.html.twig"  %}
  2.     {% block stylesheets %}
  3.         {{parent()}}
  4. <style type="text/css" media="print">
  5.         header,.hidden-print
  6.         {
  7.             display:none;
  8.         }
  9.     </style>
  10.     
  11.         <style>
  12.   
  13.         #invoice{
  14.     padding: 30px;
  15. }
  16. .invoice {
  17.     position: relative;
  18.     background-color: #FFF;
  19.     min-height: 680px;
  20.     padding: 15px
  21. }
  22. .invoice header {
  23.     padding: 10px 0;
  24.     margin-bottom: 20px;
  25.     border-bottom: 1px solid #3989c6
  26. }
  27. .invoice .company-details {
  28.     text-align: right
  29. }
  30. .invoice .company-details .name {
  31.     margin-top: 0;
  32.     margin-bottom: 0
  33. }
  34. .invoice .contacts {
  35.     margin-bottom: 20px
  36. }
  37. .invoice .invoice-to {
  38.     text-align: left
  39. }
  40. .invoice .invoice-to .to {
  41.     margin-top: 0;
  42.     margin-bottom: 0
  43. }
  44. .invoice .invoice-details {
  45.     text-align: right
  46. }
  47. .invoice .invoice-details .invoice-id {
  48.     margin-top: 0;
  49.     color: #3989c6
  50. }
  51. .invoice main {
  52.     padding-bottom: 50px
  53. }
  54. .invoice main .thanks {
  55.     margin-top: -100px;
  56.     font-size: 2em;
  57.     margin-bottom: 50px
  58. }
  59. .invoice main .notices {
  60.     padding-left: 6px;
  61.     border-left: 6px solid #3989c6
  62. }
  63. .invoice main .notices .notice {
  64.     font-size: 1.2em
  65. }
  66. .invoice table {
  67.     width: 100%;
  68.     border-collapse: collapse;
  69.     border-spacing: 0;
  70.     margin-bottom: 20px
  71. }
  72. .invoice table td,.invoice table th {
  73.     padding: 15px;
  74.     background: #eee;
  75.     border-bottom: 1px solid #fff
  76. }
  77. .invoice table th {
  78.     white-space: nowrap;
  79.     font-weight: 400;
  80.     font-size: 16px
  81. }
  82. .invoice table td h3 {
  83.     margin: 0;
  84.     font-weight: 400;
  85.     color: #3989c6;
  86.     font-size: 1.2em
  87. }
  88. .invoice table .qty,.invoice table .total,.invoice table .unit {
  89.     text-align: right;
  90.     font-size: 1.2em
  91. }
  92. .invoice table .no {
  93.     color: #fff;
  94.     font-size: 1.6em;
  95.     background: #3989c6
  96. }
  97. .invoice table .unit {
  98.     background: #ddd
  99. }
  100. .invoice table .total {
  101.     background: #3989c6;
  102.     color: #fff
  103. }
  104. .invoice table tbody tr:last-child td {
  105.     border: none
  106. }
  107. .invoice table tfoot td {
  108.     background: 0 0;
  109.     border-bottom: none;
  110.     white-space: nowrap;
  111.     text-align: right;
  112.     padding: 10px 20px;
  113.     font-size: 1.2em;
  114.     border-top: 1px solid #aaa
  115. }
  116. .invoice table tfoot tr:first-child td {
  117.     border-top: none
  118. }
  119. .invoice table tfoot tr:last-child td {
  120.     color: #3989c6;
  121.     font-size: 1.4em;
  122.     border-top: 1px solid #3989c6
  123. }
  124. .invoice table tfoot tr td:first-child {
  125.     border: none
  126. }
  127. .invoice footer {
  128.     width: 100%;
  129.     text-align: center;
  130.     color: #777;
  131.     border-top: 1px solid #aaa;
  132.     padding: 8px 0
  133. }
  134. @media print {
  135.     .invoice {
  136.         font-size: 11px!important;
  137.         overflow: hidden!important
  138.     }
  139.     .invoice footer {
  140.         position: absolute;
  141.         bottom: 10px;
  142.         page-break-after: always
  143.     }
  144.     .invoice>div:last-child {
  145.         page-break-before: always
  146.     }
  147. }
  148.     </style>
  149.     {% endblock %}
  150. {% block body %}
  151.   
  152.         <div class="body-wrapper">
  153.     <div class="container">
  154.     <div class="card p-4">
  155.     
  156.         
  157.                 <div id="invoice">
  158.     <div class="toolbar hidden-print">
  159.         <div class="text-right">
  160.             <button id="printInvoice" class="btn btn-info"><i class="fa fa-print"></i> Imprimer / Exporter en PDF</button>
  161.             
  162.         </div>
  163.         <hr>
  164.     </div>
  165.     <div class="invoice overflow-auto">
  166.         <div style="min-width: 600px">
  167.             <header>
  168.                 <div class="row">
  169.                     <div class="col">
  170.                         <a target="_blank" href="#">
  171.                             <img width="200" src="{{asset('omall/logo-black.png')}}" >
  172.                             </a>
  173.                     </div>
  174.                     <div class="col company-details ">
  175.                     <small>Num de devis </small>
  176.                         <h2 class="name">
  177.                             
  178.                             <a target="_blank" href="#">
  179.                             Devis {{"now"|date("ymdhis")}}
  180.                             </a>
  181.                         </h2>
  182.                        
  183.                     </div>
  184.                 </div>
  185.             </header>
  186.             <main>
  187.                 <div class="row contacts">
  188.                     <div class="col invoice-to">
  189.                         <div class="text-gray-light"></div>
  190.                         <!--<h2 class="to">Najib Benkirane</h2>
  191.                         <div class="address">56 Hay tawfik, Casablanca maroc  </div>-->
  192.                     </div>
  193.                     <div class="col invoice-details">
  194.                         <div class="date">Date de devis: {{"now"|date('d-m-Y')}}</div>
  195.                         <div class="date"></div>
  196.                     </div>
  197.                 </div>
  198.                 
  199.                 <div class="row" >
  200.                     <div class="col-12" >
  201.                         
  202.                     </div>
  203.                 </div>
  204.                 <table border="0" cellspacing="0" cellpadding="0">
  205.                     <thead>
  206.                         <tr>
  207.                             <th>Produit</th>
  208.                             <th class="text-left">Description</th>
  209.                             <th class="text-right">Prix</th>
  210.                             <th class="text-right">Quantity</th>
  211.                             <th class="text-right">TOTAL</th>
  212.                         </tr>
  213.                     </thead>
  214.                     <tbody class="cart-devis">
  215.                     
  216.                         
  217.                         <tr>
  218.                             <td class="no"></td>
  219.                             <td class="text-left">
  220.                             <p>
  221.                                
  222.                             </p>
  223.                             </td>
  224.                             <td class="unit"> MAD</td>
  225.                             <td class="qty"> </td>
  226.                             <td class="total"> MAD</td>
  227.                         </tr>
  228.                        
  229.                    
  230.                     </tbody>
  231.                     <tfoot>
  232.                         <tr>
  233.                             <td colspan="2"></td>
  234.                             <td colspan="2">Frais de livraison</td>
  235.                             <td  > 8,50 MAD</td>
  236.                         </tr>
  237.                         <tr>
  238.                             <td colspan="2"></td>
  239.                             <td colspan="2"></td>
  240.                             <td  > </td>
  241.                         </tr>
  242.                         <tr>
  243.                             <td colspan="2"></td>
  244.                             <td colspan="2">Montant รก payer</td>
  245.                             <td class="total-devis"  > MAD</td>
  246.                         </tr>
  247.                     </tfoot>
  248.                 </table>
  249.                 <div class="thanks"></div>
  250.                 <div class="notices d-none">
  251.                     <div>NOTICE:</div>
  252.                     <div class="notice">Valable pendant 15 jours </div>
  253.                 </div>
  254.             </main>
  255.             <footer>
  256.                 
  257.             </footer>
  258.                 
  259.         </div>
  260.         <!--DO NOT DELETE THIS div. IT is responsible for showing footer always at the bottom-->
  261.         <div></div>
  262.     </div>
  263. </div>
  264.             
  265.         
  266.     </div>
  267.     </div>
  268.         </div>
  269.         <!-- Body Wrapper End Here -->
  270. {% endblock %}
  271.         {% block javascripts %}
  272.             {{parent()}}
  273.                     <script>
  274.          $('#printInvoice').click(function(){
  275.              $(".footer").hide();
  276.               $(this).hide();
  277.             Popup($('.invoice')[0].outerHTML);
  278.             function Popup(data) 
  279.             {
  280.                 window.print();
  281.                 return true;
  282.         
  283.                $(this).show();
  284.             }
  285.                  $(".footer").show();
  286.         });
  287.         </script>
  288.         {% endblock %}