Files
admin-erahn/resources/views/akaun/laporan_brgkes.blade.php
T
2025-12-02 15:00:01 +08:00

340 lines
7.1 KiB
PHP

<style>
#header {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#header td, #customers th {
padding:4px;
font-size:10px;
}
#header tr:nth-child(even){background-color: #ffffff;}
#header tr:hover {background-color: #ddd;}
#header th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#scan {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#scan td, #scan th {
border-collapse: collapse;
padding: 8px;
font-size:11px;
}
#scan tr:nth-child(even){background-color: #ffffff;}
#scan tr:hover {background-color: #ddd;}
#scan th {
border-collapse: collapse;
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#details td, #details th {
padding: 8px;
font-size:8px;
}
#details tr:nth-child(even){background-color: #ffffff;}
#details tr:hover {background-color: #ddd;}
#details th {
padding-top: 12px;
font-style:bold;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
</style>
<style>
#sign {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#sign td, #sign th {
padding: 8px;
font-size:11px;
text-align: center;
}
#sign tr:nth-child(even){background-color: #ffffff;}
#sign tr:hover {background-color: #ddd;}
#sign th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
padding:4px;
color:black;
}
@media print {
.new-page {
page-break-before: always;
}
}
</style>
<table id="header">
<tr>
</tr>
<tr>
<td style="font-size:20px;font-weight:bold;">{{ $cawangan_detail['namacaw'] }}</td>
<td></td>
</tr>
</table>
<br>
<table id="scan">
<tr>
@php
$api_url = request()->hostname;
@endphp
@if(Str::contains($api_url, 'apiv3.arrahn'))
<th colspan ="5"><b>LAPORAN BARANG KES(arOSv3)</b></th>
@else
<th colspan ="5"><b>LAPORAN BARANG KES</b></th>
@endif
<th> </th>
<th> </th>
<th></th>
</tr>
<tr>
<th colspan="5"><b> TARIKH CETAK:</b>
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $tarikh_cetak);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
@endphp
</th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<th style="width:20px"> <b>TARIKH:</b></th>
<th>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $mula_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
@endphp</th>
<th style="width:20px"> <b>HINGGA:</b></th>
<th>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $hingga_date);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
@endphp</th>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<br>
{{-- <table id="details">
<tr>
<th>Bil</th>
<th>Tarikh</th>
<th>IC Pelanggan</th>
<th>Nama Pelanggan</th>
<th>Norujukan</th>
<th>Alasan</th>
<th>Nilai Marhun(RM)</th>
<th>Pembiayaan</th>
<th>Sebulan</th>
<th>Jumlah</th>
<th>Margin</th>
</tr>
@foreach($polis as $index=>$sh)
<tr>
<td>{{ $loop->iteration}}</td>
<td> {{ $sh['tarikh'] }}</td>
<td> {{ $sh['nokp'] }}</td>
@php
$noic = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/customers/' .$sh['nokp'] )->json();
@endphp
<td> {{ $noic['nama'] }} </td>
<td> {{ $sh['norujukan'] }}</td>
<td> {{ $sh['komen1'] }}</td>
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
<td>{{ number_format($item['pinjaman'],2) }}</td>
@php
$koddaerah = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/daerah/' .$sh['koddaerah'] )->json();
$kodnegeri = Http::withOptions(['verify' => config('app.api_verify')])->get($hostname . '/api/negeri/' .$sh['kodnegeri'] )->json();
@endphp
<td> {{ $koddaerah['namadaerah'] }}</td>
<td> {{ $kodnegeri['negeri'] }}</td>
<td> {{ $sh['sttebus'] }}</td>
<td> {{ $sh['t_update'] }}</td>
</tr>
@endforeach
</table> --}}
{{-- <table id="details">
<tr>
<th>Bil</th>
<th>Tarikh</th>
<th>No Rujukan</th>
<th>Nota</th>
<th>Pembiayaan (RM)</th>
<th>Nilai Marhun (RM)</th>
<th>JBG</th>
<th>Untung (RM)</th>
<th>1% (RM)</th>
<th>Caj Lain (RM)</th>
</tr>
@foreach($palsu as $index => $item)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $item['tarikh'] }}</td>
<td>{{ $item['norujukan'] }}</td>
<td>{{ $item['nota'] }}</td>
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
<td>{{ number_format($item['jbg'], 2) }}</td>
<td>{{ number_format($item['untung'], 2) }}</td>
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
</tr>
@endforeach
</table> --}}
<table id="details">
<tr>
<th>Bil</th>
<th>Tarikh</th>
<th>No Rujukan</th>
<th>Nota</th>
<th>Pembiayaan (RM)</th>
<th>Nilai Marhun (RM)</th>
<th>JBG</th>
<th>Untung (RM)</th>
<th>1% (RM)</th>
<th>Caj Lain (RM)</th>
</tr>
@php $bil = 1; @endphp
@foreach($palsu as $item)
<tr>
<td>{{ $bil++ }}</td>
<td>{{ $item['tarikh'] }}</td>
<td>{{ $item['norujukan'] }}</td>
<td>{{ $item['nota'] }}</td>
<td>{{ number_format($item['pembiayaan'], 2) }}</td>
<td>{{ number_format($item['nilaimarhun'], 2) }}</td>
<td>{{ number_format($item['jbg'], 2) }}</td>
<td>{{ number_format($item['untung'], 2) }}</td>
<td>{{ number_format($item['untungonepercent'], 2) }}</td>
<td>{{ number_format($item['untungcajlain'], 2) }}</td>
</tr>
@endforeach
</table>
<br><br>
<br>
<br><br><br>
<table id="sign">
<tr>
<td></td>
<td colspan="2"> .................................................................. </td>
<td> </td>
<td colspan="2"> .................................................................. </td>
<td> </td>
<td colspan="2">.................................................................. </td>
<td> </td>
</tr>
<tr>
<td></td>
<td colspan="2"><B> Disediakan </B> </td>
<td></td>
<td colspan="2"><B> Disemak </B> </td>
<td> </td>
<td colspan="2"><B> Disahkan </B></td>
<td> </td>
</tr>
</table>