<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mon panier: {{ products|length }} produits pour le moment</title>
<style>
.clearfix:after {
content: "";
display: table;
clear: both;
}
a {
color: #5D6975;
text-decoration: underline;
}
body {
position: relative;
width: 18cm;
height: 29.7cm;
margin: 0 auto;
color: #001028;
background: #FFFFFF;
font-family: Arial, sans-serif;
font-size: 12px;
font-family: Arial;
}
header {
padding: 10px 0;
margin-bottom: 30px;
}
#logo {
text-align: center;
margin-bottom: 10px;
}
#logo img {
width: 90px;
}
h1 {
border-top: 1px solid #5D6975;
border-bottom: 1px solid #5D6975;
color: #5D6975;
font-size: 2.4em;
line-height: 1.4em;
font-weight: normal;
text-align: center;
margin: 0 0 20px 0;
background: url(dimension.png);
}
#project {
float: left;
}
#project span {
color: #5D6975;
text-align: right;
width: 52px;
margin-right: 10px;
display: inline-block;
font-size: 0.8em;
}
#company {
float: right;
text-align: right;
}
#project div,
#company div {
white-space: nowrap;
}
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px;
}
table tr:nth-child(2n-1) td {
background: #F5F5F5;
}
table th,
table td {
text-align: center;
}
table th {
padding: 5px 20px;
color: #5D6975;
border-bottom: 1px solid #C1CED9;
white-space: nowrap;
font-weight: normal;
}
table .service,
table .desc {
text-align: left;
}
table td {
padding: 20px;
text-align: right;
}
table td.desc {
padding-top: 25px;
}
table td.service,
table td.desc {
vertical-align: top;
}
table td.unit,
table td.qty,
table td.total {
font-size: 1.2em;
}
table td.grand {
border-top: 1px solid #5D6975;;
}
#notices .notice {
color: #5D6975;
font-size: 1.2em;
}
footer {
color: #5D6975;
width: 100%;
height: 30px;
position: absolute;
bottom: 0;
border-top: 1px solid #C1CED9;
padding: 8px 0;
text-align: center;
}
</style>
</head>
<body>
<header class="clearfix">
<div class="card-body">
<center><h3>Mon panier - {{ products|length }} produit{% if products|length > 1 %}s{% endif %}</h3></center>
</div>
{#{% for onProduct in products %}
<div id="logo">
<img src="{% if onProduct.company.image %}upload/prestataires/{{ products.product.company.image }}{% endif %}" style="width:100px">
</div>
{% endfor %}
<h1>Facture</h1>
<div>
<div style="float: left">
{% for oneProduct in products %}
<div><span>N° Facture :</span> {{ commandProduct.product.commandNumber }}</div> #}
{# <div><span>Client :</span> {{ oneProduct.client.firstName }} {{ oneProduct.client.lastName }}</div>
<div><span>Adresse :</span> {{ oneProduct.client.adress }} {{ product.client.zipCode }}, {{ oneProduct.client.city }}</div>
<div><span>Email :</span> <a href="mailto:{{ oneProduct.client.email }}">{{ oneProduct.client.email }}</a></div> #}
{# <div><span>Date de facturation :</span> {{ commandProduct.product.createdAt|date('d-m-Y') }}</div>
</div>
<div style="float: right">
<div>{{ oneProduct.company.companyName }}</div>
<div>{{ oneProduct.company.adress }},<br>{{ oneProduct.company.zipCode }} {{ oneProduct.company.city }}</div>
<div>Tél : {{ oneProduct.company.contactPhone }}</div>
<div><a href="mailto:{{ oneProduct.company.email }}">{{ oneProduct.company.email }}</a></div>
</div>
{% endfor %}
</div>#}
</header>
<main>
<table>
<thead>
<tr>
<th class="service">Référence</th>
<th class="desc">Quantité</th>
<th class="unit">Prix unitaire</th>
<th class="total">Total</th>
</tr>
</thead>
<tbody>
{% set TotalPriceProduct = 0 %}
{% set TotalPriceProductWithQty = 0 %}
{% set TotalWithQuantity = 0 %}
{% set priceOptions = 0 %}
{% set totOpt = 0 %}
{% set totqtyOpt = 0 %}
{% for product in products %}
{% set tproduct = filter_service.getproductById(product.productId) %}
{# {% set optionObject = filter_service.getProductOption(option) %} #}
{# <pre>
{{ dump(tproduct) }}
</pre> #}
{# {{ dump(tproduct,product['options']) }}
{% endfor %} #}
<tr>
<td class="service">{{ tproduct.name }}
{# {% if product.size %}<br>Taille {{ product.size }}{% endif %}
{% if product.color %}<br>Couleur {{ product.color }}{% endif %} #}
</td>
<td class="desc">{{ product.quantity }}</td>
<td class="unit">{{ tproduct.price|number_format(2, '.') }}€</td>
{% set TotalWithQuantity = tproduct.price * product.quantity %}
<td class="total">{{ TotalWithQuantity|number_format(2, '.') }}€</td>
{% set TotalPriceProductWithQty = TotalPriceProductWithQty + TotalWithQuantity %}
</tr>
{% for option in product['options'] %}
{# {% set optionObject = filter_service.getProductOption(option) %} #}
<tr>
<td class="service">Option: {{ option.nom }}</td>
{# {% for key,qty in product.qtyOption %} #}
{# {% if optionObject.id == key %} #}
<td class="desc">{{ option.qte }}</td>
{% set totqtyOpt = option.price * option.qte %}
{# {% endif %} #}
{% set priceOptions = priceOptions + totqtyOpt %}
{# {% endfor %} #}
<td class="unit">{{ option.price|number_format(2, '.') }}€</td>
<td class="total">{{ totqtyOpt|number_format(2, '.') }}€</td>
</tr>
{% endfor %}
{# {% endfor %} #}
{% endfor %}
<tr>
<td colspan="3" class="grand total">TOTAL</td>
{% if pack %}
{% set TotalPriceProductWithQty = TotalPriceProductWithQty + pack.price %}
{% endif %}
{# {% set totalWithOptions = TotalPriceProductWithQty + priceOptions %} #}
<td class="grand total">{{ (TotalPriceProductWithQty + priceOptions)|number_format(2, '.') }}€</td>
</tr>
</tbody>
</table>
<div id="notices">
<div>Remarque :</div>
<div class="notice">TVA Non applicable, art. 293 B du CGI</div>
<div class="notice" style="margin-top:50px"><small>Votre numéro numéro de panier est confidentiel, il vous sera demandé par le prestataire pour effectué la prestation</small></div>
</div>
</main>
<footer>
Basket was created on a computer and is valid without the signature and seal.
</footer>
</body>
</html>