fix skit2
This commit is contained in:
@@ -3481,5 +3481,58 @@ class KhazanahController extends Controller
|
||||
return view('print.notislelong', compact('cawangan_info','api_url','cawangan_detail'));
|
||||
}
|
||||
|
||||
public function PaparanPermohonan()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$current = Carbon::now();
|
||||
$tarikhsemasa = $current->toDateString();
|
||||
|
||||
|
||||
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
//Peti Besi Cawangan
|
||||
$getVault=Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url').'/api/VaultController/'.$auth_user['cawangan'])->json();
|
||||
|
||||
if(sizeof($getVault) == 0)
|
||||
{
|
||||
$peti_besi_terkini=Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url').'/api/daftarVault/'.$auth_user['cawangan'])->json();
|
||||
$getVault = $peti_besi_terkini['bakiakhir'];
|
||||
|
||||
}else{
|
||||
$getVault = $getVault[0]['bakiakhir'];
|
||||
}
|
||||
|
||||
|
||||
//Dashboardall
|
||||
$dashboard=Http::withOptions(['verify' => config('app.api_verify')])->get( config('api.url').'/api/Dashboard_all/'.$auth_user['cawangan'])->json();
|
||||
|
||||
// dd($dashboard);
|
||||
return view('khazanah.permohonanwang', compact('cawangan_info','api_url','getVault','tarikhsemasa','dashboard'));
|
||||
}
|
||||
|
||||
public function SimpanPermohonan(Request $request){
|
||||
|
||||
// dd($request->all());
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
|
||||
$permohonan = Http::withOptions(['verify' => config('app.api_verify')])->post(config('api.url') . '/admin/permohonan/add/'. $auth_user['cawangan'],[
|
||||
'jenismohon' => $request->radwang,
|
||||
'jumlahmohon' => $request->jumlahmohon,
|
||||
'tarikhmohon' => $request->tarikhmohon,
|
||||
'bakipetibesi' => $request->bakipetibesi,
|
||||
'outstanding' => $request->outstanding,
|
||||
'namapemohon' => $auth_user['nama']
|
||||
])->json();
|
||||
|
||||
if($permohonan == true)
|
||||
{
|
||||
return redirect()->back()->with('message', 'Permohonan Berjaya Disimpan!');
|
||||
}else{
|
||||
return redirect()->back()->with('error', 'Permohonan Tidak Berjaya!');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<a href="{{ url('unjuran') }}" class="btn btn-danger btn-lg btn-block mb-3">Unjuran</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="#" class="btn btn-info btn-lg btn-block mb-3">Permohonan Wang</a>
|
||||
<a href="{{ url('permohonan') }}" class="btn btn-info btn-lg btn-block mb-3">Permohonan</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -242,9 +242,6 @@
|
||||
<div class="row">
|
||||
<a href="{{ url('alirantunai') }}" class="btn btn-info btn-lg btn-block mb-3">Aliran Tunai</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="#" class="btn btn-info btn-lg btn-block mb-3">Bayaran Balik</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,48 +1,64 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
@include('modal.permohonanwang')
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb pb-3">
|
||||
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||
<li class="breadcrumb-item" aria-current="page">Khazanah</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Permohonan Wang</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Permohonan</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="card-body mx-auto">
|
||||
<div class="card-body mx-auto col-12">
|
||||
|
||||
@if(session()->has('message'))
|
||||
<div class="alert alert-success">
|
||||
{{ session()->get('message') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="container">
|
||||
<div class="col-12">
|
||||
<label class="col-6">Jumlah Permohonan (RM)</label>
|
||||
<input type="text" class="col-6 form-control" placeholder="Masukkan Jumlah Permohonan (RM)"/>
|
||||
@if(session()->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
{{ session()->get('error') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mx-auto d-flex justify-content-center col-12">
|
||||
<div class="col-4">
|
||||
<div class="small-box bg-warning text-center"><div class="inner"><b>Peti Besi: <span>RM {{ number_format($getVault,2) }}</span></b></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label class="col-6">Tarikh Mohon</label>
|
||||
<input type="text" class="col-6 form-control"/>
|
||||
<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">Rekod Permohonan</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label class="col-6">Baki Peti Besi (RM)</label>
|
||||
<input type="text" class="col-6 form-control"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped table-hover" id="permohonantable">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>No Permohonan</th>
|
||||
<th>Tarikh Mohon</th>
|
||||
<th>Jumlah Mohon (RM)</th>
|
||||
<th>Bayaran Balik (RM)</th>
|
||||
<th>Status</th>
|
||||
<th>Jenis Permohonan</th>
|
||||
<th>Act</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label class="col-6">Pembiayaan Terkumpul (RM)</label>
|
||||
<input type="text" class="col-6 form-control"/>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label class="col-6">Outstanding (RM)</label>
|
||||
<input type="text" class="col-6 form-control"/>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-info">Daftar Permohonan</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -50,4 +66,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var tablemohon = $('#permohonantable').DataTable({
|
||||
"ordering": false
|
||||
});
|
||||
|
||||
$('#PermohonanWang').on('hidden.bs.modal', function (e) {
|
||||
$(this)
|
||||
.find("input[name='jumlahmohon']")
|
||||
.val('')
|
||||
.end()
|
||||
.find("input[type=checkbox], input[type=radio]")
|
||||
.prop("checked", "")
|
||||
.end();
|
||||
})
|
||||
|
||||
function funcpermohonan(){
|
||||
$('#permohonanform').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<!-- Modal Wakil -->
|
||||
<div class="modal fade" id="PermohonanWang" tabindex="-1" role="dialog" aria-labelledby="PermohonanWangCenterTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="PermohonanWangTitle">Daftar Permohonan</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form id="permohonanform" method="post" action="{{ route('permohonan.simpan') }}">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="text-center mx-auto mb-4">
|
||||
<input type="radio" name="radwang" id="permohonanwang" value="permohonanwang"/><label class="ml-2" for="permohonanwang">Permohonan Wang</label>
|
||||
<input type="radio" name="radwang" id="bayaranbalik" value="bayaranbalik" class="ml-3"/><label class="ml-2" for="bayaranbalik">Bayaran Balik</label>
|
||||
<div class="invalid-feedback">*Pilih Jenis Permohonan</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Jumlah Permohonan (RM)</label>
|
||||
<input type="text" name="jumlahmohon" class="col-6 form-control" placeholder="Masukkan Jumlah Permohonan (RM)"/>
|
||||
<div class="invalid-feedback">*Nyatakan Jumlah Permohonan</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Tarikh Mohon</label>
|
||||
<input type="date" 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>
|
||||
<input type="text" name="bakipetibesi" readonly class="col-6 form-control" value="{{ $getVault }}"/>
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Pembiayaan Terkumpul (RM)</label>
|
||||
<input type="text" readonly class="col-6 form-control"/>
|
||||
</div> --}}
|
||||
|
||||
<div class="col-12 d-flex mb-2">
|
||||
<label class="col-6">Outstanding (RM)</label>
|
||||
<input type="text" name="outstanding" readonly class="col-6 form-control" value="{{ $dashboard[0]['outstanding'] }}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger btn-lg" data-dismiss="modal">Batal</button>
|
||||
<button type="button" id="terima_permohonan" class="btn btn-success btn-lg" onclick="funcpermohonan()">Daftar</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+2
-1
@@ -137,7 +137,8 @@ Route::get('/khazanah/searchpelanggan',['as'=>'khazanah.searchpelanggan','uses'=
|
||||
Route::post('/khazanah/pendahuluanserahanHQ',['as'=>'khazanah.pendahuluanserahanHQ','uses'=>'KhazanahController@pendahuluanserahanHQ'])->middleware('auth','khazanah');
|
||||
Route::get('/penebusankhazanah/{norujukan}',['as'=>'penebusan.khazanah','uses' => 'PenebusanController@PenebusanKhazanah'])->middleware('auth','khazanah');
|
||||
Route::get('/lelongankhazanah/{norujukan}',['as'=>'lelongan.khazanah','uses' => 'KhazanahController@lelongan'])->middleware('auth','khazanah');
|
||||
|
||||
Route::get('/permohonan',['as'=>'permohonan.index','uses' => 'KhazanahController@PaparanPermohonan'])->middleware('auth','khazanah');
|
||||
Route::post('/permohonan/simpan',['as'=>'permohonan.simpan','uses' => 'KhazanahController@SimpanPermohonan'])->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