update list tangguh
This commit is contained in:
@@ -952,7 +952,7 @@ class MarhunController extends Controller
|
||||
$tangguhlelong = TangguhLelong::join('gadaimarhun', 'tangguhlelong.norujukan', '=', 'gadaimarhun.norujukan')
|
||||
->where('gadaimarhun.norujukan', $norujukan)
|
||||
->where('tangguhlelong.id', $tangguhlelong_id)
|
||||
->where('tangguhlelong.lelong_id', $id)
|
||||
// ->where('tangguhlelong.lelong_id', $id)
|
||||
->select('tangguhlelong.id as tangguhlelong_id',
|
||||
'tangguhlelong.lelong_id',
|
||||
'tangguhlelong.lelongbid_id',
|
||||
@@ -970,6 +970,7 @@ class MarhunController extends Controller
|
||||
'gadaimarhun.n_marhun'
|
||||
)
|
||||
->get();
|
||||
// dd($tangguhlelong);
|
||||
|
||||
$caw_names = GadaiMarhun::join('cawangan', 'gadaimarhun.kodcaw', '=', 'cawangan.caw_code')
|
||||
->where('gadaimarhun.norujukan', $norujukan)
|
||||
|
||||
@@ -15,6 +15,7 @@ use App\Models\LelongBidMarhun;
|
||||
use App\Models\CawanganLelong;
|
||||
use App\Models\TangguhLelong;
|
||||
use App\Models\Pengesahan;
|
||||
use App\Models\GadaiMarhun;
|
||||
|
||||
class TangguhLelongController extends Controller
|
||||
{
|
||||
@@ -428,4 +429,39 @@ class TangguhLelongController extends Controller
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function taglelbidmarhun($id, $norujukan, $tangguhlelong_id)
|
||||
{
|
||||
$tangguhlelong = TangguhLelong::join('gadaimarhun', 'tangguhlelong.norujukan', '=', 'gadaimarhun.norujukan')
|
||||
->where('gadaimarhun.norujukan', $norujukan)
|
||||
->where('tangguhlelong.id', $tangguhlelong_id)
|
||||
// ->where('tangguhlelong.lelong_id', $id)
|
||||
->select('tangguhlelong.id as tangguhlelong_id',
|
||||
'tangguhlelong.lelong_id',
|
||||
'tangguhlelong.lelongbid_id',
|
||||
'tangguhlelong.norujukan',
|
||||
'tangguhlelong.pinjaman',
|
||||
'tangguhlelong.tarikhtangguh',
|
||||
'tangguhlelong.nota as tangguh_nota',
|
||||
'tangguhlelong.pinjaman',
|
||||
'gadaimarhun.bil',
|
||||
'gadaimarhun.marhun',
|
||||
'gadaimarhun.nota as gadai_nota',
|
||||
'gadaimarhun.karat',
|
||||
'gadaimarhun.berat',
|
||||
'gadaimarhun.harga',
|
||||
'gadaimarhun.n_marhun'
|
||||
)
|
||||
->get();
|
||||
// dd($tangguhlelong);
|
||||
|
||||
$caw_names = GadaiMarhun::join('cawangan', 'gadaimarhun.kodcaw', '=', 'cawangan.caw_code')
|
||||
->where('gadaimarhun.norujukan', $norujukan)
|
||||
->select('cawangan.caw_name', 'cawangan.caw_code')
|
||||
->first();
|
||||
// dd($caw_names);
|
||||
|
||||
return view('tangguhlelong.taglelbidmarhun',compact('tangguhlelong', 'id', 'norujukan', 'caw_names'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>ID Lelong</th>
|
||||
<th>Cawangan</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Status</th>
|
||||
@@ -26,6 +27,7 @@
|
||||
@foreach($cawangan as $marhun)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $marhun['lelong_id'] }}</td>
|
||||
<td align = 'left'>{{ $marhun['namacaw'] }}</td>
|
||||
<td>{{ $marhun['norujukan'] }}</td>
|
||||
<td>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<td>{{ $tangguhlel->norujukan }}</td>
|
||||
<td>{{ $tangguhlel->nota }}</td>
|
||||
<td>
|
||||
<a href="{{ route('pengesahan.lelbidmarhun', [ $lelong_id, $tangguhlel->norujukan, 'tangguhlelong_id'=>$tangguhlel['details']['tangguhlelong_id'] ]) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
|
||||
<a href="{{ route('tangguhlelong.taglelbidmarhun', [ $lelong_id, $tangguhlel->norujukan, 'tangguhlelong_id'=>$tangguhlel['details']['tangguhlelong_id'] ]) }}" data-toggle="tooltip" data-placement="top" title="Butiran" class="text-center" ><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@@ -45,7 +45,7 @@
|
||||
</table>
|
||||
</form>
|
||||
<div class="modal-footer" style="margin-top:2%;">
|
||||
<a href="{{ route('pengesahan.senarailelong') }}" class="btn btn-primary">Kembali</a>
|
||||
<a href="{{ route('tangguhlelong.senleluntuktangguh') }}" class="btn btn-primary">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-11 mx-auto card p-4">
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="container">
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
|
||||
<p> <b>Norujukan : </b> {{ $tangguhlelong[0]['norujukan'] }}</p>
|
||||
<p> <b>Pembiayaan : </b> {{ $tangguhlelong[0]['pinjaman'] }}</p>
|
||||
<p> <b>Remark : </b> {{ $tangguhlelong[0]['tangguh_nota'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Marhun</th>
|
||||
<th>Karat</th>
|
||||
<th>Berat</th>
|
||||
<th>Harga (RM)</th>
|
||||
<th>Nilai Marhun</th>
|
||||
<th>Nota</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($tangguhlelong as $index1=>$tangguhlel)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tangguhlel->marhun }}</td>
|
||||
<td>{{ $tangguhlel->karat }}</td>
|
||||
<td>{{ $tangguhlel->berat }}</td>
|
||||
<td>{{ $tangguhlel->harga }}</td>
|
||||
<td>{{ $tangguhlel->n_marhun }}</td>
|
||||
<td>{{ $tangguhlel->gadai_nota }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="modal-footer" style="margin-top:2%;">
|
||||
<a href="{{ route('tangguhlelong.listtangguh', [$id, 'caw_code'=>$caw_names->caw_code]) }}" class="btn btn-primary">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
|
||||
var tablelelong = $('#tablelelong').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 8,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
// "ordering": false,
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
// 'copy', 'excel', 'pdf'
|
||||
// { text: 'copy', className: 'btn btn-primary' },
|
||||
{
|
||||
className: 'btn btn-outline-success pl-4 pr-4 btn-sm addsim',
|
||||
text: '<i class="fas fa-plus" id="test"></i>',
|
||||
titleAttr: 'Tambah Simulasi',
|
||||
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();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('.addsim').tooltip();
|
||||
$('.export').tooltip();
|
||||
// $( '.dt-buttons').addClass('btn-group');
|
||||
$( '.addsim').removeClass('dt-button');
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
function selectall(cb) {
|
||||
tablelelong.rows().nodes().to$().find('input[type="checkbox"]').each(function(){
|
||||
$(this).prop('checked', cb.checked);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -268,6 +268,7 @@ Route::group(['middleware' => ['permission:tangguhlelong'],'prefix'=>'tangguhlel
|
||||
Route::post('/searchbyic', ['as'=>'tangguhlelong.searchbyic','uses'=>'TangguhLelongController@searchbyic']);
|
||||
Route::post('/tangguhlelong', ['as'=>'tangguhlelong.tangguhlelong','uses'=>'TangguhLelongController@tangguhlelong']);
|
||||
Route::get('/listtangguh/{lelong_id}/{caw_code}', ['as'=>'tangguhlelong.listtangguh','uses'=>'TangguhLelongController@listtangguh']);
|
||||
Route::get('/taglelbidmarhun/{id}/{norujukan}/{tangguhlelong_id}',['as'=>'tangguhlelong.taglelbidmarhun','uses'=>'TangguhLelongController@taglelbidmarhun']);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user