add senarai belum tuntut baki dlm page operasi
This commit is contained in:
@@ -1905,6 +1905,10 @@ Sekian, terima kasih.';
|
||||
$pdf = PDF::loadView('pdf.pdfnotistuntutbaki', compact('marhuns', 'lelong_id', 'caw', 'tarikh_cetak','taxation'))
|
||||
->setPaper('a4', 'potrait');
|
||||
|
||||
$updatestatus = CawanganLelong::where('lelong_id', '=', $lelong_id)->where('caw_id', '=', $caw->id)->first();
|
||||
$updatestatus->status = 1; //jana pdf tuntutbaki
|
||||
$updatestatus->save();
|
||||
|
||||
return $pdf->download('Penjanaan Notis Tuntut Baki ' . $lelong_id . '.pdf');
|
||||
}
|
||||
|
||||
@@ -1989,6 +1993,68 @@ Sekian, terima kasih.';
|
||||
|
||||
}
|
||||
|
||||
Public function listnotistuntutbaki (){
|
||||
|
||||
$cawangan_all = Cawangan::with(['cawanganLelong'])
|
||||
->withCount(['cawanganLelong' => function ($query) {
|
||||
$query->where('export_data_sts', 'SUCCESS');
|
||||
}])
|
||||
->orderBy('caw_name','ASC')
|
||||
->get();
|
||||
// dd($cawangan_all);
|
||||
foreach($cawangan_all as $index3=>$cawangan){
|
||||
$cawangan_all_groupby_caw = $cawangan->groupBy('caw_code');
|
||||
|
||||
$cawangan_all[$index3]["cawangan_info"] = $cawangan;
|
||||
}
|
||||
return view('parameter.listnotistuntutbaki',compact('cawangan_all'));
|
||||
}
|
||||
|
||||
Public function listnotistuntutbakidetail ($cawid){
|
||||
|
||||
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan.id','=',$cawid)
|
||||
->where('lelong.sts_lelong','=', 3)
|
||||
->orderby('lelong.tarikh_lelong','DESC')
|
||||
->get();
|
||||
// dd($lelongid);
|
||||
$cawanganDetail = Cawangan::where('id', $cawid)->first();
|
||||
foreach($lelongid as $index1=>$bil){
|
||||
$lel = Lelong::with('cawangan')->find($bil['lelong_id']);
|
||||
// dd($bil['lelong_id']);
|
||||
$cawanganDetail = $lel->cawangan->find($cawid);
|
||||
$lelong_id = $bil['lelong_id'];
|
||||
$caw = Cawangan::with(["lelongBid" => function($q) use ($lelong_id){
|
||||
$q->where('lelong_id', '=', $lelong_id)->select('id','caw_id','kodcaw','norujukan','pinjaman','bakiupah','hargaasas','nilaimarhun','cajlelong','baki');
|
||||
}])
|
||||
->where('caw_code','=',$cawanganDetail->caw_code)->first();
|
||||
// dd($caw);
|
||||
|
||||
$lelongbid_data_pluck_norujukan = $caw->lelongBid->pluck('norujukan')->toArray();
|
||||
// $listsag = LelongBid::where('lelong_id', $bil['lelong_id'])
|
||||
// ->where('kodcaw','=',$user->kodcaw)
|
||||
// ->get();
|
||||
$listsag = LelongCawangan::on($cawanganDetail->caw_code)->whereIn('lelong.norujukan', $lelongbid_data_pluck_norujukan)
|
||||
->join('gadai','gadai.norujukan','=','lelong.norujukan')
|
||||
->select('lelong.trkhtuntut','gadai.nokp','lelong.jbg','lelong.norujukan','lelong.berat','lelong.nilaimarhun','lelong.pinjaman','lelong.bakiupah','lelong.kadarupah','lelong.bakipjm','gadai.tempoh','gadai.tempohbayar','gadai.sttebus')
|
||||
->where('trkhtuntut','=',null)
|
||||
->where('baki','>', '0.00')
|
||||
->orderBy('norujukan','ASC')
|
||||
->get();
|
||||
// dd($cawanganDetail->caw_code);
|
||||
|
||||
$lelongid[$index1]['bilangan'] = sizeof($listsag);
|
||||
// dd(sizeof($listsag));
|
||||
|
||||
}
|
||||
$caw_id = $cawid;
|
||||
|
||||
return view('parameter.listnotistuntutbakidetail',compact('lelongid','caw_id','cawanganDetail'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -778,6 +778,11 @@
|
||||
<a href="{{url('parameter/kemaskininotistuntutbaki')}}">Notis Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-unstyled collapse {{ (request()->is('parameter/*')) ? 'show' : '' }}" id="parameterSubmenu">
|
||||
<li class="{{ (request()->is('parameter/listnotistuntutbaki/*') || request()->is('parameter/listnotistuntutbaki') ) ? 'active' : '' }}">
|
||||
<a href="{{url('parameter/listnotistuntutbaki')}}">Senarai Belum Tuntut Baki</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endhasrole
|
||||
@hasrole('jurulelong')
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="col mx-auto p-4">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<a href="{{ route('jananotis.notistuntutbaki') }}" class="header-style-icon">
|
||||
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header header-style">
|
||||
<div class="header-style-title">
|
||||
Senarai Cawangan Belum Tuntut Baki
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-bordered table-xl" id="tablenotislelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Bilangan</th>
|
||||
<th>Senarai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($cawangan_all as $bid)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>
|
||||
|
||||
<b>{{ $bid->cawangan_info->caw_name}}</b>
|
||||
</td>
|
||||
<td><span class="badge badge-pill badge-info text-white" style="font-size:100%"> {{ $bid->cawangan_lelong_count}}</span></td>
|
||||
<td><a class="btn btn-success btn-sm m-1" href="{{ route('parameter.listnotistuntutbakidetail',['cawid'=>$bid->cawangan_info->id]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Lelong"><i class="fas fa-list"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//Enable tooltips everywhere
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
var tablenotislelong = $('#tablenotislelong').DataTable({
|
||||
order: [[0, 'asc']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 99,
|
||||
dom: 'Bfrtip',
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,124 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header header-style">
|
||||
<a href="javascript:window.history.go(-1);" class="header-style-icon">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="header-style-title">
|
||||
Senarai Notis Tuntut baki : {{$cawanganDetail->caw_name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@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 text-center table-bordered" 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>Batch Lelong</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>Fasa</th>
|
||||
<th>Bilangan SAG <br>Belum Tuntut</th>
|
||||
<th class="text-center">Tindakan</th>
|
||||
<th class="text-center">Status Jana PDF</th>
|
||||
<th class="text-center">Status Whatsapp</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> @php
|
||||
$myDateTime = DateTime::createFromFormat('Y-m-d', $bid->tarikh_lelong );
|
||||
$datez = $myDateTime->format('d-m-Y');
|
||||
echo($datez);
|
||||
@endphp</td>
|
||||
<td>{{ $bid->fasa }}</td>
|
||||
<td>{{ $bid['bilangan'] }}</td>
|
||||
<td class="text-center">
|
||||
<a class="btn m-1 btn-primary" href="{{ route('parameter.senaraituntutbaki',['lelongid'=>$bid->lelong_id,'cawid'=>$bid['caw_id']]) }}" data-toggle="tooltip" data-placement="top" title="Butiran Senarai Notis" ><i class="far fa-edit"></i></a>
|
||||
<span>
|
||||
</td>
|
||||
<td>@if($bid['status'] == '1')
|
||||
<span class="badge badge-pill badge-info text-white" style="font-size:100%"><i class="fas fa-download"></i></span><br>
|
||||
@endif</td>
|
||||
<td>@if($bid['bilblast'] > '0')
|
||||
<span class="badge badge-pill badge-success text-white" style="font-size:100%"><i class="fas fa-phone"></i></span><br>
|
||||
@endif</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: [[0, 'DESC']],
|
||||
"info": false,
|
||||
"lengthChange": false,
|
||||
"pageLength": 15,
|
||||
dom: 'Bfrtip',
|
||||
// buttons: [
|
||||
// {
|
||||
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm addcaw',
|
||||
// text: '<i class="fas fa-plus" id="test"></i>',
|
||||
// titleAttr: 'Tambah Cawangan',
|
||||
// action: function ( e, dt, node, config ) {
|
||||
// // alert( 'Button activated' );
|
||||
// // console.log('hye');
|
||||
|
||||
// $('#myModal').modal("show");
|
||||
// $('#myModal').on('shown.bs.modal', function () {
|
||||
// $('#rolename').trigger('focus')
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// 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();
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
});
|
||||
|
||||
// $('.addcaw').tooltip();
|
||||
// $('.export').tooltip();
|
||||
// // $( '.dt-buttons').addClass('btn-group');
|
||||
// $( '.addcaw').removeClass('dt-button');
|
||||
// $( '.export').removeClass('dt-button');
|
||||
</script>
|
||||
@endsection
|
||||
@@ -686,4 +686,7 @@ Route::group(['middleware' => ['permission:reportbycaw'],'prefix'=>'reportbycaw'
|
||||
Route::get('/kemaskininotistuntutbaki',['as'=>'parameter.kemaskininotistuntutbaki','uses'=>'NotisController@kemaskininotistuntutbaki']);
|
||||
Route::post('/storeparabaki',['as'=>'parameter.storeparabaki','uses'=>'NotisController@storeparabaki']);
|
||||
Route::post('/storeparabaki2',['as'=>'parameter.storeparabaki2','uses'=>'NotisController@storeparabaki2']);
|
||||
Route::get('/listnotistuntutbaki',['as' =>'parameter.listnotistuntutbaki','uses'=>'NotisController@listnotistuntutbaki']);
|
||||
Route::get('/listnotistuntutbakidetail/{cawid}',['as'=>'parameter.listnotistuntutbakidetail','uses'=>'NotisController@listnotistuntutbakidetail']);
|
||||
Route::get('/senaraituntutbaki/{lelongid}/{cawid}', ['as'=>'parameter.senaraituntutbaki','uses'=>'NotisController@senaraituntutbaki']);
|
||||
});
|
||||
Reference in New Issue
Block a user