fix permohonan
This commit is contained in:
@@ -3579,4 +3579,48 @@ class KhazanahController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function CITPermohonan(Request $request)
|
||||||
|
{
|
||||||
|
$auth_user = Auth::user();
|
||||||
|
$api_url = config('api.url');
|
||||||
|
|
||||||
|
|
||||||
|
$resitname = time().'.'.$request->resit->extension();
|
||||||
|
$resitdata = base64_encode($request->resit->get());
|
||||||
|
|
||||||
|
$invoicename = time().'.'.$request->invoice->extension();
|
||||||
|
$invoicedata = base64_encode($request->invoice->get());
|
||||||
|
|
||||||
|
$updatelulus = Http::accept('application/'.$request->resit->extension() . ',application/'.$request->invoice->extension())->post(config('api.url') . '/admin/permohonan/tagcit',[
|
||||||
|
'resitcit' => $request->noresit,
|
||||||
|
'bank' => $request->selectedbank,
|
||||||
|
'mohonid' => $request->mohonid,
|
||||||
|
'dataresit' => $resitdata,
|
||||||
|
'datainvoice' => $invoicedata,
|
||||||
|
'resittype' => $request->resit->extension(),
|
||||||
|
'invoicetype' => $request->invoice->extension(),
|
||||||
|
'resitname' => $resitname,
|
||||||
|
'invoicename' => $invoicename,
|
||||||
|
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
if($updatelulus)
|
||||||
|
return redirect()->back()->with('message', 'Berjaya mengemaskini CIT Permohonan!');
|
||||||
|
else
|
||||||
|
return redirect()->back()->with('error', 'Ralat dalam menjana sebarang kemaskini!');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function DownloadFiles(Request $request){
|
||||||
|
|
||||||
|
$download = Http::get(config('api.url').'/admin/permohonan/viewfiles',[
|
||||||
|
'files_id' => $request->files_id
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return response(base64_decode($download['data']), 200, [
|
||||||
|
'Content-type' => 'application/' . $download['type'],
|
||||||
|
'Content-Disposition' => 'inline; filename='.$download['filename']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,13 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('#CITModal').on('shown.bs.modal', function (e) {
|
||||||
|
|
||||||
|
let mohon = $('#btncit').data('mohonid');
|
||||||
|
$('#mohonid').val(mohon);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
function funcpermohonan(){
|
function funcpermohonan(){
|
||||||
|
|
||||||
let amaun = $('#jumlahmohon').val();
|
let amaun = $('#jumlahmohon').val();
|
||||||
|
|||||||
@@ -125,6 +125,21 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<form id="frminvoice" target="_blank" method="post" action="{{ route('permohonan.download') }}">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" id="invoice_id" name="files_id"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form id="frmresit" target="_blank" method="post" action="{{ route('permohonan.download') }}">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" id="resit_id" name="files_id"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form id="frmpb" target="_blank" method="post" action="{{ route('permohonan.download') }}">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" id="pb_id" name="files_id"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -181,12 +196,12 @@
|
|||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="row d-flex justify-content-center">
|
<div class="row d-flex justify-content-center">
|
||||||
<div class="col-12">
|
<div class="col-10">
|
||||||
<ul id="progressbar" class="text-center flex">
|
<ul id="progressbar" class="text-center d-flex">
|
||||||
<li class="{{ ($permohonan['tarikh_permohonan'] !== null) ? 'active' : '' }} step0 col-4"></li>
|
<li class="{{ ($permohonan['tarikh_permohonan'] !== null) ? 'active' : '' }} step0 col-3"></li>
|
||||||
<li class="{{ ($permohonan['tagcit'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
<li class="{{ ($permohonan['tagcit'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||||
<li class="{{ ($permohonan['tagoperasi'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
<li class="{{ ($permohonan['tagoperasi'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||||
<li class="{{ ($permohonan['tagakaun'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
<li class="{{ ($permohonan['tagakaun'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -238,26 +253,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="d-flex col-12 mx-auto justify-content-center">
|
<div class="d-flex col-10 mx-auto justify-content-center">
|
||||||
<div class="text-center icon-content col-2"> <img class="icon mx-auto" src="{{ asset('img/proposal.png') }}">
|
<div class="text-center icon-content col-3"> <img class="icon mx-auto" src="{{ asset('img/proposal.png') }}">
|
||||||
<div class="flex flex-column">
|
<div class="flex flex-column">
|
||||||
<p class="font-weight-bold text-center">Permohonan <br>Cawangan</p>
|
<p class="font-weight-bold text-center">Permohonan <br>Cawangan</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="justify-center text-center icon-content col-2"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
<div class="justify-center text-center icon-content col-3"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
||||||
<div class="flex flex-column">
|
<div class="flex flex-column">
|
||||||
<p class="font-weight-bold text-center">CIT Selesai Deposit ke Bank</p>
|
<p class="font-weight-bold text-center">CIT Selesai Deposit ke Bank</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="justify-center text-center icon-content col-2"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
<div class="justify-center text-center icon-content col-3"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
||||||
<div class="flex flex-column">
|
<div class="flex flex-column">
|
||||||
<p class="font-weight-bold text-center">Pengesahan<br>Operasi</p>
|
<p class="font-weight-bold text-center">Pengesahan<br>Operasi</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col text-center icon-content col-2"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
<div class="flex flex-col text-center icon-content col-3"> <img class="icon mx-auto" src="{{ asset('img/operasicek.png') }}">
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<p class="font-weight-bold text-center">Akaun</p>
|
<p class="font-weight-bold text-center">Akaun</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -290,15 +305,15 @@
|
|||||||
break;
|
break;
|
||||||
case 3: echo $desc['description'] . '<br>' . 'NAMA AKAUN :' . $desc[0]['nama_akaun'];
|
case 3: echo $desc['description'] . '<br>' . 'NAMA AKAUN :' . $desc[0]['nama_akaun'];
|
||||||
break;
|
break;
|
||||||
case 4: echo $desc['description'] . '<br>' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2);
|
case 4: echo $desc['description'] . '<br>' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2) . '<br><button class="mt-2 btn btn-info mr-2" onclick="pbdownload(' . $desc[0]['pbfiles'] . ')">Muat Turun Surat</button>';
|
||||||
break;
|
break;
|
||||||
case 5: echo $desc['description'] . '<br>' . 'JENIS BANK :' . $desc[0]['jenisbank'] . '<br>' . 'NO RESIT :' . $desc[0]['noresit'];
|
case 5: echo $desc['description'] . '<br>' . 'JENIS BANK :' . $desc[0]['jenisbank'] . 'JENIS CIT:' . $desc[0]['jeniscit'] . '<br>' . 'NO RESIT :' . $desc[0]['noresit'] . 'NAMA SYARIKAT:' . $desc[0]['namasyarikat'];
|
||||||
break;
|
break;
|
||||||
case 6: echo $desc['description'] . '<br>' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima'];
|
case 6: echo $desc['description'] . '<br>' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima'];
|
||||||
break;
|
break;
|
||||||
case 7: echo $desc['description'];
|
case 7: echo $desc['description'];
|
||||||
break;
|
break;
|
||||||
case 8: echo $desc['description'] . '<br>' . 'JENIS BANK :' . $desc[0]['jenisbank'];
|
case 8: echo $desc['description'] . '<br>' . 'JENIS BANK :' . $desc[0]['jenisbank'] .'<br><button class="mt-2 btn btn-info mr-2" onclick="resitdownload(' . $desc[0]['resitfiles'] . ')">Muat Turun Resit</button><button class="mt-2 btn btn-info" onclick="invoicedownload(' . $desc[0]['invoicefiles'] . ')">Muat Turun Invoice</button>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,5 +334,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function invoicedownload(invoiceid){
|
||||||
|
$('#invoice_id').val(invoiceid);
|
||||||
|
|
||||||
|
$('#frminvoice').submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resitdownload(resitid){
|
||||||
|
$('#resit_id').val(resitid);
|
||||||
|
$('#frmresit').submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function pbdownload(pbid){
|
||||||
|
$('#pb_id').val(pbid);
|
||||||
|
$('#frmpb').submit();
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form method="post" action="{{ route('permohonan.cit') }}" enctype="multipart/form-data">
|
<form method="post" action="{{ route('permohonan.cit') }}" enctype="multipart/form-data">
|
||||||
<div class="d-flex mb-2">
|
@csrf
|
||||||
|
<input type="hidden" id="mohonid" name="mohonid" value=""/>
|
||||||
|
<div class="d-flex mb-2">
|
||||||
<label class="col-4">Bank</label>
|
<label class="col-4">Bank</label>
|
||||||
<select name="selectedbank" class="form-control col-8">
|
<select name="selectedbank" class="form-control col-8">
|
||||||
@foreach($bank as $b)
|
@foreach($bank as $b)
|
||||||
@@ -27,8 +29,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex mb-2">
|
<div class="d-flex mb-2">
|
||||||
<label class="col-4" name="resit">Resit</label>
|
<label class="col-4">Resit</label>
|
||||||
<input type="file"/>
|
<input type="file" name="resit"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex mb-2">
|
<div class="d-flex mb-2">
|
||||||
<label class="col-4">Invoice</label>
|
<label class="col-4">Invoice</label>
|
||||||
|
|||||||
+2
-2
@@ -141,8 +141,8 @@ Route::get('/permohonan',['as'=>'permohonan.index','uses' => 'KhazanahController
|
|||||||
Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah');
|
Route::get('/permohonan/rekod',['as'=>'permohonan.rekod','uses' => 'KhazanahController@RekodPermohonan'])->middleware('auth','khazanah');
|
||||||
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah');
|
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->middleware('auth','khazanah');
|
||||||
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
|
Route::get('/permohonan/status/{mohonid}',['as'=>'permohonan.status','uses' => 'KhazanahController@StatusPermohonan'])->middleware('auth','khazanah');
|
||||||
Route::get('/permohonan/cit/{mohonid}',['as'=>'permohonan.cit','uses' => 'KhazanahController@CITPermohonan'])->middleware('auth','khazanah');
|
Route::post('/permohonan/cit',['as'=>'permohonan.cit','uses' => 'KhazanahController@CITPermohonan'])->middleware('auth','khazanah');
|
||||||
|
Route::post('/permohonan/download',['as'=>'permohonan.download','uses' => 'KhazanahController@DownloadFiles'])->middleware('auth','khazanah');
|
||||||
|
|
||||||
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
Route::post('/kakitangan/harian',['as'=>'kakitangan.harian','uses'=>'KakitanganController@kakitanganHarian'])->middleware('auth','khazanah');
|
||||||
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
Route::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
||||||
|
|||||||
Reference in New Issue
Block a user