From 7fe5eb8744b12c451c31d0722616fd5e164aaca7 Mon Sep 17 00:00:00 2001 From: faiqahzaman <91926774+faiqahzaman@users.noreply.github.com> Date: Tue, 1 Mar 2022 12:30:59 +0800 Subject: [PATCH 1/2] update table --- app/Http/Controllers/SimulasiController.php | 4 ++-- app/Models/GadaiMarhun.php | 2 +- resources/views/pembayaran/kaunterpembayaran.blade.php | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/SimulasiController.php b/app/Http/Controllers/SimulasiController.php index 371a799a..46d27969 100644 --- a/app/Http/Controllers/SimulasiController.php +++ b/app/Http/Controllers/SimulasiController.php @@ -143,7 +143,7 @@ class SimulasiController extends Controller $sumhargaasas = 0; $berat = 0; - $gadaimarhun = GadaiMarhun::where('gadai_id','=',$data->id)->get(); + $gadaimarhun = GadaiMarhun::where('norujukan','=',$data->norujukan)->get(); foreach($gadaimarhun as $marhun) { $simkarat = SimKarat::where('simulasi_id','=',$simulasi->id)->get(); @@ -229,7 +229,7 @@ class SimulasiController extends Controller $sumhargaasas = 0; $berat = 0; - $gadaimarhun = GadaiMarhun::where('gadai_id','=',$data->id)->get(); + $gadaimarhun = GadaiMarhun::where('norujukan','=',$data->norujukan)->get(); foreach($gadaimarhun as $marhun) { $simkarat = SimKarat::where('simulasi_id','=',$simulasi->id)->get(); diff --git a/app/Models/GadaiMarhun.php b/app/Models/GadaiMarhun.php index f2bf32ed..a1fdd6ef 100644 --- a/app/Models/GadaiMarhun.php +++ b/app/Models/GadaiMarhun.php @@ -12,7 +12,7 @@ class GadaiMarhun extends Model protected $table = 'gadaimarhun'; protected $fillable = [ - 'gadai_id', + 'norujukan', 'bil', 'marhun', 'nota', diff --git a/resources/views/pembayaran/kaunterpembayaran.blade.php b/resources/views/pembayaran/kaunterpembayaran.blade.php index b1e341e0..6fb24d60 100644 --- a/resources/views/pembayaran/kaunterpembayaran.blade.php +++ b/resources/views/pembayaran/kaunterpembayaran.blade.php @@ -46,8 +46,11 @@ @endforeach +
+