From de3024fd68d599a7055fb9e8ef953e7aa8b370be Mon Sep 17 00:00:00 2001 From: MUHD HAFIFIE Date: Tue, 5 Oct 2021 10:49:05 +0800 Subject: [PATCH] masukkan kodcaw --- app/Http/Controllers/GadaiController.php | 2 ++ app/Http/Controllers/LaporanController.php | 2 ++ app/Http/Controllers/TebusController.php | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/app/Http/Controllers/GadaiController.php b/app/Http/Controllers/GadaiController.php index 8e5d58d..265be34 100644 --- a/app/Http/Controllers/GadaiController.php +++ b/app/Http/Controllers/GadaiController.php @@ -2817,6 +2817,7 @@ class GadaiController extends Controller $transaksi_data = TransaksiKeuntungan::on('mysql7') ->where('tarikh_bayaran' ,'<=', $daterequest) + ->where('kodcaw',$request->kodcaw) ->pluck('norujukan'); $gadaiData = Gadai::on($cawangan['mysql'])->whereIn('norujukan',$transaksi_data) @@ -2871,6 +2872,7 @@ class GadaiController extends Controller $transaksi_data = TransaksiKeuntungan::on('mysql7') ->where([['tarikh_bayaran' ,'>=', $datemula],['tarikh_bayaran' ,'<=', $datehingga]]) + ->where('kodcaw',$request->kodcaw) ->pluck('norujukan'); $gadaiData = Gadai::on($cawangan['mysql'])->whereIn('norujukan',$transaksi_data) diff --git a/app/Http/Controllers/LaporanController.php b/app/Http/Controllers/LaporanController.php index edd0e0d..8fc8512 100644 --- a/app/Http/Controllers/LaporanController.php +++ b/app/Http/Controllers/LaporanController.php @@ -50,6 +50,7 @@ class LaporanController extends Controller ->whereDate('trans.created_at','=',$request->tarikh) ->where('trans.kodcaw','=',$request->kodcaw) ->where('trans.trans_type','=','A') + ->where('trans.kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('bayaran_keuntungan'); // ->get(); @@ -241,6 +242,7 @@ class LaporanController extends Controller // ->where('db2.sttebus','=','') // ->where('db2.hargajualan','<>','null') ->where('tarikh_bayaran' ,'<=', $daterequest) + ->where('kodcaw',$request->kodcaw) // ->sum('bayaran_pembiayaan'); // ->get(); ->pluck('norujukan'); diff --git a/app/Http/Controllers/TebusController.php b/app/Http/Controllers/TebusController.php index 3991b1f..5e46613 100644 --- a/app/Http/Controllers/TebusController.php +++ b/app/Http/Controllers/TebusController.php @@ -1196,6 +1196,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran', '<=', $request->tarikh) ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('bayaran_keuntungan'); ->pluck('norujukan'); @@ -1224,6 +1225,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<=', $request->tarikh) ->whereDate('transaksi_keuntungan.tarikh_bayaran','>=', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('keuntungan_rebet'); // ->get(); @@ -1258,6 +1260,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran', '<=', $request->tarikh) ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('bayaran_keuntungan'); // ->get(); @@ -1286,6 +1289,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<', '2021-06-09') ->whereDate('transaksi_keuntungan.tarikh_bayaran','>=', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('keuntungan_rebet'); // ->get(); @@ -1323,6 +1327,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'>=', '2021-06-09') // ->whereDate('transaksi_keuntungan.tarikh_bayaran','>=', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('trans.kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('keuntungan_rebet'); // ->get(); @@ -1370,6 +1375,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'>=', '2021-06-09') // ->whereDate('transaksi_keuntungan.tarikh_bayaran','>=', $dateSM) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('trans.kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('bayaran_keuntungan'); // ->get(); @@ -1436,6 +1442,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'>=', $request->mula) ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<=', $request->hingga) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('trans.kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('keuntungan_rebet'); ->get(); @@ -1461,6 +1468,7 @@ class TebusController extends Controller ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'>=', $request->mula) ->whereDate('transaksi_keuntungan.tarikh_bayaran' ,'<=', $request->hingga) ->whereYear('tarikh_bayaran','=',$current->year) + ->where('trans.kodcaw',$request->kodcaw) // ->whereNotNull('db2.hargajualan') // ->sum('bayaran_keuntungan'); ->get();