276 lines
13 KiB
PHP
276 lines
13 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
|
|
<div class="container-fluid">
|
|
<div class="row ">
|
|
<div class="col-md-11 mx-auto card p-4">
|
|
|
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
|
<button type="button" class="btn btn-light" ><a href="javascript:window.history.go(-1);"><h3><i class="fas fa-arrow-alt-circle-left"></i></h3></a></button>
|
|
</div>
|
|
|
|
<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>ID 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>
|
|
@foreach($laporan['details'] as $details)
|
|
<td><b>Nama Cawangan : {{ $details['caw_name']}}</b></td>
|
|
<td><b>Kod Cawangan : {{ $details['caw_code']}}</b></td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
|
|
</thead>
|
|
</table>
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<div class="text-left pt-4">
|
|
<a href="{{ route('lelong.senaraimarhunsimulasi',[$lelongid,$cawid]) }}" class="btn btn-success">Simulasi Lelong</a>
|
|
<a href="{{ route('lelong.listsagbycust',[$lelongid,$cawid]) }}" class="btn btn-success">Senarai Mengikut Nama Pelangan</a>
|
|
</div>
|
|
<form id="deletesag" method="POST">
|
|
@csrf
|
|
<input type="hidden" name="lelongid" value="{{$lelongid}}">
|
|
<input type="hidden" name="cawid" value="{{$cawid}}">
|
|
<table class="table table-striped table-xl" id="marhun" style="width:100%">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>No</th>
|
|
<th>Nama Pelanggan</th>
|
|
<th>No.KP</th>
|
|
<th>No.Rujukan</th>
|
|
<th>Tempoh</th>
|
|
<th>K.Tlh Byr(RM)</th>
|
|
<th>K.6Bulan(RM)</th>
|
|
<th>K.Semasa(RM)</th>
|
|
<th>Pembiayaan Asal(RM)</th>
|
|
<th>Baki Pembiayaan(RM)</th>
|
|
<th>Berat (gm)</th>
|
|
<th>Nilai Marhun (RM)</th>
|
|
<!-- <th>Caj Lelong (%)</th>
|
|
<th>Baki Lelong (RM)</th> -->
|
|
<!-- <th>Tindakan</th> -->
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($marhuns as $index=> $marhun)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</td>
|
|
<td style='word-wrap'>{{ $marhun['nama']['nama']}}</td>
|
|
<td style='word-wrap'>{{ $marhun['nokp']}}</td>
|
|
<td style='word-wrap'>@foreach ($marhun['listsag'] as $item)
|
|
{{$loop->iteration}}. {{ $item['norujukan'] }}<br>
|
|
@endforeach</td>
|
|
<td>@foreach ($marhun['listsag'] as $item)
|
|
{{ $item['tempoh'] }}<br>
|
|
@endforeach</td>
|
|
<td align = 'right'>
|
|
@php $jumktlhbyr = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumktlhbyr = $jumktlhbyr + $item['ktlhbyr'];
|
|
@endphp
|
|
{{ number_format($item['ktlhbyr'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumktlhbyr, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jum6bulan = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jum6bulan = $jum6bulan + $item['bakiupah'];
|
|
@endphp
|
|
{{ number_format($item['bakiupah'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jum6bulan, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jum6bulan = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jum6bulan = $jum6bulan + $item['keuntungan'];
|
|
@endphp
|
|
{{ number_format($item['keuntungan'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jum6bulan, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jumpinjasal = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumpinjasal = $jumpinjasal + $item['pinjaman'];
|
|
@endphp
|
|
{{ number_format($item['pinjaman'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumpinjasal, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jumpinjaman = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumpinjaman = $jumpinjaman + $item['bakipjm'];
|
|
@endphp
|
|
{{ number_format($item['bakipjm'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumpinjaman, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
|
|
<td align = 'right'>
|
|
@php $jumberat = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumberat = $jumberat + $item['berat'];
|
|
@endphp
|
|
{{ number_format($item['berat'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumberat, 2, '.', ',') }}</strong>
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jumnilaimarhun = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumnilaimarhun = $jumnilaimarhun + $item['nilaimarhun'];
|
|
@endphp
|
|
{{ number_format($item['nilaimarhun'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumnilaimarhun, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<!-- <td align = 'right'>
|
|
@php $jumcajlelong = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumcajlelong = $jumcajlelong + $item['cajlelong'];
|
|
@endphp
|
|
{{ number_format($item['cajlelong'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumcajlelong, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
<td align = 'right'>
|
|
@php $jumbaki = 0;@endphp
|
|
@foreach ($marhun['listsag'] as $item)
|
|
@php
|
|
$jumbaki = $jumbaki + $item['baki'];
|
|
@endphp
|
|
{{ number_format($item['baki'], 2, '.', ',') }}<br>
|
|
@endforeach
|
|
<strong>Total: {{ number_format($jumbaki, 2, '.', ',') }}</strong>
|
|
|
|
</td> -->
|
|
|
|
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#btndelete").prop("disabled", true);
|
|
function btnDelete(e) {
|
|
var count = 0;
|
|
tablemarhun.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
|
if($(this).prop('checked') === true)
|
|
{
|
|
count = count + 1;
|
|
}
|
|
// $(this).prop('checked', e.checked);
|
|
})
|
|
if(count != 0)
|
|
{
|
|
$("#btndelete").prop("disabled", false);
|
|
}
|
|
else
|
|
{
|
|
$("#btndelete").prop("disabled", true);
|
|
}
|
|
// let checkbox = $('#checkboxdata').val();
|
|
// console.log(checkbox)
|
|
// $("#btndelete").prop("disabled", checkboxdata.length === 0);
|
|
}
|
|
function confirm() {
|
|
$.confirm({
|
|
title: 'Confirmation',
|
|
content: 'Anda pasti?',
|
|
type: 'red',
|
|
typeAnimated: true,
|
|
buttons: {
|
|
Delete: {
|
|
btnClass: 'btn-danger',
|
|
action: function () {
|
|
$("#deletesag").submit();
|
|
}
|
|
},
|
|
Batal: {
|
|
btnClass: 'btn-default',
|
|
action: function () {}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
var tablemarhun = $('#marhun').DataTable( {
|
|
"columnDefs": [
|
|
{
|
|
"targets": 13,
|
|
"orderable": false
|
|
},
|
|
// {
|
|
// "targets": 4,
|
|
// "orderable": false
|
|
// }
|
|
],
|
|
// order: [[1, 'asc']],
|
|
// "ordering": false,
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 10000000,
|
|
dom: 'Bfrtip',
|
|
// buttons: [
|
|
// // 'copy', 'excel', 'pdf'
|
|
// // { text: 'copy', className: 'btn btn-primary' },
|
|
// {
|
|
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm adduser',
|
|
// text: '<i class="fas fa-plus" id="test"></i>',
|
|
// titleAttr: 'Tambah Pengguna',
|
|
// action: function ( e, dt, node, config ) {
|
|
// alert( 'Button activated' );
|
|
// }
|
|
// },
|
|
// {
|
|
// 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();
|
|
// }
|
|
// }
|
|
// ]
|
|
});
|
|
|
|
</script>
|
|
@endsection
|