fix bug
This commit is contained in:
@@ -37,7 +37,14 @@
|
||||
<b>No Kad Pengenalan</b>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="noic" id="noic" readonly value="{{ $customer_info['kpbaru'] }}">
|
||||
@php
|
||||
if($customer_info['kpbaru'] != null){
|
||||
$noic = $customer_info['kpbaru'];
|
||||
}else{
|
||||
$noic = $customer_info['kplama'];
|
||||
}
|
||||
@endphp
|
||||
<input type="text" class="form-control" name="noic" id="noic" readonly value="{{ $noic }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -404,6 +411,9 @@
|
||||
var api_url = "<?php echo $api_url ?>";
|
||||
var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
|
||||
$('#daftar_gadai').on('click',function(){
|
||||
var noic = $('#noic').val();
|
||||
var iclama = "{{ $customer_info['kplama'] }}";
|
||||
var icbaru = "{{ $customer_info['kpbaru'] }}";
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
method:'get',
|
||||
@@ -429,7 +439,11 @@
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
window.location.href = "{{ route('gadaian',['noic'=>$customer_info['kpbaru'] ]) }}";
|
||||
if(icbaru.length > 0){
|
||||
window.location.href = "{{ route('gadaian',['noic'=>$customer_info['kpbaru'] ]) }}";
|
||||
}else{
|
||||
window.location.href = "{{ route('gadaian',['noic'=>$customer_info['kplama'] ]) }}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
|
||||
@php
|
||||
$gadai_session = Http::get($api_url . '/api/check/sag',['kodcaw'=>$cawangan_info['kodcaw'],'norujukan'=>$norujukan,'nokp'=>$customer_info['kpbaru']])->json();
|
||||
if($customer_info['kpbaru'] != null){
|
||||
$noic = $customer_info['kpbaru'];
|
||||
}else{
|
||||
$noic = $customer_info['kplama'];
|
||||
}
|
||||
$gadai_session = Http::get($api_url . '/api/check/sag',['kodcaw'=>$cawangan_info['kodcaw'],'norujukan'=>$norujukan,'nokp'=>$noic])->json();
|
||||
@endphp
|
||||
|
||||
@if($gadai_session != null)
|
||||
|
||||
Reference in New Issue
Block a user