perbaikan print out dan penambahan nomor laporan
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,13 @@
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
@php
|
||||
$data = '';
|
||||
foreach ($permohonan->debiture->documents as $dokumen) {
|
||||
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||
}
|
||||
$data = rtrim($data, ', ');
|
||||
@endphp
|
||||
<main class="content">
|
||||
@php
|
||||
$senior_officer = null;
|
||||
@@ -236,54 +242,23 @@
|
||||
@endphp
|
||||
|
||||
<div class="container">
|
||||
@php
|
||||
function generateCustomTanggal()
|
||||
{
|
||||
|
||||
$tahunAwal = rand(20, 30);
|
||||
$bulanTetap = rand(1, 12);
|
||||
$tanggalTetap = rand(1, 28);
|
||||
|
||||
$bulanFormatted = str_pad($bulanTetap, 2, '0', STR_PAD_LEFT);
|
||||
$tanggalFormatted = str_pad($tanggalTetap, 2, '0', STR_PAD_LEFT);
|
||||
|
||||
// Generate sisa angka secara acak
|
||||
$sisaAngka1 = rand(0, 9);
|
||||
$sisaAngka2 = rand(0, 9);
|
||||
$sisaAngka3 = rand(0, 9);
|
||||
|
||||
$hasilTanggal = "{$tahunAwal}{$bulanFormatted}{$tanggalFormatted}{$sisaAngka1}{$sisaAngka2}{$sisaAngka3}";
|
||||
|
||||
return [
|
||||
'fullNumber' => $hasilTanggal,
|
||||
'tahun' => $tahunAwal,
|
||||
'bulan' => $bulanFormatted,
|
||||
'tanggal' => $tanggalFormatted,
|
||||
'sisaAngka' => "{$sisaAngka1}{$sisaAngka2}{$sisaAngka3}",
|
||||
];
|
||||
}
|
||||
|
||||
$tanggalHasil1 = generateCustomTanggal();
|
||||
|
||||
@endphp
|
||||
|
||||
|
||||
<div class="header">
|
||||
<table style="width: 100%; border: none;">
|
||||
<table style="width: 100%; border: none; table-layout: fixed;">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: left;" class="header-left">
|
||||
<td style="width: 50%; text-align: left; padding-right: 10px;">
|
||||
@include('lpj::component.logo-bag')
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right;">
|
||||
<h3>Tanggal : {{date('Y-m-d')}}</h3>
|
||||
<h3>Waktu : {{date('H:i:s')}}</h3>
|
||||
<td style="width: 50%; text-align: right; padding-left: 10px;">
|
||||
<h3>Tanggal : {{ date('Y-m-d') }}</h3>
|
||||
<h3>Waktu : {{ date('H:i:s') }}</h3>
|
||||
<h3>User : {{ Auth::user()->name }}</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>LAPORAN PENILAIAN ATAS TANAH DAN/ATAU BANGUNAN</h4>
|
||||
<p>NO:
|
||||
{{ $permohonan->debiture->branch->code ?? '' }}/{{ $tanggalHasil1['fullNumber'] }}/LPJ/{{ $permohonan->nomor_registrasi }}/VII/{{ $tanggalHasil1['tahun'] }}
|
||||
|
||||
<h4 style="text-align: center; text-transform: uppercase; font-size: 14px;">LAPORAN PENILAIAN ATAS {{$data}}</h4>
|
||||
<p style="text-align: center;">NO:
|
||||
{{ $permohonan->debiture->branch->code ?? '' }}/{{ $nomorLaporan }}/LPJ/{{ $permohonan->nomor_registrasi }}/{{ onRomawi(date('m')) }}/{{ date('Y') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -409,15 +384,6 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$data = '';
|
||||
foreach ($permohonan->debiture->documents as $dokumen) {
|
||||
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||
$dok = $dokumen->detail;
|
||||
}
|
||||
$data = rtrim($data, ', '); // Remove the trailing comma and space
|
||||
@endphp
|
||||
|
||||
@if (isset($basicData['jenisJaminan']))
|
||||
<table class="checkbox-list">
|
||||
|
||||
@@ -594,31 +560,97 @@
|
||||
<table class="judul-table">
|
||||
<tr>
|
||||
<td class="border1">F</td>
|
||||
<td class="border">ANALISA TANAH DAN BANGUNAN</td>
|
||||
<td class="border" style="text-transform: uppercase;">ANALISA {{ $data }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
@if ($dokumen->jenisJaminan)
|
||||
@php
|
||||
$cekLuas = isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])
|
||||
? 'tidak sesuai'
|
||||
: 'sesuai';
|
||||
|
||||
$luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null;
|
||||
$formKategori = json_decode($dokumen->jenisJaminan->form_kategori, true);
|
||||
@endphp
|
||||
<td width="25%"><strong>Luas Tanah</strong></td>
|
||||
<td>{{ $luas }}</td>
|
||||
@if (isset($formKategori) && $formKategori)
|
||||
@php
|
||||
$kategoriArray = is_array($formKategori) ? $formKategori : [$formKategori];
|
||||
$kategoriUnik = array_unique($kategoriArray);
|
||||
@endphp
|
||||
|
||||
@foreach ($kategoriUnik as $kategori)
|
||||
@if ($kategori === 'tanah')
|
||||
<table>
|
||||
<tr>
|
||||
@php
|
||||
$cekLuas = isset($forminspeksi['tanah']['luas_tanah']['tidak sesuai'])
|
||||
? 'tidak sesuai'
|
||||
: 'sesuai';
|
||||
|
||||
$luas = $forminspeksi['tanah']['luas_tanah'][$cekLuas] ?? null;
|
||||
@endphp
|
||||
<td width="25%"><strong>Luas Tanah</strong></td>
|
||||
<td>{{ $luas }}</td>
|
||||
</tr>
|
||||
|
||||
<!-- Bentuk Tanah -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Bentuk Tanah</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['bentukTanah']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['bentukTanah'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) && in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Kontur Tanah -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Kontur Tanah</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['konturTanah']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['konturTanah'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['tanah']['kontur_tanah']) && in_array($item->name, $forminspeksi['tanah']['kontur_tanah']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Bentuk Tanah -->
|
||||
<!-- Ketinggian Tanah -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Bentuk Tanah</strong></td>
|
||||
<td style="vertical-align: top;"><strong>Ketinggian Tanah</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['bentukTanah']))
|
||||
@if (isset($basicData['ketinggianTanah']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['bentukTanah'] as $index => $item)
|
||||
@foreach ($basicData['ketinggianTanah'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -626,64 +658,11 @@
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) && in_array($item->name, $forminspeksi['tanah']['bentuk_tanah']['bentuk_tanah']) ? 'checked' : '' }}>
|
||||
{{ isset($forminspeksi['tanah']['ketinggian_tanah']['ketinggian']) && in_array($item->name, $forminspeksi['tanah']['ketinggian_tanah']['ketinggian']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Kontur Tanah -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Kontur Tanah</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['konturTanah']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['konturTanah'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['tanah']['kontur_tanah']) && in_array($item->name, $forminspeksi['tanah']['kontur_tanah']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Ketinggian Tanah -->
|
||||
<tr>
|
||||
<td style="vertical-align: top;"><strong>Ketinggian Tanah</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['ketinggianTanah']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['ketinggianTanah'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['tanah']['ketinggian_tanah']['ketinggian']) && in_array($item->name, $forminspeksi['tanah']['ketinggian_tanah']['ketinggian']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
@@ -917,6 +896,117 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@elseif ($kategori === 'apartemen-kantor')
|
||||
<table>
|
||||
<tr>
|
||||
@php
|
||||
$cekLuas = isset(
|
||||
$forminspeksi['luas_unit']['tidak sesuai'],
|
||||
)
|
||||
? 'tidak sesuai'
|
||||
: 'sesuai';
|
||||
|
||||
$luas = $forminspeksi['luas_unit'][$cekLuas] ?? null;
|
||||
@endphp
|
||||
<td style="padding: 2px;">Luas Unit</td>
|
||||
<td style="padding: 2px;">:</td>
|
||||
<td style="padding: 2px;">{{ $luas ?? '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Bentuk Unit</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['bentukUnit']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['bentukUnit'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['bentuk_unit']) && in_array($item->name, $forminspeksi['bentuk_unit']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td><strong>Kondisi Unit</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['kondisiUnit']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['kondisiUnit'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['kondisi_unit']) && in_array($item->name, $forminspeksi['kondisi_unit']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<tr>
|
||||
<td><strong>Posisi Unit</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['posisiUnit']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['posisiUnit'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['posisi_unit']) && in_array($item->name, $forminspeksi['posisi_unit']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
<tr>
|
||||
<td><strong>View Unit</strong></td>
|
||||
<td>
|
||||
@if (isset($basicData['view']))
|
||||
<table class="checkbox-list">
|
||||
<tr>
|
||||
@foreach ($basicData['view'] as $index => $item)
|
||||
@if ($index % 3 == 0 && $index > 0)
|
||||
</tr>
|
||||
<tr>
|
||||
@endif
|
||||
<td class="checkbox-item">
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
{{ isset($forminspeksi['view']) && in_array($item->name, $forminspeksi['view']) ? 'checked' : '' }}>
|
||||
{{ $item->name }}
|
||||
</label>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</table>
|
||||
@endif
|
||||
</table>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user