diff --git a/app/Http/Controllers/CartController.php b/app/Http/Controllers/CartController.php index b2ab259a..af17699d 100644 --- a/app/Http/Controllers/CartController.php +++ b/app/Http/Controllers/CartController.php @@ -80,7 +80,7 @@ class CartController extends Controller $total_surat = 0; foreach ($cart as $index1 => $data) { - $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->get(); + $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->where('photo_type', 1)->get(); if ($fileMarhun->isNotEmpty()) { $cart[$index1]['filemarhun'] = $fileMarhun; } diff --git a/app/Http/Controllers/LelongController.php b/app/Http/Controllers/LelongController.php index 7a7caa72..c6eaeee3 100644 --- a/app/Http/Controllers/LelongController.php +++ b/app/Http/Controllers/LelongController.php @@ -2202,7 +2202,7 @@ class LelongController extends Controller Mail::to($userdetailsnoti['email'])->send(new Pemenang($userdetailsnoti['name'])); //blast whatsapp notifikasi $mobileno = ltrim($userdetailsnoti['notelbimbit'], '+'); - $messages = 'AR-RAHN PKB: Tahniah Anda Pemenang ArrahnBid, Sila Semak Melalui Pautan ini. https://bid.arrahn.com.my'; + $messages = 'AR-RAHN PKB: Tahniah Anda Pemenang ArrahnBid, Sila Semak Melalui Sistem ArrahnBid. Terima kasih.'; $status = Http::get(env('WABOT_API'),[ 'number' => $mobileno, diff --git a/app/Http/Controllers/Mobile/LelongMobileController.php b/app/Http/Controllers/Mobile/LelongMobileController.php index 3d829cb4..bf581375 100644 --- a/app/Http/Controllers/Mobile/LelongMobileController.php +++ b/app/Http/Controllers/Mobile/LelongMobileController.php @@ -217,7 +217,7 @@ class LelongMobileController extends Controller $total_hargabida = 0; $total_berat = 0; foreach ($lelongBidder as $index1 => $data) { - $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->get(); + $fileMarhun = FileMarhun::where('lelongbid_id', $data['id'])->where('photo_type', 1)->get(); if ($fileMarhun->isNotEmpty()) { $lelongBidder[$index1]['filemarhun'] = $fileMarhun; } @@ -399,7 +399,7 @@ class LelongMobileController extends Controller $lelongbid['lelongbidmarhun'] = $lelongbidmarhun; - $fileMarhun = FileMarhun::where('lelongbid_id', $lelongbid['id'])->get(); + $fileMarhun = FileMarhun::where('lelongbid_id', $lelongbid['id'])->where('photo_type', 1)->get(); // dd($fileMarhun); // foreach ($fileMarhun as $index) { @@ -666,7 +666,7 @@ class LelongMobileController extends Controller $total_hargabida = 0; foreach ($groupBycaw as $index => $hargabida) { - $fileMarhun = FileMarhun::where('lelongbid_id', $hargabida->id)->get(); + $fileMarhun = FileMarhun::where('lelongbid_id', $hargabida->id)->where('photo_type', 1)->get(); if ($fileMarhun->isNotEmpty()) { $groupBycaw[$index]['filemarhun'] = $fileMarhun; } @@ -1363,7 +1363,7 @@ class LelongMobileController extends Controller public function portalApi(Request $request) { $lelong = LelongBid::select('fasa', 't_lelong') - ->where([['norujukan', $request->norujukan], ['status_jual', '=', 0]]) + ->where([['norujukan', $request->norujukan]]) ->first(); return response()->json(['lelong' => $lelong]); } diff --git a/app/Http/Controllers/PembidaController.php b/app/Http/Controllers/PembidaController.php index c7c891ff..8a555625 100644 --- a/app/Http/Controllers/PembidaController.php +++ b/app/Http/Controllers/PembidaController.php @@ -981,11 +981,14 @@ class PembidaController extends Controller $jumlah_bidaan_cawangan = $caw->lelongBid->pluck('lelongBidderMenang')->sum('hargabida'); $user_array = []; foreach ($users as $user) { +//dd($user[0]); $user_to_be_added = []; $user_to_be_added['name_bidder'] = $user[0]->nama_bidder; $user_to_be_added['jumlah_bidaan'] = $user->sum('hargabida'); $user_to_be_added['status_bayaran'] = $user[0]->status_payment; - $user_to_be_added['jenis_bayaran'] = $user[0]->payment->status_payment_opt; + if($user[0]->payment != null) { + $user_to_be_added['jenis_bayaran'] = $user[0]->payment->status_payment_opt; } + else {$user_to_be_added['jenis_bayaran'] = "99";} array_push($user_array, $user_to_be_added); } $cawangan_to_be_added = []; diff --git a/resources/views/pembida/statuspembayaran2.blade.php b/resources/views/pembida/statuspembayaran2.blade.php index e4f4025a..e6820c2d 100644 --- a/resources/views/pembida/statuspembayaran2.blade.php +++ b/resources/views/pembida/statuspembayaran2.blade.php @@ -86,9 +86,10 @@ TUNAI @elseif($pembida['jenis_bayaran'] == 2) FPX - @else + @elseif($pembida['jenis_bayaran'] == 3) CDM - @endif + @else + @endif @endforeach