fix bug
This commit is contained in:
@@ -37,7 +37,14 @@
|
|||||||
<b>No Kad Pengenalan</b>
|
<b>No Kad Pengenalan</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -404,6 +411,9 @@
|
|||||||
var api_url = "<?php echo $api_url ?>";
|
var api_url = "<?php echo $api_url ?>";
|
||||||
var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
|
var kodcaw = "{{ $cawangan_info['kodcaw'] }}";
|
||||||
$('#daftar_gadai').on('click',function(){
|
$('#daftar_gadai').on('click',function(){
|
||||||
|
var noic = $('#noic').val();
|
||||||
|
var iclama = "{{ $customer_info['kplama'] }}";
|
||||||
|
var icbaru = "{{ $customer_info['kpbaru'] }}";
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method:'get',
|
method:'get',
|
||||||
@@ -429,7 +439,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
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
|
@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
|
@endphp
|
||||||
|
|
||||||
@if($gadai_session != null)
|
@if($gadai_session != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user