From 9b134d5e477c4474fc1395824628f62bc332879e Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sun, 12 Mar 2023 00:33:23 +0800 Subject: [PATCH 1/2] fix updated latest --- app/Http/Controllers/GadaianController.php | 9 ++++++-- resources/views/customers/info.blade.php | 12 ++++++---- .../views/homepage/khazanah/home.blade.php | 23 ++++++++++++++++++- resources/views/khazanah/info.blade.php | 13 +++++++---- resources/views/layouts/app.blade.php | 4 ++-- .../views/penebusan/index-khazanah.blade.php | 8 +++---- resources/views/penebusan/index.blade.php | 10 ++++---- 7 files changed, 57 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php index 79d15a6..7b72b64 100644 --- a/app/Http/Controllers/GadaianController.php +++ b/app/Http/Controllers/GadaianController.php @@ -329,7 +329,7 @@ class GadaianController extends Controller public function resit($id) { - + $auth_user = Auth::user(); $totaltransaction = 0; $transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/id/'. $id)->json(); @@ -347,7 +347,12 @@ class GadaianController extends Controller // if(sizeof($customers_info) != 0) // $customers_info = $customers_info[0]; - return view('print.resitansuran',compact('transaction','gadai','customers_info')); + $wakil = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/getwakil/' . $auth_user['cawangan'] . '/code/' . $transaction['nowakil'])->json(); + + if(sizeof($wakil) != 0) + $wakil = $wakil[0]; + + return view('print.resitansuran',compact('transaction','gadai','customers_info','wakil')); } public function resitansurans($id) diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 63d8f50..0016655 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -370,7 +370,7 @@
- + {{-- --}}
@php - $gadaiNumber = $gadai == null ? '0' : count($gadaiNumber); - $listSerahNumber = $listserah == null ? '0' : count($listserah); + $gadaiNumber = isset($gadai) == false ? '0' : count($gadai); + $listSerahNumber = isset($listserah) == false ? '0' : count($listserah); if($auth_user['role_harian'] == 'teller') { diff --git a/resources/views/penebusan/index-khazanah.blade.php b/resources/views/penebusan/index-khazanah.blade.php index d920f52..9044c0c 100644 --- a/resources/views/penebusan/index-khazanah.blade.php +++ b/resources/views/penebusan/index-khazanah.blade.php @@ -259,7 +259,7 @@
- PEMBIAYAAN BARU(RM) + PEMBIAYAAN BARU(RM)
@@ -273,7 +273,7 @@
- PERLU DIBAYAR(RM) + PERLU DIBAYAR(RM)
@@ -286,7 +286,7 @@
- PEMBIAYAAN BARU(RM) + PEMBIAYAAN BARU(RM)
@php $percent_hargaemassemasa = ($gadai['bakipjm'] / $nilaihargasemasa) * 100; @@ -302,7 +302,7 @@
- BAYARAN DITERIMA(RM) + BAYARAN DITERIMA(RM)
diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index b892c0c..166cfdf 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -266,7 +266,7 @@
- PERLU DIBAYAR(RM) + PERLU DIBAYAR(RM)
@@ -285,7 +285,7 @@
- PEMBIAYAAN BARU(RM) + PEMBIAYAAN BARU(RM)
@@ -299,7 +299,7 @@
- PERLU DIBAYAR(RM) + PERLU DIBAYAR(RM)
@@ -312,7 +312,7 @@
- PEMBIAYAAN BARU(RM) + PEMBIAYAAN BARU(RM)
@php if($gadai['bakipjm'] != 0){ @@ -333,7 +333,7 @@
- BAYARAN DITERIMA(RM) + BAYARAN DITERIMA(RM)
From 1974255fa92606c026b902be2cd44a2e841953ce Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sun, 12 Mar 2023 01:01:21 +0800 Subject: [PATCH 2/2] add latest fix denominasi --- resources/views/customers/info.blade.php | 31 ++++++++++++----- .../views/homepage/khazanah/home.blade.php | 34 +++++++++++-------- resources/views/khazanah/info.blade.php | 29 +++++++++++----- resources/views/penebusan/index.blade.php | 2 +- 4 files changed, 63 insertions(+), 33 deletions(-) diff --git a/resources/views/customers/info.blade.php b/resources/views/customers/info.blade.php index 0016655..acd0bf9 100644 --- a/resources/views/customers/info.blade.php +++ b/resources/views/customers/info.blade.php @@ -2333,15 +2333,28 @@ success: function(success){ $('#btnsave').css('display','none'); $('#btnotp').show(); - Swal.fire({ - icon: 'success', - title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan' - }).then((result) => { - if (result.isConfirmed) { - location.reload(); - } - }); + if(success == 1){ + Swal.fire({ + icon: 'success', + title: 'Berjaya', + text: 'Berjaya mengemaskini maklumat pelanggan', + allowEscapeKey : false, + allowOutsideClick: false, + }).then((result) => { + if (result.isConfirmed) { + location.reload(); + } + }); + }else{ + Swal.fire({ + icon: 'error', + title: 'Tidak Berjaya', + text: 'Tidak berjaya mengemaskini maklumat pelanggan', + allowEscapeKey : false, + allowOutsideClick: false, + }); + } + }, error: function (request, status, error) { alert(request.responseText); diff --git a/resources/views/homepage/khazanah/home.blade.php b/resources/views/homepage/khazanah/home.blade.php index 9c232fa..88ca38d 100644 --- a/resources/views/homepage/khazanah/home.blade.php +++ b/resources/views/homepage/khazanah/home.blade.php @@ -408,19 +408,33 @@ Swal.fire({ icon: 'error', title: 'Tidak Berjaya', - text: 'Tidak berjaya mengemaskini denominasi' + text: 'Tidak berjaya mengemaskini denominasi', + allowEscapeKey : false, + allowOutsideClick: false, }).then((result) => { if (result.isConfirmed) { - location.reload(); + $('#editbtn').removeClass('d-none'); + $('#tutupbtn').removeClass('d-none'); + $('#simpanbtn').addClass('d-none'); + $('#batalbtn').addClass('d-none'); + $('.editfunc').prop('readonly', true); } }); }else{ Swal.fire({ icon: 'success', title: 'Berjaya', - text: 'Berjaya mengemaskini denominasi' + text: 'Berjaya mengemaskini denominasi', + allowEscapeKey : false, + allowOutsideClick: false, }).then((result) => { if (result.isConfirmed) { + + $('#editbtn').removeClass('d-none'); + $('#tutupbtn').removeClass('d-none'); + $('#simpanbtn').addClass('d-none'); + $('#batalbtn').addClass('d-none'); + $('.editfunc').prop('readonly', true); location.reload(); } }); @@ -667,20 +681,12 @@ confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Simpan' - }).then((result) => { + }).then(async (result) => { if (result.isConfirmed) { + + let savedata = await saveData(); - saveData(); - - $('#editbtn').removeClass('d-none'); - $('#tutupbtn').removeClass('d-none'); - $('#simpanbtn').addClass('d-none'); - $('#batalbtn').addClass('d-none'); - - $('.editfunc').prop('readonly', true); - - location.reload(); } else if (result.isDismissed) { } diff --git a/resources/views/khazanah/info.blade.php b/resources/views/khazanah/info.blade.php index f8760a1..ee78649 100644 --- a/resources/views/khazanah/info.blade.php +++ b/resources/views/khazanah/info.blade.php @@ -1254,15 +1254,26 @@ success: function(success){ $('#btnsave').css('display','none'); $('#btnotp').show(); - Swal.fire({ - icon: 'success', - title: 'Berjaya', - text: 'Berjaya mengemaskini maklumat pelanggan' - }).then((result) => { - if (result.isConfirmed) { - location.reload(); - } - }); + if(success == 1){ + Swal.fire({ + icon: 'success', + title: 'Berjaya', + text: 'Berjaya mengemaskini maklumat pelanggan' + }).then((result) => { + if (result.isConfirmed) { + location.reload(); + } + }); + }else{ + Swal.fire({ + icon: 'error', + title: 'Tidak Berjaya', + text: 'Tidak berjaya mengemaskini maklumat pelanggan', + allowEscapeKey : false, + allowOutsideClick: false, + }); + } + }, error: function (request, status, error) { diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 166cfdf..0a00866 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -247,7 +247,7 @@
- BAYARAN PELANGGAN(RM) + BAYARAN PELANGGAN(RM)