ldc-legaulois/resources/views/documents/order.blade.php
2021-06-18 10:56:25 +02:00

122 lines
3.9 KiB
PHP

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ str_replace('_', '-', app()->getLocale()) }}"
xml:lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<title>{{ __('Commande Le Gaulois') }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
html, body {
position: relative;
width: 210mm;
height: 297mm;
margin: 0;
padding: 0;
}
#entete {
position: absolute;
top: 75mm;
left: 20mm;
width: 174mm;
}
#body {
position: absolute;
top: 165mm;
left: 20mm;
width: 174mm;
}
.items {
border-collapse: collapse;
border: 1px solid #000000; /* this draws the table border */
}
.items th,
.items td {
border: 1px solid #000000 !important;
padding: 10px 20px;
}
p {
margin: 0;
padding: 0;
}
.ft10 {
font-size: 18px;
font-family: Helvetica;
color: #000000;
}
.ft11 {
font-size: 18px;
font-family: Helvetica;
color: #000000;
}
</style>
</head>
<body style="background-image: url('{{ asset('assets/email/order.png') }}'); background-image-resize:6; background-repeat: no-repeat;background-size: contain;">
<div id="entete" class="ft10">
<table width="100%">
<tbody>
<tr>
<td colspan="2" style="text-align: right;"><b>{{ __('Date') }}&nbsp;:&nbsp;{{ date('d/m/Y') }}</b></td>
</tr>
<tr>
<td style="padding-top: 10mm;">{{ __('Nom') }}&nbsp;:&nbsp;{{ $lastname }}</td>
<td style="padding-top: 10mm;">{{ __('Prénom') }}&nbsp;:&nbsp;{{ $firstname }}</td>
</tr>
<tr>
<td>{{ __('E-mail') }}&nbsp;:&nbsp;{{ $email }}</td>
<td>{{ __('Téléphone') }}&nbsp;:&nbsp;{{ $phone }}</td>
</tr>
<tr style="vertical-align: top;">
<td colspan="2">{{ __('Adresse') }}&nbsp;:&nbsp;{{ $address }}</td>
</tr>
<tr>
<td>{{ __('Code Postal') }}&nbsp;:&nbsp;{{ $postcode }}</td>
<td>{{ __('Ville') }}&nbsp;:&nbsp;{{ $city }}</td>
</tr>
</tbody>
</table>
</div>
<div id="body">
<table width="100%" class="ft10 items">
<colgroup>
<col span="1" style="width: 20%;">
<col span="1" style="width: 25%;">
<col span="1" style="width: 25%;">
<col span="1" style="width: 20%;">
</colgroup>
<thead>
<tr>
<th></th>
<th>{{ __('Prix unitaire') }}</th>
<th>{{ __('Quantité') }}</th>
<th>{{ __('Total') }}</th>
</tr>
</thead>
<tbody>
@php $totalItems = 0; $total = 0; @endphp
@foreach($items as $item)
<tr>
<td>{{ $item['name'] }}</td>
<td>{{ $item['price'] }}&nbsp;€</td>
<td>{{ $item['pivot']['quantity'] }}</td>
<td>{{ $item['price'] * $item['pivot']['quantity'] }}&nbsp;€</td>
</tr>
@php $totalItems += $item['pivot']['quantity']; $total += $item['price'] * $item['pivot']['quantity']; @endphp
@endforeach
<tr>
<td>{{ __('Total') }}</td>
<td></td>
<td>{{ $totalItems }}</td>
<td>{{ $total }}&nbsp;€</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>