From 588db3fc6015bcb97929b922b62485110ff15dd5 Mon Sep 17 00:00:00 2001 From: afiq Date: Tue, 28 Sep 2021 10:01:30 +0800 Subject: [PATCH] first --- app/Audit.php | 10 ++++++++++ app/Http/Controllers/GadaianController.php | 8 +++++--- resources/views/customers/info.blade.php | 5 ++++- resources/views/gadaian/index.blade.php | 12 ++++++++---- resources/views/penebusan/index.blade.php | 2 +- 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 app/Audit.php diff --git a/app/Audit.php b/app/Audit.php new file mode 100644 index 0000000..26c1d85 --- /dev/null +++ b/app/Audit.php @@ -0,0 +1,10 @@ + $keuntungan6bulan, 'upah12' => $keuntungan12bulan, 'hargajualan' => $hargajualan, - 'kuantiti_marhun' => $request->kuantiti_marhun + 'kuantiti_marhun' => $request->kuantiti_marhun, + 'transaction' => 'Daftar Gadai' ])->json(); $komuditi = Http::put(config('api.url').'/api/komuditi/transaksi',[ @@ -190,7 +191,7 @@ class GadaianController extends Controller public function editstore(Request $request){ $auth_user = Auth::user(); - + $total_nilai_marhun = $request->total_nilai_marhun; $total_nilai_marhun = str_replace(',','',$total_nilai_marhun); $keuntungan_sebln = $request->keuntungan_sebulan; @@ -214,7 +215,8 @@ class GadaianController extends Controller 'upah6' => $keuntungan6bulan, 'upah12' => $keuntungan12bulan, 'hargajualan' => $hargajualan, - 'kuantiti_marhun' => $request->kuantiti_marhun + 'kuantiti_marhun' => $request->kuantiti_marhun, + 'transaction' => 'Ubah Gadai' ])->json(); $update_komuditi = Http::put(config('api.url').'/api/komuditi/update',[ 'unit_komuditi' => round($request->pinjaman, 2), diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index a4d0f2f..e06e1ff 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -416,6 +416,7 @@ var api_url = ""; var kodcaw = "{{ $cawangan_info['kodcaw'] }}"; $('#daftar_gadai').on('click',function(){ + $("#daftar_gadai").prop('disabled', true); var noic = $('#noic').val(); var iclama = "{{ $customer_info['kplama'] }}"; var icbaru = "{{ $customer_info['kpbaru'] }}"; @@ -431,13 +432,15 @@ title: 'Unit Komoditi Berbaki Minima', text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi' }); + $("#daftar_gadai").prop('disabled', false); event.preventDefault(); return false; }else{ if(Number(data['unit_komuditi']) < 50000){ + $("#daftar_gadai").prop('disabled', false); Swal.fire({ icon: 'error', - title: 'Unit Komoditi Berbaki Minumum', + title: 'Unit Komoditi Berbaki Minima', text: 'Sila Hubungi Operasi Untuk Membuat Pembelian Komoditi' }); event.preventDefault(); diff --git a/resources/views/gadaian/index.blade.php b/resources/views/gadaian/index.blade.php index 08eea38..db211cf 100644 --- a/resources/views/gadaian/index.blade.php +++ b/resources/views/gadaian/index.blade.php @@ -504,7 +504,8 @@ 'karat' : karat, 'berat_emas' :berat_emas, 'harga' : harga, - 'nilai_marhun' : nilai_marhun + 'nilai_marhun' : nilai_marhun, + 'teller' : "{{ Auth::user()->name }}" }, success:function(data){ $("#tambah_marhun").prop('disabled', false); @@ -615,7 +616,8 @@ 'karat' : karat, 'berat_emas' :berat_emas, 'harga' : harga, - 'nilai_marhun' : nilai_marhun + 'nilai_marhun' : nilai_marhun, + 'teller' : "{{ Auth::user()->name }}" }, success:function(data){ $("#tambah_marhun").prop('disabled', false); @@ -1034,7 +1036,8 @@ data: { "_token": "{{ csrf_token() }}", "norujukan" : norujuk, - "recno" : recnozz[1] + "recno" : recnozz[1], + "teller": "{{ Auth::user()->name }}" }, success:function(data){ location.reload(); @@ -1115,7 +1118,8 @@ 'harga' : harga_edit, 'n_marhun' : nilai_marhun_edit, 'marhun' : marhun_edit, - 'nota' : nota + 'nota' : nota, + "teller": "{{ Auth::user()->name }}" }, success:function(data){ getMarhun(norujukedit); diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 91d1d5f..711fd3e 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -1846,7 +1846,7 @@ var marginsemasa = pinjaman_baru/nmsemasa * 100; - $.ajax({ + $.ajax({ method:'get', url: api + '/api/komuditi/check', success:function(komoditi){