From a91ecf72b723c2fc2a5548b4795cc624ad12c807 Mon Sep 17 00:00:00 2001 From: hafifierahman Date: Sun, 5 Mar 2023 18:49:25 +0800 Subject: [PATCH] add nama wakil dekat ansuran --- app/Http/Controllers/GadaianController.php | 8 +++++++- app/Http/Controllers/PenebusanController.php | 3 ++- resources/views/penebusan/index.blade.php | 4 ++-- resources/views/print/resit_tuntutbaki.blade.php | 4 ++-- resources/views/print/resitansuran.blade.php | 8 ++++---- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/GadaianController.php b/app/Http/Controllers/GadaianController.php index 400c64b..79d15a6 100644 --- a/app/Http/Controllers/GadaianController.php +++ b/app/Http/Controllers/GadaianController.php @@ -357,6 +357,7 @@ class GadaianController extends Controller $transaction = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/transaction/one/'. $id)->json(); + $gadai = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/gadai/norujukan/'. $id)->json(); if(sizeof($gadai) != 0) @@ -367,7 +368,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 resitbelumansurans($id) diff --git a/app/Http/Controllers/PenebusanController.php b/app/Http/Controllers/PenebusanController.php index 705782f..ba224ac 100644 --- a/app/Http/Controllers/PenebusanController.php +++ b/app/Http/Controllers/PenebusanController.php @@ -82,7 +82,8 @@ class PenebusanController extends Controller $updategadai = Http::withOptions(['verify' => config('app.api_verify')])->put(config('api.url').'/api/gadaikaunter/'. $request->kodcaw .'/norujukan/' . $request->norujukan,[ 'bayaran' => $request->bayaran, - 'teller' => $request->teller + 'teller' => $request->teller, + 'nowakil' => $request->nowakil ])->json(); $getTunai2=Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/GetCurrentTunai/'.$request->kodcaw,['kodlaluan' => $request->teller])->json(); diff --git a/resources/views/penebusan/index.blade.php b/resources/views/penebusan/index.blade.php index 5f5892b..b892c0c 100644 --- a/resources/views/penebusan/index.blade.php +++ b/resources/views/penebusan/index.blade.php @@ -1197,7 +1197,6 @@ /////////// }else if($('#sltjenistebus').find(":selected").val() == 'A'){ - let adadah = false; $.ajax({ @@ -1259,7 +1258,8 @@ "bayaran" : bayar, "kodcaw" : kodcaw, "norujukan" : norujukan, - "teller" : teller + "teller" : teller, + "nowakil" : nw }, success:function(success_data){ diff --git a/resources/views/print/resit_tuntutbaki.blade.php b/resources/views/print/resit_tuntutbaki.blade.php index 0306726..40ffc24 100644 --- a/resources/views/print/resit_tuntutbaki.blade.php +++ b/resources/views/print/resit_tuntutbaki.blade.php @@ -194,7 +194,7 @@ - RESIT BAYARAN LEBIHAN LELONGAN + RESIT BAYARAN {{ ($lelong['jumlah'] > 0) ? 'LEBIHAN LELONGAN' : 'RUGI LELONGAN' }} @@ -256,7 +256,7 @@ - Lebihan Lelongan + {{ ($lelong['jumlah'] > 0) ? 'Lebihan Lelongan' : 'Rugi Lelongan' }} RM {{ number_format($lelong['jumlah'],2) }} diff --git a/resources/views/print/resitansuran.blade.php b/resources/views/print/resitansuran.blade.php index d7586aa..f65d3fb 100644 --- a/resources/views/print/resitansuran.blade.php +++ b/resources/views/print/resitansuran.blade.php @@ -385,11 +385,11 @@ hr.new5 { - Nama Wakil : + Nama Wakil : @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp - No K/P Wakil : + No K/P Wakil : @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp
@@ -487,11 +487,11 @@ hr.new5 { - Nama Wakil : + Nama Wakil : @php if(sizeof($wakil) != 0){ echo $wakil['nama'];} else echo ''; @endphp - No K/P Wakil : + No K/P Wakil : @php if(sizeof($wakil) != 0) echo $wakil['nokp']; else echo ''; @endphp