Files
lelong/resources/views/laporan/keseluruhanmarhunpermata_pdf.blade.php
2023-08-23 11:42:35 +08:00

252 lines
10 KiB
PHP

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#sim {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
border-collapse: collapse;
width: 100%;
}
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
border: 0px solid;
padding: 1px;
text-align: left;
}
#sim tr:nth-child(even){}
#sim tr {
border-bottom: 1px black;
}
#sim th {
border: 1px black;
text-align: center;
}
#sim2 th {
text-align: center;
border: 0px solid ;
table-layout:auto;
color: black;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.row {
margin-right:-5px;
margin-right:-5px;
}
.column {
float: right;
width: 100%;
padding: 5px;
}
/* Clearfix (clear floats) */
.row::after {
content: "";
clear: both;
display: table;
}
table {
border-collapse: collapse;
border-spacing: 0;
width: 200%;
border: 0px solid #ddd;
}
td {
/* text-align: right; */
padding: 16px;
border: 1px solid;
}
th{
text-align: center;
padding: 16px;
}
tr:nth-child(even) {
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
<style>
/** Define now the real margins of every page in the PDF **/
body {
margin-top: 1cm;
/* margin-left: 2cm; */
/* margin-right: 2cm; */
margin-bottom: 2cm;
}
/** Define the header rules **/
header {
position: fixed;
top: -1cm;
left: 0cm;
right: 0cm;
height: 0cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
/** Define the footer rules **/
footer {
position: fixed;
bottom: 0cm;
left: 0cm;
right: 0cm;
height: 2cm;
/** Extra personal styles **/
/* background-color: #eaeaea; */
color: black;
text-align: center;
line-height: 1.5cm;
}
footer .pagenum:before {
content: counter(page);
}
.font{
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:12px;
}
</style>
<body>
<header>
<div class="font"><u><b><h5>PENGEMASKINIAN MAKLUMAT BATU PERMATA SEBELUM TAWARRUQ</h5></b></u></div>
</header>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
<br>
<div class="font">CAWANGAN: {{$cawanganDetail}}</div><br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
{{-- <table class="table table-bordered text-center" id="tablenotislelong" style="width:100%"> --}}
<thead class="bg-primary text-white">
<tr>
<th>Bil</th>
<th>No.Rujukan</th>
<th>Batch.No</th>
<th>No.KP</th>
<th>Kuantiti</th>
<th>Tarikh Pembiayaan/Tarikh Gadaian</th>
<th>Tarikh Lelong</th>
<th>Baki Lelong(RM)</th>
<th>Rugi Lelong(RM)</th>
<th>Tempoh Simpanan Batu Permata Selepas Lelong</th>
<th>Marhun Gadai</th>
<th>Marhun Lelong</th>
<th width='100px' height='10px'>Catatan</th>
</tr>
</thead>
<tbody>
{{-- {{dd($senarai[0]['lelong'])}} --}}
@php $jumlahkuantiti = 0; $jumlahbakilelong = 0; $jumlahrugilelong = 0 @endphp
@foreach ($senarai[0]['lelong'] as $index=>$bid)
{{-- {{ \Carbon\Carbon::createFromFormat('created_at', 'd-m-Y')->toDateTimeString() }} --}}
@php
$today = date('Y-m-d');
$get_start_date = new DateTime($today); // New date object
$get_end_date = date('Y-m-d',strtotime($bid['t_lelong']));
$end_date = new DateTime($get_end_date); // New date object
$months = $end_date->diff($get_start_date);
$months1 = $months->format('%y Tahun %m Bulan %d Hari');
$jumlahkuantiti += $bid['kuantiti']
@endphp
<tr>
<td>{{$loop->iteration}}
<td style='white-space:nowrap;'>{{ $bid['norujukan']}}</td>
<td>{{ $bid['batchno']}}</td>
<td>{{ $bid['nokp']}}</td>
<td>{{ $bid['kuantiti']}}</td>
<td>{{ $bid['t_gadai']}}</td>
{{-- <td align="center" style='white-space:nowrap;'> @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid['t_gadai'] );
$t_gadai = $myDateTime->format('d-m-Y');
echo($t_gadai);
@endphp</td> --}}
<td align="center" style='white-space:nowrap;'>@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid['t_lelong'] );
$t_lelong = $myDateTime->format('d-m-Y');
echo($t_lelong);
@endphp</td>
<td align="right">@php if($bid['baki'] > 0){
$bakilelong = $bid['baki'];
echo number_format($bakilelong,2);}
elseif($bid['baki'] < 0){
$bakilelong = '';
echo($bakilelong);}
@endphp
</td>
<td align="right">@php if($bid['baki'] > 0){
$bakilelong = '';
echo($bakilelong);}
elseif($bid['baki'] < 0){
$bakilelong = $bid['baki'];
echo number_format($bakilelong,2);}
@endphp
</td>
<td align="center">{{$months1}}</td>
<td align="center">{{$bid['marhungadai']}}</td>
<td align='left' style='white-space:nowrap;'>
@foreach ($bid['listmarhun'] as $index1=>$bid2)
{{$loop->iteration.'. '.$bid2['marhun'].':'.$bid2['nota']}}<br>
@endforeach
</td>
<td width='42px' height='10px'> </td>
</tr>
@php if($bid['baki'] > 0){
$jumlahbakilelong += $bid['baki'];
}
elseif($bid['baki'] < 0){
$jumlahrugilelong += $bid['baki'];
}
@endphp
@endforeach
</tbody>
<tfoot>
<tr>
<td class="text-center" colspan="4"><b>JUMLAH KESELURUHAN</b></td>
<td class="text-center"><b>{{ $jumlahkuantiti }}</b></td>
<td class="text-center"></td>
<td class="text-center"></td>
<td align="right"><b>{{ number_format($jumlahbakilelong,2) }}</b></td>
<td align="right"><b>{{ number_format($jumlahrugilelong,2) }}</b></td>
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center"></td>
</tr>
</tfoot>
</table>
</div>
</body>