207 lines
8.8 KiB
PHP
207 lines
8.8 KiB
PHP
<!DOCTYPE html>
|
||
<html lang="id">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>Laporan Bukti Tayang</title>
|
||
<style>
|
||
@page {
|
||
size: A4;
|
||
margin: 20px;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||
font-size: 12px;
|
||
}
|
||
|
||
body::before {
|
||
content: "";
|
||
position: fixed;
|
||
top: 40%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 200px;
|
||
height: 200px;
|
||
background-image: url('{{ public_path('assets/defaults/simedkom-logo-circle.png') }}');
|
||
background-size: contain;
|
||
background-repeat: no-repeat;
|
||
opacity: 0.03;
|
||
z-index: -1;
|
||
}
|
||
|
||
header .icon {
|
||
text-align: center;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
header .icon img {
|
||
width: 150px;
|
||
height: auto;
|
||
}
|
||
|
||
.container {
|
||
width: 100%;
|
||
max-width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.header {
|
||
text-align: center;
|
||
margin-bottom: 20px;
|
||
border-bottom: 2px solid #e0e0e0;
|
||
padding-bottom: 10px;
|
||
}
|
||
|
||
.header h2 {
|
||
font-size: 18px;
|
||
color: #3A59D1;
|
||
}
|
||
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
table-layout: fixed;
|
||
}
|
||
|
||
thead {
|
||
background-color: #f4f4f4;
|
||
}
|
||
|
||
th, td {
|
||
border: 1px solid #ccc;
|
||
padding: 6px;
|
||
vertical-align: top;
|
||
text-align: left;
|
||
word-break: break-word;
|
||
overflow-wrap: break-word;
|
||
font-size: 11px;
|
||
}
|
||
|
||
.link-cell {
|
||
max-width: 150px;
|
||
}
|
||
|
||
img.proof-img {
|
||
width: 80px;
|
||
height: 80px;
|
||
object-fit: cover;
|
||
display: block;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.footer {
|
||
text-align: right;
|
||
font-size: 10px;
|
||
color: #888;
|
||
margin-top: 30px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<header>
|
||
<div class="icon">
|
||
<img src="{{ public_path('assets/defaults/simedkom-logo-full.png') }}" alt="Logo">
|
||
</div>
|
||
</header>
|
||
|
||
<div class="container">
|
||
<div class="header">
|
||
<h2>Laporan Bukti Tayang</h2>
|
||
</div>
|
||
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 5%;">No</th>
|
||
<th>Kerja Sama</th>
|
||
<th>Media</th>
|
||
<th>Tgl Upload</th>
|
||
<th>Status</th>
|
||
<th>Bukti</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach($cooperationCompletions as $i => $cooperationCompletion)
|
||
<tr>
|
||
<td>{{ $i + 1 }}</td>
|
||
<td>{{ $cooperationCompletion->order->cooperation->name }}</td>
|
||
<td>{{ $cooperationCompletion->media->name }}</td>
|
||
<td>{{ \Carbon\Carbon::parse($cooperationCompletion->created_at)->locale('id')->translatedFormat('l, d F Y') }}</td>
|
||
<td>
|
||
@if ($cooperationCompletion->status === '0')
|
||
Menunggu
|
||
@elseif ($cooperationCompletion->status === '1')
|
||
Diterima
|
||
@elseif ($cooperationCompletion->status === '2')
|
||
Ditolak
|
||
@endif
|
||
</td>
|
||
<td>
|
||
@php
|
||
$payment_request_letter_ext = pathinfo($cooperationCompletion->payment_request_letter, PATHINFO_EXTENSION);
|
||
$invoice_ext = pathinfo($cooperationCompletion->payment_request_letter, PATHINFO_EXTENSION);
|
||
$bank_reference_ext = pathinfo($cooperationCompletion->payment_request_letter, PATHINFO_EXTENSION);
|
||
$electronic_tax_invoice_ext = pathinfo($cooperationCompletion->payment_request_letter, PATHINFO_EXTENSION);
|
||
|
||
if ($cooperationCompletion->other_document) {
|
||
$other_document_ext = pathinfo($cooperationCompletion->other_document, PATHINFO_EXTENSION);
|
||
}
|
||
@endphp
|
||
@if($cooperationCompletion->payment_request_letter)
|
||
@if(in_array(strtolower($payment_request_letter_ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
|
||
<img class="proof-img" src="{{ public_path('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}" alt="Bukti">
|
||
@elseif(strtolower($payment_request_letter_ext) === 'pdf')
|
||
<a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}" target="_blank">{{'[Surat Permohonan Pembayaran]'}}</a>
|
||
@else
|
||
Tidak dikenali
|
||
@endif
|
||
@endif
|
||
@if($cooperationCompletion->invoice)
|
||
@if(in_array(strtolower($invoice_ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
|
||
<img class="proof-img" src="{{ public_path('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}" alt="Bukti">
|
||
@elseif(strtolower($invoice_ext) === 'pdf')
|
||
{{' - '}}<a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}" target="_blank">{{'[Invoice/Tagihan]'}}</a>
|
||
@else
|
||
Tidak dikenali
|
||
@endif
|
||
@endif
|
||
@if($cooperationCompletion->bank_reference)
|
||
@if(in_array(strtolower($bank_reference_ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
|
||
<img class="proof-img" src="{{ public_path('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}" alt="Bukti">
|
||
@elseif(strtolower($bank_reference_ext) === 'pdf')
|
||
{{' - '}}<a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}" target="_blank">{{'[Referensi Bank]'}}</a>
|
||
@else
|
||
Tidak dikenali
|
||
@endif
|
||
@endif
|
||
@if($cooperationCompletion->electronic_tax_invoice)
|
||
@if(in_array(strtolower($electronic_tax_invoice_ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
|
||
<img class="proof-img" src="{{ public_path('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}" alt="Bukti">
|
||
@elseif(strtolower($electronic_tax_invoice_ext) === 'pdf')
|
||
{{' - '}}<a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}" target="_blank">{{'[E-Faktur]'}}</a>
|
||
@else
|
||
Tidak dikenali
|
||
@endif
|
||
@endif
|
||
@if($cooperationCompletion->other_document)
|
||
@if(in_array(strtolower($other_document_ext), ['jpg', 'jpeg', 'png', 'gif', 'webp']))
|
||
<img class="proof-img" src="{{ public_path('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}" alt="Bukti">
|
||
@elseif(strtolower($other_document_ext) === 'pdf')
|
||
{{' - '}}<a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}" target="_blank">{{'[Dokumen Lainnya]'}}</a>
|
||
@else
|
||
Tidak dikenali
|
||
@endif
|
||
@endif
|
||
</td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="footer">
|
||
Dicetak pada {{ now()->format('d-m-Y H:i') }} – {{ $app->app_title ?? 'SIMEDKOM' }}
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|