notis tamat kontrak pc
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Gadai;
|
||||
use App\Models\GadaiMarhun;
|
||||
use App\Models\Cawangan;
|
||||
@@ -20,37 +22,38 @@ class TamatKontController extends Controller
|
||||
|
||||
}
|
||||
|
||||
public function senaraitemppc(Request $request)
|
||||
public function gadaibycaw(Request $request)
|
||||
{
|
||||
// dd($request->all());
|
||||
$t_lelong = Carbon::parse($request->tarikh_lelong);
|
||||
$bulan = 12;
|
||||
$jbgadai = ($t_lelong->subMonths($bulan))->toDateString();
|
||||
$surat = Gadai::where('t_gadai','<=',$jbgadai)
|
||||
->where('t_matang1','<=','t_lelong')
|
||||
->whereNotNull('upah12')
|
||||
->where('sttebus','=','')
|
||||
->where('tagpalsu','=',0)
|
||||
->where('tagpalsu2','=',0)
|
||||
->where('taglel','=',0)
|
||||
->where('lelong_tawarruq','=',1)
|
||||
->orderBy('norujukan','desc')
|
||||
->get();
|
||||
$user = Auth::user();
|
||||
$t_lelong = $request->tarikh_lelong;
|
||||
$getsurat = Gadai::where('t_matang1', '<', $t_lelong)
|
||||
->where('kodcaw', $user->kodcaw)
|
||||
->where('sttebus', '=', '')
|
||||
->where('taglel', '=', 0)
|
||||
->where('tagpalsu', '=', 0)
|
||||
->where('tagpalsu2', '=', 0)
|
||||
->whereNotNull('upah12')
|
||||
->get();
|
||||
|
||||
if(sizeof($surat) == 0)
|
||||
{
|
||||
return redirect()->route('notistamatkontrak.sebelumtamatkont')
|
||||
->with('failed','Tiada surat untuk di lelong');
|
||||
}
|
||||
|
||||
foreach($surat as $index1=>$surats)
|
||||
foreach($getsurat as $index1=>$surats)
|
||||
{
|
||||
$senarai = Gadai::join('cawangan', 'gadai.kodcaw', '=', 'cawangan.caw_code')
|
||||
->where('norujukan', $surats['norujukan'])
|
||||
->get();
|
||||
->get();
|
||||
|
||||
$getsurat[$index1]['list_norujukan'] = $senarai;
|
||||
}
|
||||
|
||||
return view('jananotis.senaraitemp', compact('t_lelong', 'jbgadai', 'surat'));
|
||||
// $keuntungantlhbyr = TransaksiKeuntungan::on('mysql2')
|
||||
// ->sum('bayaran_keuntungan');
|
||||
|
||||
return view('jananotis.gadaibycaw', compact( 'getsurat',
|
||||
'senarai',
|
||||
't_lelong',
|
||||
'user'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//Operasi
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-12 mx-auto card">
|
||||
<h3 class="pt-3" style="margin-left:1%;">Butiran Gadaian Cawangan {{ $user->kodcaw }}</h3>
|
||||
|
||||
@if ($message = Session::get('failed'))
|
||||
<div class="alert alert-danger">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-striped table-xl text-center" id="senarailelongonline" style="width:100%; margin-top:1%;">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>No Kad Pengenalan</th>
|
||||
<th>Tempoh</th>
|
||||
<th>Berat (gm)</th>
|
||||
<th>Pembiayaan (RM)</th>
|
||||
<th>Baki Pembiayaan (RM)</th>
|
||||
<th>Keuntungan 6 Bulan (RM)</th>
|
||||
<th>Keuntungan Telah Bayar (RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($getsurat as $surat)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['norujukan'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['nokp'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['tempoh'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['berat'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['pinjaman'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['bakipjm'] }}</td>
|
||||
<td>{{ $surat['list_norujukan'][0]['bakiupah'] }}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="modal-footer">
|
||||
<a href="{{ route('jananotis.notistamatkontrak') }}" class="btn btn-primary" style="width:8%;">Kembali</a>
|
||||
</div>
|
||||
</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',
|
||||
// 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
|
||||
@@ -4,14 +4,14 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-md-12 mx-auto card">
|
||||
<h3 class="pt-3">Notis Sebelum Tamat Kontrak</h3>
|
||||
<h3 class="pt-3" style="margin-left:2%;">Notis Sebelum Tamat Kontrak</h3>
|
||||
|
||||
@if ($message = Session::get('failed'))
|
||||
<div class="alert alert-danger">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<form action="{{route('jananotis.notistamatkontrak')}}" method="POST">
|
||||
<form action="{{route('jananotis.gadaibycaw')}}" method="POST" id="formsenarai">
|
||||
@csrf
|
||||
<div class="form-group row" style="margin-top:2%; margin-left:1%;">
|
||||
<label for="tarikh_lelong" class="col-sm-1 col-form-label">Tarikh Lelongan</label>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<div class="form-group row" style="margin-top:2%;">
|
||||
<div class="col-sm-10">
|
||||
<submit class="btn btn-primary" style="width:8%; margin-left:1%;">Carian</submit>
|
||||
<button type="button" class="btn btn-primary" onclick="carian()" style="margin-left:2%; width:9%;">Carian</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -34,7 +34,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function carian() {
|
||||
$("#formsenarai").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -204,6 +204,7 @@ Route::group(['middleware' => ['permission:pengesahanbayaran'],'prefix'=>'accoun
|
||||
Route::group(['middleware' => ['permission:jananotis'],'prefix'=>'jananotis'], function () {
|
||||
Route::get('/notislelong',['as'=>'jananotis.notislelong','uses'=>'NotisController@notislelong']);
|
||||
Route::get('/notistamatkontrak',['as'=>'jananotis.notistamatkontrak','uses'=>'TamatKontController@notistamatkontrak']);
|
||||
Route::post('/gadaibycaw',['as'=>'jananotis.gadaibycaw','uses'=>'TamatKontController@gadaibycaw']);
|
||||
Route::get('/pembida',['as'=>'jananotis.pembida','uses'=>'NotisController@pembida']);
|
||||
Route::get('/senarainotis/{lelong_id}',['as'=>'jananotis.senarainotis','uses'=>'NotisController@senarainotis']);
|
||||
Route::get('/jananotis/{lelong_id}',['as'=>'jananotis.jananotis','uses'=>'NotisController@jananotis']);
|
||||
|
||||
Reference in New Issue
Block a user