fix skit2
This commit is contained in:
@@ -312,7 +312,7 @@
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<input type="button" class="float-right btn btn-danger mr-2" value="BATAL" onclick="window.location.replace('{{ route('customer_info') }}')">
|
||||
<input type="button" class="float-right btn btn-danger mr-2" value="BATAL" onclick="pembatalanbalik();">
|
||||
<input type="button" id="terima_transaksi" class="float-right btn btn-primary mr-2" value="TERIMA" onclick="bayaransemua()">
|
||||
</div>
|
||||
</div>
|
||||
@@ -2185,6 +2185,47 @@ function ubahwakil(e)
|
||||
$(e).attr( "onclick", "wakilfunction(this)");
|
||||
}
|
||||
|
||||
function pembatalanbalik()
|
||||
{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api + '/api/polis/get/',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
var count = Object.keys(data).length;
|
||||
|
||||
if(count > 0 && data[0].tebus === 1)
|
||||
{
|
||||
$.ajax({
|
||||
method:'put',
|
||||
url: api + '/api/polis/put/',
|
||||
data: {
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan,
|
||||
'tebus' : 0
|
||||
},
|
||||
success:function(data){
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
window.location.replace("{{ route('customer_info') }}");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Restricts input for the set of matched elements to the given inputFilter function.
|
||||
(function($) {
|
||||
|
||||
Reference in New Issue
Block a user