diff --git a/app/Http/Controllers/KhazanahController.php b/app/Http/Controllers/KhazanahController.php
index 2ec148f0..46e694e8 100644
--- a/app/Http/Controllers/KhazanahController.php
+++ b/app/Http/Controllers/KhazanahController.php
@@ -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']
+ ]);
+ }
}
diff --git a/resources/views/khazanah/permohonanwang.blade.php b/resources/views/khazanah/permohonanwang.blade.php
index 82286049..641f0a60 100644
--- a/resources/views/khazanah/permohonanwang.blade.php
+++ b/resources/views/khazanah/permohonanwang.blade.php
@@ -38,7 +38,7 @@
Senarai Permohonan Masih Aktif
@@ -64,17 +64,17 @@
{{ $mohon['tarikh_permohonan'] }} |
{{ number_format($mohon['amaun_mohon'],2) }} |
-
+
|
{{ $mohon['jenismohon'] }} |
@php
if($mohon['tagdeposit'] === 1)
{
- echo '';
+ echo '';
}else if(($mohon['tagcit'] === 0 && $mohon['jenismohon'] === 'bayaranbalik'))
{
- echo '';
+ echo '';
}
else{
echo 'DALAM PROSES';
@@ -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;
}
diff --git a/resources/views/khazanah/rekodpermohonan.blade.php b/resources/views/khazanah/rekodpermohonan.blade.php
index a33a894b..fcbce70a 100644
--- a/resources/views/khazanah/rekodpermohonan.blade.php
+++ b/resources/views/khazanah/rekodpermohonan.blade.php
@@ -55,11 +55,11 @@
| {{ number_format($mohon['amaun_mohon'],2) }} |
{{ number_format($mohon['jumlah_diluluskan'],2) }} |
-
+
|
{{ $mohon['jenismohon'] }} |
@php
- if($mohon['tagterima'] === 1)
+ if($mohon['tagterima'] === 1 || ($mohon['jenismohon'] == 'bayaranbalik' && $mohon['tagoperasi'] === 1 && $mohon['tagcit'] === 1 && $mohon['tagakaun'] === 1))
echo 'BERJAYA';
else echo 'BATAL'; @endphp |
diff --git a/resources/views/khazanah/status.blade.php b/resources/views/khazanah/status.blade.php
index 3ce88dd0..4dfdf77c 100644
--- a/resources/views/khazanah/status.blade.php
+++ b/resources/views/khazanah/status.blade.php
@@ -125,6 +125,21 @@
@section('content')
+
+
+
+
+
+
@@ -181,12 +196,12 @@
@else
@else
-
-
 }})
+
+
-
 }})
+
CIT Selesai Deposit ke Bank
-
 }})
+
-
 }})
+
@@ -290,15 +305,15 @@
break;
case 3: echo $desc['description'] . '
' . 'NAMA AKAUN :' . $desc[0]['nama_akaun'];
break;
- case 4: echo $desc['description'] . '
' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2);
+ case 4: echo $desc['description'] . '
' . 'JUMLAH DILULUSKAN :RM' . number_format($desc[0]['jumlah_diluluskan'],2) . '
';
break;
- case 5: echo $desc['description'] . '
' . 'JENIS BANK :' . $desc[0]['jenisbank'] . '
' . 'NO RESIT :' . $desc[0]['noresit'];
+ case 5: echo $desc['description'] . '
' . 'JENIS BANK :' . $desc[0]['jenisbank'] . 'JENIS CIT:' . $desc[0]['jeniscit'] . '
' . 'NO RESIT :' . $desc[0]['noresit'] . 'NAMA SYARIKAT:' . $desc[0]['namasyarikat'];
break;
case 6: echo $desc['description'] . '
' . 'NAMA PENERIMA :' . $desc[0]['nama_penerima'];
break;
case 7: echo $desc['description'];
break;
- case 8: echo $desc['description'] . '
' . 'JENIS BANK :' . $desc[0]['jenisbank'];
+ case 8: echo $desc['description'] . '
' . 'JENIS BANK :' . $desc[0]['jenisbank'] .'
';
break;
}
@@ -319,5 +334,21 @@
@endsection
diff --git a/resources/views/modal/CITModal.blade.php b/resources/views/modal/CITModal.blade.php
index f8c34aa3..941ee8a9 100644
--- a/resources/views/modal/CITModal.blade.php
+++ b/resources/views/modal/CITModal.blade.php
@@ -12,7 +12,9 @@