fix skit2

This commit is contained in:
MUHD HAFIFIE
2021-05-20 16:54:16 +08:00
parent 3adc94849b
commit dd0ca831da
19 changed files with 1340 additions and 28 deletions
+42 -1
View File
@@ -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($) {