220 lines
10 KiB
PHP
220 lines
10 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">
|
|
<a href="{{ route('analisa.senaraimarhunlel',[$simulasi_id,$cawid]) }}" class="header-style-icon">
|
|
<i class="fas fa-arrow-left"></i>
|
|
</a>
|
|
<div class="header-style-title">
|
|
senarai Mengikut Nama Pelanggan : {{ $cawanganDetail->caw_name }}
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if ($message = Session::get('success'))
|
|
<div class="alert alert-success">
|
|
<p>{{ $message }}</p>
|
|
</div>
|
|
@endif
|
|
<div class="mb-3">
|
|
<a href=" {{ route('report.simulasireportbycust',[$simulasi_id,$cawid]) }}" class="btn btn-outline-success">Muat Turun PDF</a>
|
|
<!-- <a href="{{ route('analisa.senaraimarhunlel',[$simulasi_id,$cawid]) }}" class="btn btn-success">Simulasi Lelong</a> -->
|
|
</div>
|
|
<form id="deletesag" action="{{route('analisa.deletemarhunlel')}}" method="POST">
|
|
@csrf
|
|
<input type="hidden" name="simulasi_id" value="{{$simulasi_id}}">
|
|
<input type="hidden" name="cawid" value="{{$cawid}}">
|
|
<table class="table text-center table-bordered" id="marhun">
|
|
<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>Berat Asal(gm)</th>
|
|
<th>Nilai Marhun Asal(RM)</th>
|
|
<th>Pembiayaan Asal (RM)</th>
|
|
<th>Baki Pembiayaan (RM)</th>
|
|
<th>Keuntungan 6 Bulan (RM)</th>
|
|
<th>Keuntungan Telah Bayar (RM)</th>
|
|
<th>Keuntungan Semasa (RM)</th>
|
|
|
|
|
|
<!-- <th>Harga Asas (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' align="left">{{ $marhun['nama']['nama']}}</td>
|
|
<td style='word-wrap'>{{ $marhun['nokp']}}</td>
|
|
<td style='white-space:nowrap;'>@foreach ($marhun['listsag'] as $item)
|
|
{{-- {{$loop->iteration}}.{{ $item['norujukan'] }}<br> --}}
|
|
{{ $item['norujukan'] }}<br>
|
|
@endforeach</td>
|
|
<td>@foreach ($marhun['listsag'] as $item)
|
|
{{ $item['tempoh'] }}<br>
|
|
@endforeach</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>{{ 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>{{ number_format($jumnilaimarhun, 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>{{ 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>{{ number_format($jumpinjaman, 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>{{ number_format($jum6bulan, 2, '.', ',') }}</strong>
|
|
|
|
</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>{{ number_format($jumktlhbyr, 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>{{ number_format($jum6bulan, 2, '.', ',') }}</strong>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</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({
|
|
"scrollX": true,
|
|
"info": false,
|
|
"paging": false,
|
|
"pageLength": 5000,
|
|
});
|
|
|
|
</script>
|
|
@endsection
|