Merge branch 'fixkaunter' of https://gitlab.com/online-sistem1/kaunter into fixkaunter
This commit is contained in:
@@ -3578,5 +3578,49 @@ class KhazanahController extends Controller
|
||||
return view('khazanah.status', compact('cawangan_info','api_url','permohonan','getdescription'));
|
||||
|
||||
}
|
||||
|
||||
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']
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h5 class="mt-2">Senarai Permohonan Masih Aktif</h5>
|
||||
<div>
|
||||
<button class="btn btn-info" data-toggle="modal" data-target="#PermohonanWang">Mohon</button>
|
||||
<button class="btn btn-info" data-backdrop="static" data-keyboard="false" data-toggle="modal" data-target="#PermohonanWang">Mohon</button>
|
||||
<a class="btn btn-info" href="{{ route('permohonan.rekod') }}">Rekod Permohonan</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,17 +64,17 @@
|
||||
<td>{{ $mohon['tarikh_permohonan'] }}</td>
|
||||
<td>{{ number_format($mohon['amaun_mohon'],2) }}</td>
|
||||
<td>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['mohonid']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['nopermohonan']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
</td>
|
||||
<td>{{ $mohon['jenismohon'] }}</td>
|
||||
<td>
|
||||
@php
|
||||
if($mohon['tagdeposit'] === 1)
|
||||
{
|
||||
echo '<button data-mohonid="' . $mohon["mohonid"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
|
||||
echo '<button data-mohonid="' . $mohon["nopermohonan"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
|
||||
}else if(($mohon['tagcit'] === 0 && $mohon['jenismohon'] === 'bayaranbalik'))
|
||||
{
|
||||
echo '<button data-mohonid="' . $mohon["mohonid"] . '" id="btncit" class="btn btn-secondary" data-toggle="modal" data-target="#CITModal">CIT</button>';
|
||||
echo '<button data-mohonid="' . $mohon["nopermohonan"] . '" id="btncit" class="btn btn-secondary" data-toggle="modal" data-backdrop="static" data-keyboard="false" data-target="#CITModal">CIT</button>';
|
||||
}
|
||||
else{
|
||||
echo '<span class="p-2 badge badge-info">DALAM PROSES</span>';
|
||||
@@ -106,14 +106,24 @@
|
||||
$(this)
|
||||
.find("input[name='jumlahmohon']")
|
||||
.val('')
|
||||
.removeClass('is-invalid')
|
||||
.end()
|
||||
.find("input[type=checkbox], input[type=radio]")
|
||||
.prop("checked", "")
|
||||
.end();
|
||||
|
||||
$("#erroramaun").hide();
|
||||
$("#pilihper").hide();
|
||||
|
||||
})
|
||||
|
||||
$('#CITModal').on('shown.bs.modal', function (e) {
|
||||
|
||||
let mohon = $('#btncit').data('mohonid');
|
||||
$('#mohonid').val(mohon);
|
||||
|
||||
});
|
||||
|
||||
function funcpermohonan(){
|
||||
|
||||
let amaun = $('#jumlahmohon').val();
|
||||
@@ -128,6 +138,11 @@
|
||||
$("#erroramaun").show();
|
||||
// $("[name='erroramaun']").text("*Isikan amaun dalam input!");
|
||||
$("[name='jumlahmohon']").addClass('is-invalid');
|
||||
boolamaun = true;
|
||||
}else{
|
||||
$("#erroramaun").hide();
|
||||
$("[name='jumlahmohon']").removeClass('is-invalid');
|
||||
boolamaun = false;
|
||||
}
|
||||
|
||||
if(!jenis)
|
||||
@@ -136,7 +151,7 @@
|
||||
|
||||
booljenis = true;
|
||||
}else{
|
||||
$("pilihper").hide();
|
||||
$("#pilihper").hide();
|
||||
|
||||
booljenis = false;
|
||||
}
|
||||
|
||||
@@ -55,11 +55,11 @@
|
||||
<td>{{ number_format($mohon['amaun_mohon'],2) }}</td>
|
||||
<td>{{ number_format($mohon['jumlah_diluluskan'],2) }}</td>
|
||||
<td>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['mohonid']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
<a href="{{ route('permohonan.status', ['mohonid' => $mohon['nopermohonan']]) }}" class="btn btn-info"><i class="fas fa-eye"></i></a>
|
||||
</td>
|
||||
<td>{{ $mohon['jenismohon'] }}</td>
|
||||
<td>@php
|
||||
if($mohon['tagterima'] === 1)
|
||||
if($mohon['tagterima'] === 1 || ($mohon['jenismohon'] == 'bayaranbalik' && $mohon['tagoperasi'] === 1 && $mohon['tagcit'] === 1 && $mohon['tagakaun'] === 1))
|
||||
echo '<span class="p-2 badge badge-success">BERJAYA</span>';
|
||||
else echo '<span class="p-2 badge badge-danger">BATAL</span>'; @endphp</td>
|
||||
|
||||
|
||||
@@ -125,6 +125,21 @@
|
||||
@section('content')
|
||||
|
||||
<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="col-md-12">
|
||||
<div class="card">
|
||||
@@ -181,12 +196,12 @@
|
||||
</div>
|
||||
@else
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-12">
|
||||
<ul id="progressbar" class="text-center flex">
|
||||
<li class="{{ ($permohonan['tarikh_permohonan'] !== null) ? 'active' : '' }} step0 col-4"></li>
|
||||
<li class="{{ ($permohonan['tagcit'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
||||
<li class="{{ ($permohonan['tagoperasi'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
||||
<li class="{{ ($permohonan['tagakaun'] === 1) ? 'active' : '' }} step0 col-4"></li>
|
||||
<div class="col-10">
|
||||
<ul id="progressbar" class="text-center d-flex">
|
||||
<li class="{{ ($permohonan['tarikh_permohonan'] !== null) ? 'active' : '' }} step0 col-3"></li>
|
||||
<li class="{{ ($permohonan['tagcit'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||
<li class="{{ ($permohonan['tagoperasi'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||
<li class="{{ ($permohonan['tagakaun'] === 1) ? 'active' : '' }} step0 col-3"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -238,26 +253,26 @@
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="d-flex col-12 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="d-flex col-10 mx-auto justify-content-center">
|
||||
<div class="text-center icon-content col-3"> <img class="icon mx-auto" src="{{ asset('img/proposal.png') }}">
|
||||
<div class="flex flex-column">
|
||||
<p class="font-weight-bold text-center">Permohonan <br>Cawangan</p>
|
||||
</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">
|
||||
<p class="font-weight-bold text-center">CIT Selesai Deposit ke Bank</p>
|
||||
</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">
|
||||
<p class="font-weight-bold text-center">Pengesahan<br>Operasi</p>
|
||||
</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">
|
||||
<p class="font-weight-bold text-center">Akaun</p>
|
||||
</div>
|
||||
@@ -290,15 +305,15 @@
|
||||
break;
|
||||
case 3: echo $desc['description'] . '<br>' . 'NAMA AKAUN :' . $desc[0]['nama_akaun'];
|
||||
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;
|
||||
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;
|
||||
case 6: echo $desc['description'] . '<br>' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima'];
|
||||
break;
|
||||
case 7: echo $desc['description'];
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -319,5 +334,21 @@
|
||||
</div>
|
||||
<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>
|
||||
@endsection
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
<div class="container">
|
||||
<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>
|
||||
<select name="selectedbank" class="form-control col-8">
|
||||
@foreach($bank as $b)
|
||||
@@ -27,8 +29,8 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex mb-2">
|
||||
<label class="col-4" name="resit">Resit</label>
|
||||
<input type="file"/>
|
||||
<label class="col-4">Resit</label>
|
||||
<input type="file" name="resit"/>
|
||||
</div>
|
||||
<div class="d-flex mb-2">
|
||||
<label class="col-4">Invoice</label>
|
||||
|
||||
@@ -18,21 +18,21 @@
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Jumlah Permohonan (RM)</label>
|
||||
<div class="col-6">
|
||||
<label class="col-8">Jumlah Permohonan (RM)</label>
|
||||
<div class="col-4">
|
||||
<input type="text" name="jumlahmohon" id="jumlahmohon" class="form-control" placeholder="Jumlah Permohonan (RM)"/>
|
||||
<div id="erroramaun" class="invalid-feedback">*Nyatakan Jumlah Permohonan</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Tarikh Mohon</label>
|
||||
<label class="col-8">Tarikh Mohon</label>
|
||||
<p class="col-6">{{ $tarikhsemasa }}</p>
|
||||
<input type="hidden" id="tarikhmohon" name="tarikhmohon" readonly class="col-6 form-control" value="{{ $tarikhsemasa }}"/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Baki Peti Besi (RM)</label>
|
||||
<label class="col-8">Baki Peti Besi (RM)</label>
|
||||
<p class="col-6">RM {{ number_format($getVault,2) }}</p>
|
||||
<input type="hidden" id="bakipetibesi" name="bakipetibesi" readonly class="col-6 form-control" value="{{ $getVault }}"/>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
</div> --}}
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Outstanding (RM)</label>
|
||||
<label class="col-8">Outstanding (RM)</label>
|
||||
<p class="col-6">RM {{ number_format($dashboard[0]['outstanding'],2) }}</p>
|
||||
<input type="hidden" id="outstanding" name="outstanding" readonly class="col-6 form-control" value="{{ $dashboard[0]['outstanding'] }}"/>
|
||||
</div>
|
||||
|
||||
+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::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/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::get('/lelong',['as'=>'lelong','uses'=>'LelongController@lelong']);
|
||||
|
||||
Reference in New Issue
Block a user