diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 86391ed..3eea947 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -427,6 +427,32 @@ minimumFractionDigits: 2 }); + function checkserah(data){ + var urlpenebusan = $(data).data("url"); + var norujukan = $(data).data("norujukan"); + $.ajax({ + method:'get', + url: api_url + '/api/check/serah/gadai', + datatype:'json', + data:{ + 'kodcaw': "{{ $cawangan_info['kodcaw'] }}", + 'norujukan': norujukan + }, + success:function(data){ + console.log(data); + if(data == 'true'){ + window.location = urlpenebusan; + }else if(data == 'false'){ + Swal.fire({ + icon: 'error', + title: 'Amaran', + text: 'Gadaian Belum Scan Barcode' + }); + } + } + }); + } + function gadaiTable(data,jenistebus){ var counter = 1; @@ -443,7 +469,7 @@ urlroute = urlroute.replace(':id', gadai_detail["norujukan"]); tablegadai.row.add([ '', - '' + gadai_detail['norujukan'] + '', + '' + gadai_detail['norujukan'] + '', gadai_detail['t_gadai'], gadai_detail['t_matang1'], 'RM '+ formatter.format(gadai_detail['bakihargajualan']), @@ -480,12 +506,7 @@ counter = counter + 1; } }); - }); - - - - } $(document).ready( function () {