fix
This commit is contained in:
@@ -3543,7 +3543,7 @@ class KhazanahController extends Controller
|
||||
'tarikhmohon' => $request->tarikhmohon,
|
||||
'bakipetibesi' => $request->bakipetibesi,
|
||||
'outstanding' => $request->outstanding,
|
||||
'namapemohon' => $auth_user['nama']
|
||||
'namapemohon' => $auth_user['name']
|
||||
])->json();
|
||||
|
||||
if($permohonan == true)
|
||||
|
||||
@@ -105,10 +105,50 @@
|
||||
.find("input[type=checkbox], input[type=radio]")
|
||||
.prop("checked", "")
|
||||
.end();
|
||||
|
||||
|
||||
})
|
||||
|
||||
function funcpermohonan(){
|
||||
$('#permohonanform').submit();
|
||||
|
||||
let amaun = $('#jumlahmohon').val();
|
||||
// let tarikh = $('#tarikhmohon').val();
|
||||
let jenis = $('#radwang:checked').val();
|
||||
let petibesi = $('#bakipetibesi').val();
|
||||
let outstanding = $('#outstanding').val();
|
||||
|
||||
let boolamaun = false;let booljenis = false;
|
||||
|
||||
if(amaun === ''){
|
||||
$("#erroramaun").show();
|
||||
// $("[name='erroramaun']").text("*Isikan amaun dalam input!");
|
||||
$("[name='jumlahmohon']").addClass('is-invalid');
|
||||
}
|
||||
|
||||
if(!jenis)
|
||||
{
|
||||
$("#pilihper").show();
|
||||
|
||||
booljenis = true;
|
||||
}else{
|
||||
$("pilihper").hide();
|
||||
|
||||
booljenis = false;
|
||||
}
|
||||
|
||||
if(boolamaun === false && booljenis === false)
|
||||
{
|
||||
$("#terima_permohonan").prop('disabled', true);
|
||||
$('#permohonanform').submit();
|
||||
|
||||
return true;
|
||||
}else{
|
||||
|
||||
$("#terima_permohonan").prop('disabled', false);
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '#btnterima', function(e) {
|
||||
|
||||
@@ -12,25 +12,29 @@
|
||||
@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>
|
||||
<input type="radio" name="radwang" id="radwang" value="permohonanwang"/><label class="ml-2" for="permohonanwang">Permohonan Wang</label>
|
||||
<input type="radio" name="radwang" id="radwang" value="bayaranbalik" class="ml-3"/><label class="ml-2" for="bayaranbalik">Bayaran Balik</label>
|
||||
<div id="pilihper" 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-6">
|
||||
<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>
|
||||
<input type="date" name="tarikhmohon" readonly class="col-6 form-control" value="{{ $tarikhsemasa }}"/>
|
||||
<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>
|
||||
<input type="text" name="bakipetibesi" readonly class="col-6 form-control" value="{{ $getVault }}"/>
|
||||
<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>
|
||||
|
||||
{{-- <div class="col-12 d-flex mb-2">
|
||||
@@ -40,7 +44,8 @@
|
||||
|
||||
<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'] }}"/>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user