|
|
|
@@ -226,11 +226,15 @@ class PembidaController extends Controller
|
|
|
|
|
public function senlelbelumbayarbidaan(Request $request)
|
|
|
|
|
{
|
|
|
|
|
$kodcaw = $request->kodcaw;
|
|
|
|
|
$arraysms = [];
|
|
|
|
|
$arraysls = [];
|
|
|
|
|
$tarikh_semasa = date('Y-m-d', strtotime(now()));
|
|
|
|
|
|
|
|
|
|
$lelong = LelongBid::join('cawangan_lelong','lelongbid.lelong_id','=','cawangan_lelong.lelong_id')
|
|
|
|
|
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
|
|
|
|
->join('lelong','lelong.id','=','lelongbid.lelong_id')
|
|
|
|
|
->join('cawangan','cawangan.id','=','lelongbid.caw_id')
|
|
|
|
|
->select('lelongbid.lelong_id','lelongbid.caw_id','lelongbid.kodcaw','lelongbid.t_lelong','lelong.sts_lelong','cawangan.caw_name')
|
|
|
|
|
->select('lelongbid.lelong_id','lelongbid.caw_id','lelongbid.kodcaw','lelongbid.t_lelong','lelong.sts_lelong','cawangan.caw_name','lelong.tarikh_lelong')
|
|
|
|
|
->distinct()
|
|
|
|
|
->orderBy('lelongbid.lelong_id')
|
|
|
|
|
->where('lelongbid.status_jual', 1)
|
|
|
|
@@ -240,8 +244,19 @@ class PembidaController extends Controller
|
|
|
|
|
->orWhere('lelongbidder.status_payment',2)
|
|
|
|
|
->where('lelongbidder.status_bidder', 1);
|
|
|
|
|
})
|
|
|
|
|
->orderBy('lelong.id', 'DESC')
|
|
|
|
|
->get();
|
|
|
|
|
return view('pembida.senlelbelumbayarbidaan', compact('lelong'));
|
|
|
|
|
// dd($lelong);
|
|
|
|
|
foreach($lelong as $index=>$info)
|
|
|
|
|
{
|
|
|
|
|
if($info['tarikh_lelong'] == $tarikh_semasa)
|
|
|
|
|
{
|
|
|
|
|
array_push($arraysms, ['info'=>$info]);
|
|
|
|
|
} else {
|
|
|
|
|
array_push($arraysls, ['info'=>$info]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return view('pembida.senlelbelumbayarbidaan', compact('arraysms','arraysls','lelong'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function pembayaranbidaan(Request $request)
|
|
|
|
@@ -974,7 +989,9 @@ class PembidaController extends Controller
|
|
|
|
|
'lelongBidJual:lelong_id,id,norujukan,caw_id,kodcaw',
|
|
|
|
|
'lelongBidJual.lelongBidderMenang:lelongbid_id,user_id,nama_bidder,hargabida,status_payment',
|
|
|
|
|
'lelongBidJual.lelongBidderMenang.payment:lelongbid_id,user_id,status_payment_opt',
|
|
|
|
|
'lelongBidJual.lelongBidderMenang.payment.user:id,name'
|
|
|
|
|
'lelongBidJual.lelongBidderMenang.payment.user:id,name',
|
|
|
|
|
'lelongBidJual.scanjual:lelongbid_id,norujukan,serahkpdpembida',
|
|
|
|
|
'lelongBidJual.lelongBidderMenang.scanjual:lelongbid_id,norujukan,serahkpdpembida'
|
|
|
|
|
)->select('id', 'tarikh_lelong')->where('sts_lelong', 3)->orderBy('id', 'DESC')->get();
|
|
|
|
|
|
|
|
|
|
$lelong_array = [];
|
|
|
|
@@ -1000,6 +1017,7 @@ class PembidaController extends Controller
|
|
|
|
|
$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['serah'] = $user[0]->scanjual ? $user[0]->scanjual->serahkpdpembida : "";
|
|
|
|
|
if ($user[0]->payment != null) {
|
|
|
|
|
$user_to_be_added['jenis_bayaran'] = $user[0]->payment->status_payment_opt;
|
|
|
|
|
} else {
|
|
|
|
|