update header printout standart
This commit is contained in:
@@ -247,7 +247,7 @@ class PenilaiController extends Controller
|
||||
}
|
||||
|
||||
|
||||
if(!Auth::user()->hasRole('administrator')) {
|
||||
if (!Auth::user()->hasRole('administrator')) {
|
||||
$query->whereHas('penilaian.userPenilai', function ($q) {
|
||||
$q
|
||||
->where('role', 'penilai')
|
||||
@@ -616,20 +616,20 @@ class PenilaiController extends Controller
|
||||
|
||||
$inputAddress = $forminspeksi['asset']['alamat']['sesuai'] ?? $forminspeksi['asset']['alamat']['tidak sesuai'];
|
||||
|
||||
$alamat = [
|
||||
'address' => $inputAddress['address'] ?? null,
|
||||
'village_code' => $this->getWilayahName($inputAddress['village_code'] ?? null, 'village'),
|
||||
'district_code' => $this->getWilayahName($inputAddress['district_code'] ?? null, 'district'),
|
||||
'city_code' => $this->getWilayahName($inputAddress['city_code'] ?? null, 'city'),
|
||||
'province_code' => $this->getWilayahName($inputAddress['province_code'] ?? null, 'province')
|
||||
];
|
||||
|
||||
$alamat = [
|
||||
'address' => $inputAddress['address'] ?? null,
|
||||
'village_code' => $this->getWilayahName($inputAddress['village_code'] ?? null, 'village'),
|
||||
'district_code' => $this->getWilayahName($inputAddress['district_code'] ?? null, 'district'),
|
||||
'city_code' => $this->getWilayahName($inputAddress['city_code'] ?? null, 'city'),
|
||||
'province_code' => $this->getWilayahName($inputAddress['province_code'] ?? null, 'province')
|
||||
];
|
||||
|
||||
$laporan = $lpj->type == 'sederhana' ? true : false;
|
||||
|
||||
$viewLaporan = null;
|
||||
if($laporan){
|
||||
$viewLaporan = 'penilai.components.print-out-sederhana';
|
||||
}else{
|
||||
if ($laporan) {
|
||||
$viewLaporan = 'penilai.components.print-out-sederhana';
|
||||
} else {
|
||||
$viewLaporan = 'penilai.components.print-out-standard';
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ $alamat = [
|
||||
'alamat',
|
||||
'dataPembanding'
|
||||
));
|
||||
}else{
|
||||
} else {
|
||||
$pdf = PDF::loadView('lpj::' . $viewLaporan, compact(
|
||||
'permohonan',
|
||||
'forminspeksi',
|
||||
@@ -673,31 +673,32 @@ $alamat = [
|
||||
|
||||
}
|
||||
|
||||
function getWilayahName($code, $type) {
|
||||
public function getWilayahName($code, $type)
|
||||
{
|
||||
try {
|
||||
$wilayah = null;
|
||||
|
||||
|
||||
if (!$code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch($type) {
|
||||
|
||||
switch ($type) {
|
||||
case 'province':
|
||||
$wilayah = Province::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
|
||||
case 'city':
|
||||
$wilayah = City::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
|
||||
case 'district':
|
||||
$wilayah = District::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
|
||||
case 'village':
|
||||
$wilayah = Village::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -705,6 +706,6 @@ $alamat = [
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -205,20 +205,7 @@
|
||||
|
||||
<body>
|
||||
|
||||
<header id="header">
|
||||
<table style="width: 100%; border: none;">
|
||||
<tr>
|
||||
<td style="width: 20%; text-align: left;" class="header-left">
|
||||
@include('lpj::component.logo-bag')
|
||||
</td>
|
||||
<td style="width: 80%; text-align: center; border: 1px solid black; ">
|
||||
<h3 style="width:100% padding-top: 40px; text-align: center;">LAPORAN PENILAIAN ATAS
|
||||
TANAH
|
||||
DAN/ATAU BANGUNAN</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</header>
|
||||
|
||||
<main class="content">
|
||||
@php
|
||||
$senior_officer = null;
|
||||
@@ -252,10 +239,10 @@
|
||||
@php
|
||||
function generateCustomTanggal()
|
||||
{
|
||||
|
||||
$tahunAwal = rand(20, 30);
|
||||
$bulanTetap = rand(1, 12);
|
||||
$tanggalTetap = rand(1, 28);
|
||||
|
||||
$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);
|
||||
@@ -282,6 +269,18 @@
|
||||
|
||||
|
||||
<div class="header">
|
||||
<table style="width: 100%; border: none;">
|
||||
<tr>
|
||||
<td style="width: 50%; text-align: left;" class="header-left">
|
||||
@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>
|
||||
<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'] }}
|
||||
@@ -855,8 +854,8 @@
|
||||
<label class="checkbox-label">
|
||||
<input type="checkbox"
|
||||
style="
|
||||
margin-right: 3px;
|
||||
|
||||
margin-right: 3px;
|
||||
|
||||
"
|
||||
name="spesifikasi_bangunan[{{ $index }}][{{ $spesifikasi->name }}][]"
|
||||
value="{{ $kategori->name }}"
|
||||
|
||||
Reference in New Issue
Block a user