Files
lelong/resources/views/pdf/pdflelongreportpc.blade.php
2022-11-23 00:45:41 +08:00

224 lines
7.7 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:hover {}
#sim 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;
}
th{
text-align: center;
padding: 16px;
}
tr:nth-child(even) {
}
</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);
}
</style>
<body>
<header>
@foreach($datacaw as $data)
<u><b><h5>LAPORAN SIMULASI CAWANGAN: {{$data['caw_name']}}</h5></b></u>
@endforeach
</header>
<footer>
<div class="pagenum-container"><span class="pagenum"></span></div>
</footer>
{{-- <table cellspacing="" cellpadding="4" text-align="left" border="0" height="25" align="left" id="sim" class="table table-striped table-xl">
<thead class="bg-light ">
@foreach ($arrayinfo as $laporan)
<tr>
<td><b>Batch Lelong: {{ $laporan['laporan']['lelong_id']}} <b></td>
<td><b>Fasa Lelong: {{ $laporan['laporan']['fasa']}} <b></td>
<td><b>Tarikh Lelong : @php
$myDateTime = DateTime::createFromFormat('Y-m-d', $laporan['laporan']['tarikh_lelong'] );
$datez = $myDateTime->format('d-m-Y');
echo($datez);
@endphp</b></td>
</tr>
@endforeach
</thead>
</table> --}}
<br>
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
<thead>
<tr>
<th>No</th>
<th>No Rujukan</th>
{{-- <th>Nama Pelanggan</th> --}}
<th>Tempoh</th>
<th>Berat (gm)</th>
<th>Nilai Marhun (RM)</th>
<th>Harga Asas (RM)</th>
<th>Pembiayaan (RM)</th>
<th>Keuntungan (RM)</th>
<th>Caj Lelong (%)</th>
{{-- <th>Rugi Lelong (RM)</th> --}}
<th>Baki Lelong (RM)</th>
</tr>
</thead>
<tbody>
@php
$rugilelong = 0;
$bakilelong = 0;
@endphp
@foreach ($marhuns as $index=> $marhun)
<tr>
<td>{{$loop->iteration}}</td>
<td align = 'left' style="white-space: nowrap;">{{ $marhun['norujukan']}}</td>
{{-- <td align = 'left' style="white-space: nowrap;">{{ $marhun['nama']}}</td> --}}
<td >{{ number_format($marhun['jbg'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
<td align = 'right'>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
@php
$rugi = 0;
$baki = 0;
if(strpos($marhun['baki'], '-') !== false)
{
$baki = -$marhun['baki'];
$bakilelong += $marhun['baki'];
}
else {
$baki = $marhun['baki'];
$bakilelong += $marhun['baki'];
}
@endphp
{{-- <td>{{number_format($rugi, 2, '.', ',')}}</td> --}}
<td align = 'right'>@if($marhun['baki'] > 0)
{{number_format($marhun['baki'], 2, '.', ',')}}
@elseif($marhun['baki'] < 0 )
({{number_format(-($marhun['baki']), 2, '.', ',')}})
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3"><b>JUMLAH KESELURUHAN</b></td>
<td align = 'right'><b>{{ number_format($total_berat, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_nilaimarhun, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_hargaasas, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_pinjaman, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_bakiupah, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($total_cazlelong, 2, '.', ',') }}</b></td>
<td align = 'right'><b>{{ number_format($bakilelong, 2, '.', ',') }}</b></td>
</tr>
</tfoot>
</table>
</body>