170 lines
7.6 KiB
PHP
170 lines
7.6 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col-md-12 mx-auto card">
|
|
<!-- @if ($message = Session::get('failed'))
|
|
<div class="alert alert-danger" style="margin-top:1%;">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif -->
|
|
|
|
@if (Session::has('message'))
|
|
<div class="alert alert-info">{{ Session::get('message') }}</div>
|
|
@endif
|
|
|
|
<h3 class="pt-3" style="margin-left:1%;">Butiran Gadaian Mengikut Cawangan Lelongan Fasa {{$fasa}}</h3>
|
|
<form action="{{route('analisa.janadata')}}" method="POST" enctype="multipart/form-data">
|
|
@csrf
|
|
|
|
<input type="hidden" class="form-control" id="fasa" name="fasa" value="{{$fasa}}">
|
|
<div id='loader'></div>
|
|
|
|
<div class="container">
|
|
<div>
|
|
<div style="margin-top:2%; margin-bottom:2%;">
|
|
|
|
<p> <b>Tarikh Lelong : </b> {{ $t_lelong1 }}</p>
|
|
<p> <b>Tarikh Gadai Sehingga : </b> @php
|
|
if($fasa == '1'){
|
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $jbgadai );
|
|
$t_gadai = $myDateTime->format('d-m-Y');
|
|
$t_gadai1 = $myDateTime->format('Y-m-d');
|
|
echo($t_gadai);
|
|
}else{
|
|
$myDateTime = DateTime::createFromFormat('Y-m-d', $t_lelong2 );
|
|
$tarikhlelong = $myDateTime->modify('-12 month')->format('d-m-Y');
|
|
$t_gadai1 = $myDateTime->modify('-12 month')->format('Y-m-d');
|
|
//$t_gadai = $myDateTime->modify('-12 month')->format('Y-m-d');
|
|
echo($tarikhlelong);
|
|
}
|
|
@endphp</p>
|
|
<p> <b>Lelongan Kali Ke -</b> {{ $tetapan->kali }}</p>
|
|
<input type="hidden" class="form-control" id="tarikh_lelong" name="tarikh_lelong" value="{{$t_lelong2}}">
|
|
<input type="hidden" class="form-control" id="t_gadai" name="t_gadai" value="@php echo($t_gadai1) @endphp">
|
|
<input type="hidden" class="form-control" id="jbg" name="jbg" value="{{$jbg}}">
|
|
<input type="hidden" class="form-control" id="hargaasas" name="hargaasas" value="0.00">
|
|
<input type="hidden" class="form-control" id="cajlelong" name="cajlelong" value="{{$cajlelong}}">
|
|
<input type="hidden" class="form-control" id="kali" name="kali" value="{{$tetapan->kali}}">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table class="table table-striped table-xl text-center" id="senaraitemp" style="width:100%">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th><input type="checkbox" aria-label="Checkbox for following text input" class="check_all"></th>
|
|
<th>Kod Cawangan</th>
|
|
<th>Cawangan</th>
|
|
<th>Bil Lelong</th>
|
|
<th>Berat (gm)</th>
|
|
<th>Nilai Marhun</th>
|
|
<th>Pembiayaan (RM)</th>
|
|
<th>Baki Pembiayaan (RM)</th>
|
|
<th class="text-center">Tindakan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($senarai as $send)
|
|
<tr>
|
|
<td><input type="checkbox" aria-label="Checkbox for following text input" name="caw[]" id="caw" value = "{{ $send['kodcaw'] }}" class="custom_name"></td>
|
|
<td>{{ $send['kodcaw'] }}</td>
|
|
<td >{{ $send['caw_name'] }}</td>
|
|
<td>{{ $send['bil_lelong'] }} </td>
|
|
<td>{{ number_format($send['total_berat'], 2) }} </td>
|
|
<td>{{ number_format($send['total_nilaimarhun'], 2) }} </td>
|
|
<td>{{ number_format($send['total_pembiayaan'] , 2) }} </td>
|
|
<td>{{ number_format($send['total_bakipjm'] , 2) }} </td>
|
|
<td>
|
|
<a href=" {{ route('analisa.tempbycawsimulasi', [$send['kodcaw'],$t_gadai1,$fasa]) }} " data-toggle="tooltip" data-placement="top" title="Butiran Gadaian"><i class="far fa-edit"></i></a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="modal-footer; text-center" style="margin-top:2%; margin-bottom:2%;">
|
|
<a href="{{ route('analisa.janasimulasi') }}" class="btn btn-primary" style="width:8%;">Kembali</a>
|
|
<button type="submit" class="btn btn-success">Jana Simulasi</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
//Enable tooltips everywhere
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
})
|
|
var tablesenaraitemp = $('#senaraitempsimulasi').DataTable({
|
|
"columnDefs": [
|
|
{
|
|
"targets": 0,
|
|
"orderable": false
|
|
},
|
|
{
|
|
"targets": 8,
|
|
"orderable": false
|
|
}
|
|
],
|
|
order: [[1, 'asc']],
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 15,
|
|
dom: 'Bfrtip',
|
|
// buttons: [
|
|
// {
|
|
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
|
|
// text: '<i class="fas fa-plus" id="test"></i>',
|
|
// titleAttr: 'Tambah Cawangan',
|
|
// action: function ( e, dt, node, config ) {
|
|
// // alert( 'Button activated' );
|
|
// // console.log('hye');
|
|
|
|
// $('#myModal').modal("show");
|
|
// $('#myModal').on('shown.bs.modal', function () {
|
|
// $('#rolename').trigger('focus')
|
|
// })
|
|
// }
|
|
// },
|
|
// {
|
|
// className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
|
// titleAttr: 'Export to CSV',
|
|
// text: '<i class="fas fa-download"></i>',
|
|
// action: function ( e, dt, node, config ) {
|
|
// $("#exportform").submit();
|
|
// }
|
|
// }
|
|
// ]
|
|
});
|
|
|
|
// $('.addcaw').tooltip();
|
|
// $('.export').tooltip();
|
|
// // $( '.dt-buttons').addClass('btn-group');
|
|
// $( '.addcaw').removeClass('dt-button');
|
|
// $( '.export').removeClass('dt-button');
|
|
</script>
|
|
<script
|
|
src="https://code.jquery.com/jquery-3.4.1.js"
|
|
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
|
crossorigin="anonymous"></script>
|
|
<script>
|
|
$(".check_all").on("click", function(){
|
|
$(".custom_name").each(function(){
|
|
$(this).attr("checked", true);
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
$(function() {
|
|
$( "form" ).submit(function() {
|
|
$('#loader').show();
|
|
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@endsection
|