From 3dde0f030cb9d115458893549959127779362cd9 Mon Sep 17 00:00:00 2001 From: afiq Date: Tue, 2 Mar 2021 01:48:14 +0800 Subject: [PATCH] block gadaian belum serah --- resources/views/customers/info.blade.php | 33 +++++++++++++++++++----- 1 file changed, 27 insertions(+), 6 deletions(-) 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 () {