laporan senarai lelong
This commit is contained in:
@@ -685,5 +685,68 @@ class LelongController extends Controller
|
||||
return redirect()->route('lelong.senaraimarhun',['lelongid'=>$request->lelongid,'cawid'=>$request->cawid])
|
||||
->with('success','Delete Berjaya');
|
||||
}
|
||||
|
||||
|
||||
public function laporansenarailelong(Request $request){
|
||||
|
||||
// $user = Auth::user();
|
||||
|
||||
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
// ->where('cawangan.caw_code','=',$user->kodcaw)
|
||||
->get();
|
||||
|
||||
return view('lelong.laporanlelong',compact('lelongid'));
|
||||
}
|
||||
|
||||
public function senaraibrglelong($lelong_id){
|
||||
|
||||
$lelong_id = $lelong_id;
|
||||
$nilai_marhun = 0;
|
||||
|
||||
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->get()->toArray();
|
||||
|
||||
// $harga_asas = $harga_asas +
|
||||
// $nilai_marhun = $nilai_marhun + ($brglelong->sum('n_marhun'));
|
||||
|
||||
|
||||
// $bayaran=0;
|
||||
// foreach($brglelong as $index1=>$pay)
|
||||
// {
|
||||
// $bayaran = $pay['hargajualan'] - $pay['bakihargajualan'];
|
||||
// }
|
||||
|
||||
// $brglelong[$index1]['payment'] = $brglelong;
|
||||
// $brglelong[$index1]['bayaran_keuntungan'] = $bayaran;
|
||||
|
||||
return view('lelong.senaraibrglelong',compact('brglelong','lelong_id'));
|
||||
|
||||
}
|
||||
|
||||
public function pdfsenarailelong(Request $request){
|
||||
|
||||
$lelong_id = $request->lelongid;
|
||||
|
||||
// $nilai_marhun = 0;
|
||||
|
||||
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->get()->toArray();
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.listlelong',compact('brglelong'))
|
||||
->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf->download('Senarai Lelong.pdf');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,9 @@
|
||||
<li class="{{ (request()->is('lelong/senarailelong/*') || request()->is('lelong/senarailelong') ) ? 'active' : '' }}">
|
||||
<a href="{{url('lelong/senarailelong')}}">Senarai Lelong</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
|
||||
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endhasrole
|
||||
@@ -110,6 +113,9 @@
|
||||
<li class="{{ (request()->is('lelong/senarailelongtaklaku/*') || request()->is('lelong/senarailelongtaklaku') ) ? 'active' : '' }}">
|
||||
<a href="{{url('lelong/senarailelongtaklaku')}}">Senarai Lelong Tak Laku</a>
|
||||
</li>
|
||||
<li class="{{ (request()->is('lelong/laporansenarailelong/*') || request()->is('lelong/laporansenarailelong') ) ? 'active' : '' }}">
|
||||
<a href="{{url('lelong/laporansenarailelong')}}">Laporan Senarai Lelong</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{{ (request()->is('Pengesahan/*')) ? 'active' : '' }}">
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
@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
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-striped table-xl" id="tablenotislelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th><input type="checkbox" aria-label="Checkbox for following text input" onclick="selectall(this)"></th>
|
||||
<th>Lelong ID</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th class="text-center">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($lelongid as $bid)
|
||||
<tr>
|
||||
<td><input type="checkbox" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $bid->id }}"></td>
|
||||
<td>{{ $bid->lelong_id}}</td>
|
||||
<td>{{ $bid->caw_name}}</td>
|
||||
<td>{{ $bid->tarikh_lelong }}</td>
|
||||
<td class="text-center">
|
||||
{{-- <a href="{{ route('jananotis.jananotis',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Muat Turun Senarai Barang Lelong " style="margin-right:40px" ><i class="fas fa-download"></i></a> --}}
|
||||
<a href="{{ route('lelong.senaraibrglelong',$bid->lelong_id) }}" data-toggle="tooltip" data-placement="top" title="Senarai Barang Lelong" ><i class="far fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
var tablenotislelong = $('#tablenotislelong').DataTable({
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 3,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
order: [[1, 'asc']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,96 @@
|
||||
@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
|
||||
<form id="exportform" action="{{route('lelong.pdfsenarailelong')}}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="User">
|
||||
<input type="hidden" name="lelongid" value="{{ $lelong_id }}">
|
||||
|
||||
<table class="table table-striped table-xl text-center" id="notis" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Harga Asas</th>
|
||||
<th>Upah</th>
|
||||
<th>JBG</th>
|
||||
<th>Nilai Marhun Asal</th>
|
||||
<th>Pinjaman</th>
|
||||
<th>Marhun</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($brglelong as $brg)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td>{{ $brg['norujukan']}}</td>
|
||||
<td>{{$brg['hargaasas']}}</td>
|
||||
<td>{{$brg['upahsimpan']}}</td>
|
||||
<td>{{ $brg['jbg']}}</td>
|
||||
<td>{{ $brg['nilaimarhun']}}</td>
|
||||
<td>{{ $brg['pinjaman']}}</td>
|
||||
<td>{{ $brg['marhun']}}</td>
|
||||
{{-- <td>{{ $bayaran}}</td> --}}
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="modal-footer" style="margin-top:2%;">
|
||||
<a href="{{ route('lelong.laporansenarailelong') }}" class="btn btn-primary">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var tablelelongbid= $('#notis').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": 0,
|
||||
"orderable": false
|
||||
},
|
||||
{
|
||||
"targets": 5,
|
||||
"orderable": false
|
||||
}
|
||||
],
|
||||
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
|
||||
|
||||
{
|
||||
className: 'btn btn-outline-secondary pl-4 pr-4 btn-sm export',
|
||||
titleAttr: 'Download to PDF',
|
||||
text: '<i class="fas fa-download"></i>',
|
||||
action: function ( e, dt, node, config ) {
|
||||
$("#exportform").submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
$('.export').tooltip();
|
||||
$( '.export').removeClass('dt-button');
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,145 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<style>
|
||||
#sim {
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size:10px;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#sim td {padding:3px 5px 3px 5px; padding-right:10px;}, #sim th {
|
||||
border: 0px solid;
|
||||
padding: 1px;
|
||||
text-align: left;
|
||||
|
||||
}
|
||||
|
||||
#sim tr:nth-child(even){}
|
||||
|
||||
#sim tr:hover {}
|
||||
|
||||
#sim th {
|
||||
text-align: left;
|
||||
border: 0px solid;
|
||||
table-layout:auto;
|
||||
color: black;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-left:-5px;
|
||||
margin-right:-5px;
|
||||
}
|
||||
|
||||
.column {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
/* Clearfix (clear floats) */
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 200%;
|
||||
border: 0px solid #ddd;
|
||||
}
|
||||
|
||||
th, td {
|
||||
text-align: left;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<table width="100%" border="0" id="sim">
|
||||
<tr>
|
||||
<td width="50%"><h3>PERMODALAN KELANTAN BERHAD</h3></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><u><b>LAPORAN SENARAI LELONGAN</b></u></td>
|
||||
<td colspan="2"><u><b>{{$lelong_id}}</b></u></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="5" style="float:right;" border="0" width="100%" height="80" align="left" id="sim">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%" align="left">No</th>
|
||||
<th width="15%" align="left">No Rujukan</th>
|
||||
<th width="10%" align="left">Harga Asas</th>
|
||||
<th width="10%" align="left">Keuntungan</th>
|
||||
<th width="7%" align="left">Jbg</th>
|
||||
<th width="15%" align="left">Nilai Marhun Asal(RM)</th>
|
||||
<th width="12%" align="left">Pembiayaan(RM)</th>
|
||||
<th width="10%" align="left">Marhun</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
@foreach($brglelong as $brg)
|
||||
<tr>
|
||||
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
|
||||
<td>{{ $brg['norujukan'] }}</td>
|
||||
<td>{{ ($brg['norujukan']) }}</td>
|
||||
<td>{{ number_format($brg['hargaasas'], 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($brg['upahsimpan'], 2, '.', ',') }}</td>
|
||||
|
||||
|
||||
<td>{{ number_format($brg['nilaimarhun'], 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($brg['pinjaman'], 2, '.', ',') }}</td>
|
||||
<td>{{ ($brg['marhun']) }}</td>
|
||||
|
||||
|
||||
@endforeach
|
||||
|
||||
|
||||
{{-- <tr>
|
||||
<td colspan="3" align="left"><strong>Jumlah Keseluruhan</strong></td>
|
||||
<td></td>
|
||||
<td>{{ number_format($total_berat, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_nmarhun, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_pinjaman, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_upah, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_hargaasas, 2, '.', ',') }}</td>
|
||||
<td>{{ number_format($total_cazlelong, 2, '.', ',') }}</td>
|
||||
<td></td> --}}
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<style>
|
||||
|
||||
.letter{
|
||||
font-family:'Times New Roman', Times, serif;
|
||||
|
||||
}
|
||||
|
||||
.row::after {
|
||||
content: "";
|
||||
clear: both;
|
||||
display: table;
|
||||
|
||||
}
|
||||
|
||||
.first-prgph{
|
||||
|
||||
float: left;
|
||||
width: 10%;
|
||||
padding: 2px;
|
||||
}
|
||||
.first-prgph1{
|
||||
|
||||
float: left;
|
||||
width: 30%;
|
||||
padding-left: 50px;
|
||||
}
|
||||
.page-break {
|
||||
page-break-before: always;
|
||||
}
|
||||
.name{
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<div class = "letter">
|
||||
|
||||
<div class="row">
|
||||
<div class="first-prgph">
|
||||
<img src="{{ asset('img/icon_pkb.png') }}" alt="PKB LOGO" width="100" height="100">
|
||||
</div>
|
||||
|
||||
<div class="first-prgph1">
|
||||
<p> {{$caw['caw_name']}}<br>
|
||||
{{$caw['alamat1']}}<br>
|
||||
{{$caw['alamat2']}}<br>
|
||||
No Tel: {{$caw['notel']}}<br>
|
||||
No Faks: {{$caw['nofaks']}}
|
||||
</p><br>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
|
||||
<table width="100%" height="168" id="customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left">No</th>
|
||||
<th align="left">No Rujukan</th>
|
||||
<th align="left">JBG</th>
|
||||
<th align="left">No KP</th>
|
||||
<th align="left">Pembiayaan</th>
|
||||
<th align="left">Keuntungan 6 Bulan</th>
|
||||
<th align="left">Bayaran Telah Dibuat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($brglelong as $brg)
|
||||
<tr>
|
||||
<td align="left">{{ $loop->iteration }} </td>
|
||||
<td align="left">{{ $pay['norujukan']}}</td>
|
||||
<td align="left">{{ $pay['hargaasas']}}</td>
|
||||
<td align="left">{{ $pay['upahpinjam']}}</td>
|
||||
<td align="left">{{ $pay['nilaimarhun']}}</td>
|
||||
<td align="left">{{ $pay['pinjaman']}}</td>
|
||||
<td align="left">{{ $pay['marhun']}}</td>
|
||||
|
||||
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
@@ -86,6 +86,13 @@ Route::group(['prefix'=>'lelong'], function () {
|
||||
Route::get('/deletelelong/{id}',['as'=>'lelong.delete','uses'=>'LelongController@delete']);
|
||||
Route::get('/export/{id}',['as'=>'lelong.exportnotis','uses'=>'LelongController@exportnotis']);
|
||||
Route::get('/janapemenang/{id}', ['as'=>'lelong.janapemenang','uses'=>'LelongController@janapemenang']);
|
||||
Route::get('/laporansenarailelong',['as'=>'lelong.laporansenarailelong','uses'=>'LelongController@laporansenarailelong']);
|
||||
Route::get('/senaraibrglelong/{lelong_id}',['as'=>'lelong.senaraibrglelong','uses'=>'LelongController@senaraibrglelong']);
|
||||
Route::post('/pdfsenarailelong',['as'=>'lelong.pdfsenarailelong','uses'=>'LelongController@pdfsenarailelong']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Route::get('/senaraimarhun/{lelongid}/{cawid}', ['as'=>'lelong.senaraimarhun','uses'=>'LelongController@senaraimarhun']);
|
||||
Route::post('/deletemarhun', ['as'=>'lelong.deletemarhun','uses'=>'LelongController@deletemarhun']);
|
||||
|
||||
Reference in New Issue
Block a user