148 lines
6.5 KiB
PHP
148 lines
6.5 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>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>
|
|
@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('lelonghargajual.senaraimarhunkhasbelumjual',[$lelongid,$cawid]) }}" class="btn btn-success">Belum Jual</a>
|
|
<a href="{{ route('lelonghargajual.senaraimarhunkhastelahjual',[$lelongid,$cawid]) }}" class="btn btn-success">Telah Jual</a>
|
|
<a href="{{ route('lelonghargajual.resitpemenang',[$lelongid,$cawid]) }}" class="btn btn-success">Resit Pemenang</a>
|
|
|
|
</div>
|
|
<form id="deletesag" action="{{route('lelonghargajual.deletemarhun')}}" 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>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>
|
|
{{-- <th>Tindakan</th> --}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($arraymarhun as $index=> $marhun)
|
|
<tr>
|
|
<td>{{$loop->iteration}}</td>
|
|
<td><a href=" {{ route('lelonghargajual.tambahhargajual',['norujukan'=>$marhun['norujukan']]) }} " target="blank" style="color:#3490dc">{{ $marhun['norujukan']}}</a></td>
|
|
<td>{{ $marhun['nama']}}</td>
|
|
<td>{{ number_format($marhun['tempoh'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['berat'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['nilaimarhun'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['hargaasas'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['pinjaman'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['bakiupah'], 2, '.', ',') }}</td>
|
|
<td>{{ number_format($marhun['cajlelong'], 2, '.', ',') }}</td>
|
|
<?php
|
|
$rugi = 0;
|
|
$baki = 0;
|
|
if (strpos($marhun['baki'], '-') !== false) {
|
|
$rugi = $marhun['baki'];
|
|
} else {
|
|
$baki = $marhun['baki'];
|
|
}
|
|
?>
|
|
<td>{{number_format($rugi, 2, '.', ',')}}</td>
|
|
<td>{{number_format($baki, 2, '.', ',')}}</td>
|
|
|
|
{{-- <td class="text-center">
|
|
<input type="checkbox" aria-label="Checkbox for following text input" id="checkboxdata[]" name="checkboxdata[]" value="{{ $marhun['norujukan'] }}">
|
|
</td> --}}
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
<div class="text-right pt-4">
|
|
{{-- <a href="{{ route('lelong.show',$lelongid) }}" class="btn btn-primary">Kembali</a> --}}
|
|
{{-- <button type="button" class="btn btn-danger" onclick="confirm()">Hapus</button> --}}
|
|
</div>
|
|
{{-- <a href="{{url('lelong/senarailelong')}}" class="btn btn-primary">Kembali</a> --}}
|
|
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
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({
|
|
"info": false,
|
|
"lengthChange": false,
|
|
"pageLength": 999999,
|
|
dom: 'Bfrtip',
|
|
});
|
|
</script>
|
|
@endsection
|