Fix export data, send user details
This commit is contained in:
@@ -126,7 +126,7 @@ class LelongController extends Controller
|
||||
{
|
||||
$lelongDetails = Lelong::find($request->lelong_id);
|
||||
$cawanganLelong = CawanganLelong::with('cawangan')->where('caw_id', $request->cawangan)->where('lelong_id', $request->lelong_id)->first();
|
||||
$lelongBidMaster = LelongBid::with('payment:norujukan,status_payment_opt,remark')
|
||||
$lelongBidMaster = LelongBid::with(['payment:norujukan,status_payment_opt,remark', 'lelongBidderMenang:lelongbid_id,user_id'])
|
||||
->where('lelong_id', $request->lelong_id)
|
||||
->where('status_jual', 1)
|
||||
->where('status_payment', 1)
|
||||
@@ -142,6 +142,10 @@ class LelongController extends Controller
|
||||
$lelongBidMaster[$index]['payment_method'] = "BAYARAN ONLINE";
|
||||
$lelongBidMaster[$index]['teller'] = "LELONG ONLINE";
|
||||
}
|
||||
|
||||
$userDetails = User::find($lelongBid->lelongBidderMenang->user_id, ['name', 'nokp', 'alamat', 'notelbimbit']);
|
||||
$lelongBidMaster[$index]['user_details'] = $userDetails->toArray();
|
||||
|
||||
}
|
||||
|
||||
$lelongbid = $lelongBidMaster->pluck('id');
|
||||
|
||||
@@ -817,11 +817,14 @@ class LelongMobileController extends Controller
|
||||
|
||||
foreach($lelong as $index => $data)
|
||||
{
|
||||
if($data['masamula_lelong'] != null)
|
||||
{
|
||||
$date_convert = strtotime($data['masamula_lelong']);
|
||||
$lelong[$index]['masamula_lelong'] = date("H:i", $date_convert);
|
||||
|
||||
$date_convert_2 = strtotime($data['masatamat_lelong']);
|
||||
$lelong[$index]['masatamat_lelong'] = date("H:i", $date_convert_2);
|
||||
}
|
||||
}
|
||||
|
||||
if ($lelong->isNotEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user