ldc-supportweb/resources/views/documents/invoice.blade.php
2022-08-30 13:21:07 +00:00

222 lines
No EOL
8 KiB
PHP

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
{{ __('Devis :appname - ref :ref', [
'appname' => config('app.name'),
'ref' => $ref,
]) }}
</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;
}
body {
font-family: Tahoma;
font-size: 12px;
color: #333333;
background-color: #FFFFFF;
}
table {
border-collapse: collapse;
}
#mainTable {
margin: auto;
padding-top: 10mm;
height: 244mm;
width: 188mm;
}
table.bordered,
table.bordered tr,
table.bordered th,
table.bordered td {
border: 1px solid;
border-color: #CCC;
}
.with-bg {
background-color: #F2F2F2;
}
@page {
footer: page-footer;
}
</style>
</head>
<body>
<div id="mainTable" cellpadding="0" cellspacing="0">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="text-align: right;padding-bottom: 3mm;"><b>{{ Str::upper($lastname) }} {{ $firstname }}</b></td>
</tr>
<tr>
<td style="text-align: right;padding-right: 3mm;"><b>{{ Str::singular(__('models.classes.companies')) }}</b></td>
<td width="auto" style="white-space: nowrap;">{{ $company->name }}</td>
</tr>
<tr>
<td style="text-align: right;padding-right: 3mm;"><b>{{ __('Entité à facturer') }}</b></td>
<td width="auto" style="white-space: nowrap;">{{ $companyInvoiced->name }}</td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" width="12mm" style="height: 23mm;">
<img style="width: 12mm;" src="{{ resource_path('assets/documents/invoice/logo_ldc.jpg') }}" alt="{{ trans('Logo LDC') }}" />
</td>
<td width="50%">
<span style="font-size: 16px;font-weight: bold;">{{ __('SERVICE WEB MARKETING GROUPE') }}</span>
</td>
</tr>
</table>
<br />
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="25mm"><b>{{ __('Objet :') }}</b></td>
<td>{{ $object }}</td>
</tr>
<tr>
<td width="25mm"><b>{{ __('Site Internet :') }}</b></td>
<td><u>{{ $site->name }}</u></td>
</tr>
<tr>
<td width="25mm"><b>{{ __('Devis :') }}</b></td>
<td><strong><i>{{ $ref }}</i></strong></td>
</tr>
<tr>
<td width="25mm"><b>{{ __('Date :') }}</b></td>
<td><i>{{ Carbon::parse($updated_at)->isoFormat('DD/MM/YYYY HH:mm') }}</i></td>
</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="26mm" style="text-align: center;">
<span style="font-size: 16px;font-weight: bold;">{{ __('Prestation WEB') }}</span>
</td>
</tr>
</table>
@php
$tasks = collect($tasks);
$columns = 2 + ( $show_days ? 1 : 0);
$page = 1;
$perPage = 8;
$lastPage = App\Lib\CollectionHelper::paginateManually($tasks, $perPage)->lastPage();
@endphp
@while($lastPage >= $page)
@php $taskList = App\Lib\CollectionHelper::paginateManually($tasks, $perPage, $page); @endphp
@if($page !== 1)
<table width="100%" style="height: 10mm;">
<tr>
<td>&nbsp;</td>
</tr>
</table>
@endif
<table width="100%" cellspacing="0" cellpadding="2" class="bordered" @if($page !==1) style="margin-top: 30mm;" @endif>
@if($page === 1)
<tr>
<td class="with-bg" style="padding-left: 2mm;"><strong>{{ __('Tâches') }}</strong></td>
@if($show_days)
<td width="22mm" class="with-bg" style="padding-left: 2mm;"><strong>{{ __('Jours') }}</strong></td>
@endif
<td width="22mm" class="with-bg" style="padding-left: 2mm;"><strong>{{ __('Montant') }}</strong></td>
</tr>
<tr style="display:none;">
<td colspan="{{ $columns }}"></td>
</tr>
@endif
@foreach($taskList as $task)
<tr>
<td valign="top" style="padding: 3mm 2mm;">
@if($task['package'] ?? 0)
<b>{{ __('Forfait : :package', [
'package' => $packages[$task['package']]->name ?? __('non existant')
]) }}</b>
<br>
@endif
{{ $task['desc'] }}
</td>
@if($show_days)
<td style="text-align: center;">{{ number_format($task['days'], 2, ',', '') }}</td>
@endif
<td style="text-align: center;">{{ number_format($task['amount'], 2, ',', '') }}</td>
</tr>
@endforeach
@for ($i = $perPage - $taskList->count(); $i > 0; $i--)
<tr>
@for ($k = $columns; $k > 0; $k--)
<td valign="top">&nbsp;</td>
@endfor
</tr>
@endfor
</table>
@php $page++; @endphp
@if($taskList->currentPage() < $taskList->lastPage())
<pagebreak>
@endif
@endwhile
<table width="100%" cellspacing="0" cellpadding="2" class="bordered">
<tr>
<td style="padding-left: 2mm;"><span style="font-size: 14px;font-weight: bold;">{{ __('Total') }}</span></td>
@if($show_days)
<td width="22mm" align="center"><strong>{{ __(':total Jours', [
'total' => number_format($total_days, 2, ',', '')
]) }}</strong></td>
@endif
<td width="22mm" align="center"><strong>{{ __(':total €', [
'total' => number_format($total, 2, ',', '')
]) }}</strong></td>
</tr>
</table>
@if($comment)
<br>
<div>
<span style="font-size: 13px;font-weight: bold;">{{ __('Commentaire') }}</span>
</div>
<table width="100%" cellspacing="0" cellpadding="2" class="bordered">
<tr>
<td style="padding: 2mm;">
{{ Str::limit($comment, 2100) }}
</td>
</tr>
</table>
@endif
</div>
<htmlpagefooter name="page-footer">
<table width="90%" cellspacing="0" cellpadding="2" style="margin: auto;margin-bottom: 10mm;">
<tr>
<td width="33%" style="border-top:double medium #CCCCCC;padding-top: 2mm;" valign="top">
{{ __("LDC Web Service") }}<br />
</td>
<td width="33%" style="text-align: center;border-top:double medium #CCCCCC;padding-top: 2mm;" valign="top">
</td>
<td valign="bottom" width="34%" style="text-align: right;border-top:double medium #CCCCCC;padding-top: 2mm;">
<span>{{ __('page') }}&nbsp;{PAGENO}</span>
</td>
</tr>
</table>
</htmlpagefooter>
</body>
</html>