fasa2lelong
This commit is contained in:
@@ -1587,7 +1587,7 @@ class KhazanahController extends Controller
|
||||
}
|
||||
|
||||
public function cetaklaporanLelongan(Request $request){
|
||||
// dd($request);
|
||||
// dd($request->all());
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user();
|
||||
$current = Carbon::now();
|
||||
@@ -1596,7 +1596,15 @@ class KhazanahController extends Controller
|
||||
|
||||
if($request->jeniscetakan === 'cetak')
|
||||
{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'],['batchno' => $request->batchno])->json();
|
||||
if($request->fasa == 1)
|
||||
{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa1',['batchno' => $request->batchno])->json();
|
||||
}else{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa2',['batchno' => $request->batchno])->json();
|
||||
}
|
||||
|
||||
// $lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'],['batchno' => $request->batchno])->json();
|
||||
|
||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
@@ -1605,7 +1613,12 @@ class KhazanahController extends Controller
|
||||
}else if($request->jeniscetakan === 'excel')
|
||||
{
|
||||
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'],['batchno' => $request->batchno])->json();
|
||||
if($request->fasa == 1)
|
||||
{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa1',['batchno' => $request->batchno])->json();
|
||||
}else{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa2',['batchno' => $request->batchno])->json();
|
||||
}
|
||||
$cawangan=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
$cawangan_detail=$cawangan[0];
|
||||
|
||||
@@ -1613,7 +1626,14 @@ class KhazanahController extends Controller
|
||||
|
||||
}else if($request->jeniscetakan === 'pdf'){
|
||||
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'],['batchno' => $request->batchno])->json();
|
||||
if($request->fasa == 1)
|
||||
{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa1',['batchno' => $request->batchno])->json();
|
||||
$fasa = 'fasa1';
|
||||
}else{
|
||||
$lelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/laporan/'. $auth_user['cawangan'] . '/' . 'fasa2',['batchno' => $request->batchno])->json();
|
||||
$fasa = 'fasa2';
|
||||
}
|
||||
$notislelong = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/details/notislelong/'. $auth_user['cawangan'])->json();
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$cawangan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
|
||||
@@ -1621,8 +1641,8 @@ class KhazanahController extends Controller
|
||||
|
||||
// return view('print.notislelong', compact('cawangan_info','notislelong','api_url','cawangan_detail','lelong','tarikh_cetak'));
|
||||
|
||||
$pdf=PDF::loadView('print.notislelong', compact('cawangan_info','notislelong','api_url','cawangan_detail','lelong','tarikh_cetak'))->setPaper('A4','potrait');
|
||||
return $pdf->download('notislelong_'.$tarikh_cetak.'.pdf');
|
||||
$pdf=PDF::loadView('print.notislelong', compact('cawangan_info','notislelong','api_url','cawangan_detail','lelong','fasa','tarikh_cetak'))->setPaper('A4','potrait');
|
||||
return $pdf->download('notislelong_'.$tarikh_cetak.'_'.$fasa.'.pdf');
|
||||
|
||||
// return $pdf->stream('notislelong_'.$tarikh_cetak.'.pdf');
|
||||
// return view('print.notislelong', compact('cawangan_info','api_url','cawangan_detail','lelong','tarikh_cetak'));
|
||||
@@ -3558,30 +3578,5 @@ class KhazanahController extends Controller
|
||||
return view('khazanah.status', compact('cawangan_info','api_url','permohonan','getdescription'));
|
||||
|
||||
}
|
||||
|
||||
public function TriggerBakiPetiBesi(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
$tarikhsemasa = $current->toDateString();
|
||||
|
||||
$cawangan = CawanganAR::where('kodcaw','KB2')->get()->toArray();
|
||||
$getVault = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/TunaiDiTangan/' . 'KB2',['tarikh' => $tarikhsemasa])->json();
|
||||
|
||||
if(floatval($getVault) > $cawangan[0]['max'])
|
||||
{
|
||||
session(['status' => 'max']);
|
||||
event(new NotifikasiPetiBesi('KB2','max',$getVault));
|
||||
|
||||
}else if(floatval($getVault) < $cawangan[0]['min'])
|
||||
{
|
||||
session(['status' => 'min']);
|
||||
event(new NotifikasiPetiBesi('KB2','min',$getVault));
|
||||
}else{
|
||||
echo 'tiada';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,9 +41,10 @@ class LelongController extends Controller
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
$senaraibatch = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/aktif/'. $auth_user['cawangan'])->json();
|
||||
$senaraibatchfasa1 = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/aktif/'. $auth_user['cawangan'] . '/' . 'fasa1')->json();
|
||||
$senaraibatchfasa2 = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url'). '/api/senaraibatch/aktif/'. $auth_user['cawangan'] . '/' . 'fasa2')->json();
|
||||
|
||||
return view('khazanah.lelong',compact('cawangan_info','api_url','senaraibatch'));
|
||||
return view('khazanah.lelong',compact('cawangan_info','api_url','senaraibatchfasa1','senaraibatchfasa2'));
|
||||
}
|
||||
|
||||
public function resittuntutbaki($norujukan){
|
||||
|
||||
@@ -22,31 +22,47 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@if(sizeof($senaraibatch) !== 0)
|
||||
@if(sizeof($senaraibatchfasa1) !== 0 || sizeof($senaraibatchfasa2) !== 0)
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead class="bg-dark">
|
||||
<tr>
|
||||
<th scope="col">No.</th>
|
||||
<th scope="col">Batch No.</th>
|
||||
<th scope="col">Fasa</th>
|
||||
<th scope="col">Bilangan Aktif</th>
|
||||
<th scope="col">Tarikh Lelong</th>
|
||||
<th scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($senaraibatch as $index=>$sb)
|
||||
@foreach($senaraibatchfasa1 as $index=>$sb)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $sb['batchno'] }}</td>
|
||||
<td>Fasa 1</td>
|
||||
<td class="text-danger font-weight-bold">{{ $sb['total'] }}</td>
|
||||
<td>{{ $sb['t_lelong'] }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'cetak','batchno' => $sb['batchno']]) }}" class="btn btn-info text-white">Cetak</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'excel','batchno' => $sb['batchno']]) }}" target="_blank" class="btn btn-success text-white">Excel</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'pdf','batchno' => $sb['batchno']]) }}" target="_blank" class="btn btn-danger text-white">PDF</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'cetak','batchno' => $sb['batchno'],'fasa' => 1]) }}" class="btn btn-info text-white">Cetak</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'excel','batchno' => $sb['batchno'],'fasa' => 1]) }}" target="_blank" class="btn btn-success text-white">Excel</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'pdf','batchno' => $sb['batchno'],'fasa' => 1]) }}" target="_blank" class="btn btn-danger text-white">PDF</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach($senaraibatchfasa2 as $index=>$sb)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $sb['batchno'] }}</td>
|
||||
<td>Fasa 2</td>
|
||||
<td class="text-danger font-weight-bold">{{ $sb['total'] }}</td>
|
||||
<td>{{ $sb['t_lelong'] }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'cetak','batchno' => $sb['batchno'],'fasa' => 2]) }}" class="btn btn-info text-white">Cetak</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'excel','batchno' => $sb['batchno'],'fasa' => 2]) }}" target="_blank" class="btn btn-success text-white">Excel</a>
|
||||
<a href="{{ route('lelongan.laporancetak', ['jeniscetakan' => 'pdf','batchno' => $sb['batchno'],'fasa' => 2]) }}" target="_blank" class="btn btn-danger text-white">PDF</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
|
||||
@@ -187,27 +187,6 @@
|
||||
|
||||
});
|
||||
|
||||
var channel2 = pusher.subscribe('notice-notify');
|
||||
channel2.bind('trigger-notify', function(data) {
|
||||
if(cawangankhazanah == data.cawangan)
|
||||
{
|
||||
if(data.status == 'max')
|
||||
{
|
||||
$("#notify-maksimum").removeClass("d-none");
|
||||
$("#notify-maksimum").addClass("d-block");
|
||||
$("#value-maksimum").text('RM ' + data.bakipetibesi);
|
||||
}
|
||||
|
||||
if(data.status == 'min')
|
||||
{
|
||||
$("#notify-minimum").removeClass("d-none");
|
||||
$("#notify-minimum").addClass("d-block");
|
||||
$("#value-minimum").text('RM ' + data.bakipetibesi);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#navbarDropdown").click(function(){
|
||||
$('#bell').css("color", "grey");
|
||||
});
|
||||
@@ -332,14 +311,27 @@
|
||||
|
||||
|
||||
</nav>
|
||||
{{-- {{ dd(session()->has('status')) }} --}}
|
||||
<div id="notify-maksimum" style="z-index: 1" class="alert {!! (session()->has('status')) ? (session()->get('status') == 'max') ? 'd-block' : 'd-none' : 'd-none' !!} alert-warning sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b id="value-maksimum"></b> dan melebihi had maksimum peti besi. Sila buat permohonan bayaran balik segera!
|
||||
</div>
|
||||
<div id="notify-minimum" style="z-index: 1" class="alert {!! (session()->has('status')) ? (session()->get('status') == 'min') ? 'd-block' : 'd-none' : 'd-none' !!} alert-danger sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b id="value-minimum"></b> dan melebihi had minimum peti besi. Sila buat permohonan wang segera!
|
||||
</div>
|
||||
|
||||
@if ($auth_user['roles'] == 'ppc' || $auth_user['roles'] == 'pc')
|
||||
|
||||
@php
|
||||
$current = Carbon\Carbon::now();
|
||||
$tarikhsemasa = $current->toDateString();
|
||||
|
||||
$cawangan = App\CawanganAR::where('kodcaw',$auth_user['cawangan'])->get()->toArray();
|
||||
$getVault = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/TunaiDiTangan/' . $auth_user['cawangan'],['tarikh' => $tarikhsemasa])->json();
|
||||
@endphp
|
||||
@if(floatval($getVault) > $cawangan[0]['max'])
|
||||
<div id="notify-maksimum" style="z-index: 1" class="alert alert-warning sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b>RM{{ number_format($getVault,2) }}</b> dan melebihi had maksimum peti besi. Sila buat permohonan bayaran balik segera!
|
||||
</div>
|
||||
@elseif(floatval($getVault) < $cawangan[0]['min'])
|
||||
<div id="notify-minimum" style="z-index: 1" class="alert alert-danger sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b>RM{{ number_format($getVault,2) }}</b> dan melebihi had minimum peti besi. Sila buat permohonan wang segera!
|
||||
</div>
|
||||
@else
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<main class="py-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
@@ -228,7 +228,12 @@
|
||||
|
||||
{{-- Customise Ayat pelelong--}}
|
||||
{{-- {!! nl2br(e($notislelong[0]['para2'])) !!} --}}
|
||||
@php echo $notislelong[0]['para2']; @endphp
|
||||
@php if($fasa == 'fasa1')
|
||||
{
|
||||
echo $notislelong[0]['para2'];
|
||||
}else{
|
||||
echo $notislelong[0]['para3'];
|
||||
} @endphp
|
||||
{{-- <p>1. Tebus sepenuhnya</p>
|
||||
<p>2. Tebus gadai semula</p>
|
||||
<p>2. Bayar upah sepenuhnya dan tempoh akan dilanjutkan sehingga 12 bulan bagi tempoh gadaian.</p> --}}
|
||||
|
||||
Reference in New Issue
Block a user