136 lines
5.7 KiB
PHP
136 lines
5.7 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col">
|
|
<div class="card">
|
|
<div class="card-header header-style">
|
|
<div class="card-header header-style">
|
|
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<div class="header-style-title">
|
|
Marhun Permata: {{$cawanganDetail}}<br>
|
|
BatchNo: {{$senarai[0]['batchno']}}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<form id="exportform" action="" method="POST">
|
|
<input type="hidden" name="type" value="User">
|
|
<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>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</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{-- {{dd($senarai[0]['lelong'])}} --}}
|
|
@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');
|
|
|
|
@endphp
|
|
<tr>
|
|
<td>{{$loop->iteration}}
|
|
<td style='white-space:nowrap;'>{{ $bid['norujukan']}}</td>
|
|
<td>{{ $bid['nokp']}}</td>
|
|
<td>{{ $bid['kuantiti']}}</td>
|
|
<td 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 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>@php if($bid['baki'] > 0){
|
|
$bakilelong = $bid['baki'];
|
|
echo($bakilelong);}
|
|
elseif($bid['baki'] < 0){
|
|
$bakilelong = '';
|
|
echo($bakilelong);}
|
|
@endphp
|
|
</td>
|
|
<td>@php if($bid['baki'] > 0){
|
|
$bakilelong = '';
|
|
echo($bakilelong);}
|
|
elseif($bid['baki'] < 0){
|
|
$bakilelong = $bid['baki'];
|
|
echo($bakilelong);}
|
|
@endphp
|
|
</td>
|
|
<td>{{$months1}}</td>
|
|
<td align='left' style='white-space:nowrap;'>
|
|
|
|
@foreach ($bid['listmarhun'] as $index1=>$bid2)
|
|
{{$loop->iteration.'. '.$bid2['marhun'].':'.$bid2['nota']}}<br>
|
|
@endforeach
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
var tablenotislelong = $('#tablenotislelong').DataTable({
|
|
"columnDefs": [
|
|
{
|
|
"targets": 0,
|
|
"orderable": false
|
|
},
|
|
{
|
|
"targets": 3,
|
|
"orderable": false
|
|
}
|
|
],
|
|
order: [[0, 'asc']],
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 99999,
|
|
dom: 'Bfrtip',
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
@endsection
|