{% extends "@Flexy/FrontBundle/templates/layout.html.twig" %}
{% block stylesheets %}
{{parent()}}
<style type="text/css" media="print">
header,.hidden-print
{
display:none;
}
</style>
<style>
#invoice{
padding: 30px;
}
.invoice {
position: relative;
background-color: #FFF;
min-height: 680px;
padding: 15px
}
.invoice header {
padding: 10px 0;
margin-bottom: 20px;
border-bottom: 1px solid #3989c6
}
.invoice .company-details {
text-align: right
}
.invoice .company-details .name {
margin-top: 0;
margin-bottom: 0
}
.invoice .contacts {
margin-bottom: 20px
}
.invoice .invoice-to {
text-align: left
}
.invoice .invoice-to .to {
margin-top: 0;
margin-bottom: 0
}
.invoice .invoice-details {
text-align: right
}
.invoice .invoice-details .invoice-id {
margin-top: 0;
color: #3989c6
}
.invoice main {
padding-bottom: 50px
}
.invoice main .thanks {
margin-top: -100px;
font-size: 2em;
margin-bottom: 50px
}
.invoice main .notices {
padding-left: 6px;
border-left: 6px solid #3989c6
}
.invoice main .notices .notice {
font-size: 1.2em
}
.invoice table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px
}
.invoice table td,.invoice table th {
padding: 15px;
background: #eee;
border-bottom: 1px solid #fff
}
.invoice table th {
white-space: nowrap;
font-weight: 400;
font-size: 16px
}
.invoice table td h3 {
margin: 0;
font-weight: 400;
color: #3989c6;
font-size: 1.2em
}
.invoice table .qty,.invoice table .total,.invoice table .unit {
text-align: right;
font-size: 1.2em
}
.invoice table .no {
color: #fff;
font-size: 1.6em;
background: #3989c6
}
.invoice table .unit {
background: #ddd
}
.invoice table .total {
background: #3989c6;
color: #fff
}
.invoice table tbody tr:last-child td {
border: none
}
.invoice table tfoot td {
background: 0 0;
border-bottom: none;
white-space: nowrap;
text-align: right;
padding: 10px 20px;
font-size: 1.2em;
border-top: 1px solid #aaa
}
.invoice table tfoot tr:first-child td {
border-top: none
}
.invoice table tfoot tr:last-child td {
color: #3989c6;
font-size: 1.4em;
border-top: 1px solid #3989c6
}
.invoice table tfoot tr td:first-child {
border: none
}
.invoice footer {
width: 100%;
text-align: center;
color: #777;
border-top: 1px solid #aaa;
padding: 8px 0
}
@media print {
.invoice {
font-size: 11px!important;
overflow: hidden!important
}
.invoice footer {
position: absolute;
bottom: 10px;
page-break-after: always
}
.invoice>div:last-child {
page-break-before: always
}
}
</style>
{% endblock %}
{% block body %}
<div class="body-wrapper">
<div class="container">
<div class="card p-4">
<div id="invoice">
<div class="toolbar hidden-print">
<div class="text-right">
<button id="printInvoice" class="btn btn-info"><i class="fa fa-print"></i> Imprimer / Exporter en PDF</button>
</div>
<hr>
</div>
<div class="invoice overflow-auto">
<div style="min-width: 600px">
<header>
<div class="row">
<div class="col">
<a target="_blank" href="#">
<img width="200" src="{{asset('omall/logo-black.png')}}" >
</a>
</div>
<div class="col company-details ">
<small>Num de devis </small>
<h2 class="name">
<a target="_blank" href="#">
Devis {{"now"|date("ymdhis")}}
</a>
</h2>
</div>
</div>
</header>
<main>
<div class="row contacts">
<div class="col invoice-to">
<div class="text-gray-light"></div>
<!--<h2 class="to">Najib Benkirane</h2>
<div class="address">56 Hay tawfik, Casablanca maroc </div>-->
</div>
<div class="col invoice-details">
<div class="date">Date de devis: {{"now"|date('d-m-Y')}}</div>
<div class="date"></div>
</div>
</div>
<div class="row" >
<div class="col-12" >
</div>
</div>
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>Produit</th>
<th class="text-left">Description</th>
<th class="text-right">Prix</th>
<th class="text-right">Quantity</th>
<th class="text-right">TOTAL</th>
</tr>
</thead>
<tbody class="cart-devis">
<tr>
<td class="no"></td>
<td class="text-left">
<p>
</p>
</td>
<td class="unit"> MAD</td>
<td class="qty"> </td>
<td class="total"> MAD</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td colspan="2">Frais de livraison</td>
<td > 8,50 MAD</td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="2"></td>
<td > </td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="2">Montant รก payer</td>
<td class="total-devis" > MAD</td>
</tr>
</tfoot>
</table>
<div class="thanks"></div>
<div class="notices d-none">
<div>NOTICE:</div>
<div class="notice">Valable pendant 15 jours </div>
</div>
</main>
<footer>
</footer>
</div>
<!--DO NOT DELETE THIS div. IT is responsible for showing footer always at the bottom-->
<div></div>
</div>
</div>
</div>
</div>
</div>
<!-- Body Wrapper End Here -->
{% endblock %}
{% block javascripts %}
{{parent()}}
<script>
$('#printInvoice').click(function(){
$(".footer").hide();
$(this).hide();
Popup($('.invoice')[0].outerHTML);
function Popup(data)
{
window.print();
return true;
$(this).show();
}
$(".footer").show();
});
</script>
{% endblock %}