From 9b134d5e477c4474fc1395824628f62bc332879e Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sun, 12 Mar 2023 00:33:23 +0800 Subject: [PATCH] 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)