update tangguh lelong pc
This commit is contained in:
@@ -373,10 +373,15 @@ class MarhunController extends Controller
|
||||
$lelongbidmarhun->bil = 1;
|
||||
$lelongbidmarhun->marhun = $request->marhuntambahan;
|
||||
$lelongbidmarhun->nota = $request->notatambahan;
|
||||
$lelongbidmarhun->old_karat = $request->karattambahan;
|
||||
$lelongbidmarhun->karat = $request->karattambahan;
|
||||
$lelongbidmarhun->old_berat = $request->berat_emastambahan;
|
||||
$lelongbidmarhun->berat = $request->berat_emastambahan;
|
||||
$lelongbidmarhun->old_harga = $request->hargatambahan;
|
||||
$lelongbidmarhun->harga = $request->hargatambahan;
|
||||
$lelongbidmarhun->old_nmarhun = $request->nilai_marhuntambahan;
|
||||
$lelongbidmarhun->n_marhun = $request->nilai_marhuntambahan;
|
||||
$lelongbidmarhun->old_hargaasas = $request->harga_asastambahan;
|
||||
$lelongbidmarhun->hargaasas = $request->harga_asastambahan;
|
||||
$lelongbidmarhun->status_semak = 0;
|
||||
$lelongbidmarhun->save();
|
||||
@@ -473,7 +478,6 @@ class MarhunController extends Controller
|
||||
->get()
|
||||
->toArray();
|
||||
array_push($arrayinfo,['info'=>$info, 'detailsinfo'=>$detailsinfo]);
|
||||
|
||||
}
|
||||
|
||||
return view('marhun.senlelmarhun',compact('lelong', 'arrayinfo'));
|
||||
@@ -484,6 +488,12 @@ class MarhunController extends Controller
|
||||
$user = Auth::user();
|
||||
// dd($user);
|
||||
|
||||
$lelong = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('cawangan','cawangan_lelong.caw_id', '=', 'cawangan.id')
|
||||
->where('cawangan.caw_code', $user->kodcaw)
|
||||
->select('tarikh_lelong', 'caw_name')
|
||||
->first();
|
||||
|
||||
$sdhdisahkan = TangguhLelong::join('gadai', 'tangguhlelong.norujukan', '=', 'gadai.norujukan')
|
||||
->where('gadai.kodcaw', $user['kodcaw'] )
|
||||
->where('tangguhlelong.lelong_id', $lelong_id)
|
||||
@@ -498,7 +508,7 @@ class MarhunController extends Controller
|
||||
)
|
||||
->get();
|
||||
|
||||
return view('marhun.sentangguhlelongsah', compact('sdhdisahkan'));
|
||||
return view('marhun.sentangguhlelongsah', compact('sdhdisahkan', 'lelong'));
|
||||
|
||||
}
|
||||
//Khazanah
|
||||
@@ -611,16 +621,18 @@ class MarhunController extends Controller
|
||||
$lelongbid = LelongBid::where('id', $lelbidmarhun->lelongbid_id)->where('lelong_id', $id)->first();
|
||||
$karat = Lelkarat::where('lelong_id', $id)->get();
|
||||
|
||||
// dd($lelbidmarhuns);
|
||||
foreach($marhuns as $index1=>$marhun)
|
||||
{
|
||||
// dd($marhun);
|
||||
$status = Pengesahan::where('lelongbidmarhun_id', $lelbidmarhun->lelongbidmarhun_id)
|
||||
->where('lelongbid_id', $marhun['lelongbid_id'])
|
||||
->select('status_ubah')
|
||||
->value('status_ubah');
|
||||
|
||||
$gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun'])
|
||||
->where('norujukan', $lelongbid->norujukan)
|
||||
->first();
|
||||
// $gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun'])
|
||||
// ->where('norujukan', $lelongbid->norujukan)
|
||||
// ->first();
|
||||
|
||||
if($lelongbid->baki > 0)
|
||||
{
|
||||
@@ -631,14 +643,29 @@ class MarhunController extends Controller
|
||||
$rugilelong = $rugilelong - $lelongbid->baki;
|
||||
}
|
||||
|
||||
$marhuns[$index1]['harga_gadai'] = $gadaimarhun->harga;
|
||||
$marhuns[$index1]['nmarhun_gadai'] = $gadaimarhun->n_marhun;
|
||||
$marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun;
|
||||
$marhuns[$index1]['status_ubah'] = $status;
|
||||
$marhuns[$index1]['pembiayaan'] = $lelongbid->pinjaman;
|
||||
$marhuns[$index1]['baki_lelong'] = $bakilelong;
|
||||
$marhuns[$index1]['rugi_lelong'] = $rugilelong;
|
||||
// if($gadaimarhun)
|
||||
// {
|
||||
$marhuns[$index1]['harga_gadai'] = $marhun['old_harga'];
|
||||
$marhuns[$index1]['nmarhun_gadai'] = $marhun['old_nmarhun'];
|
||||
$marhuns[$index1]['old_marhun'] = $marhun['marhun'];
|
||||
$marhuns[$index1]['status_ubah'] = $status;
|
||||
$marhuns[$index1]['pembiayaan'] = $lelongbid->pinjaman;
|
||||
$marhuns[$index1]['baki_lelong'] = $bakilelong;
|
||||
$marhuns[$index1]['rugi_lelong'] = $rugilelong;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// $marhuns[$index1]['harga_gadai'] = 0;
|
||||
// $marhuns[$index1]['nmarhun_gadai'] = 0;
|
||||
// $marhuns[$index1]['old_marhun'] = 0;
|
||||
// $marhuns[$index1]['status_ubah'] = 0;
|
||||
// $marhuns[$index1]['pembiayaan'] = 0;
|
||||
// $marhuns[$index1]['baki_lelong'] = 0;
|
||||
// $marhuns[$index1]['rugi_lelong'] = 0;
|
||||
// }
|
||||
|
||||
}
|
||||
// dd($marhuns);
|
||||
array_push($arraylelbidmarhun,$marhuns);
|
||||
}
|
||||
|
||||
|
||||
@@ -338,4 +338,39 @@ class LelongMobileController extends Controller
|
||||
}
|
||||
return response()->json($lelongs, 201);
|
||||
}
|
||||
|
||||
public function hisfeepay(Request $request)
|
||||
{
|
||||
$checkpay = Payment::join('resit', 'payment.resit_id', '=', 'resit.id')
|
||||
->where('resit.user_id', $request->user_id)
|
||||
->where('payment.lelong_id', $request->lelong_id)
|
||||
->where('payment.status', 1)
|
||||
->where('resit.resit_type', 1)
|
||||
->select('resit.id as resit_id',
|
||||
'resit.resit_type',
|
||||
'resit.status as resit_status',
|
||||
'resit.paid_at',
|
||||
'payment.id as payment_id',
|
||||
'payment.lelong_id',
|
||||
'payment.status as payment_status',
|
||||
)
|
||||
->first();
|
||||
|
||||
if($checkpay)
|
||||
{
|
||||
$response =
|
||||
[
|
||||
'success' => "success"
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$response =
|
||||
[
|
||||
'failed' => "Sila buat pembayaran yuran terlebih dahulu"
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($response, 201);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,30 +58,51 @@ class TangguhLelongController extends Controller
|
||||
{
|
||||
// dd($request->all());
|
||||
$user = Auth::user();
|
||||
|
||||
$namacaw = Cawangan::where('caw_code', $user['kodcaw'])->first();
|
||||
|
||||
$checkkodcaw = Customer::join('lelongbid', 'customer.kodcaw', '=', 'lelongbid.kodcaw')
|
||||
->where('lelongbid.kodcaw', $user['kodcaw'])
|
||||
->where('customer.kpbaru', $request->nokp)
|
||||
->orWhere('customer.kplama', $request->nokp)
|
||||
->first();
|
||||
|
||||
if($request->nokp == null)
|
||||
{
|
||||
return redirect()->route('tangguhlelong.carian', $request->lelong_id)->with('success','Sila Masukkan No Kad Pengenalan');
|
||||
return redirect()->route('tangguhlelong.carian', $request->lelong_id)->with('failed','Sila Masukkan No Kad Pengenalan');
|
||||
}
|
||||
else if($checkkodcaw == null)
|
||||
{
|
||||
return redirect()->route('tangguhlelong.carian', $request->lelong_id)->with('failed','No Kad Pengenalan Tiada Dalam Rekod');
|
||||
}
|
||||
else if($request->nokp != null)
|
||||
{
|
||||
$lelong = Lelong::where('id', $request->lelong_id)->first();
|
||||
|
||||
$getic = Customer::join('gadai', 'customer.kpbaru', '=', 'gadai.nokp')
|
||||
->where('gadai.nokp', '=', $request->nokp)
|
||||
// ->where('gadai.tempoh', '=', $lelong->jbg)
|
||||
|
||||
$getic = LelongBid::join('gadai', 'lelongbid.norujukan', '=', 'gadai.norujukan')
|
||||
->where('lelongbid.kodcaw', $user['kodcaw'])
|
||||
->where('gadai.nokp', $request->nokp)
|
||||
->where('lelongbid.lelong_id', $request->lelong_id)
|
||||
->get();
|
||||
// dd($getic);
|
||||
|
||||
|
||||
foreach($getic as $index1=>$ic)
|
||||
{
|
||||
// dd($ic);
|
||||
$getnorujukan = LelongBid::join('lelongbidmarhun', 'lelongbid.id', '=', 'lelongbidmarhun.lelongbid_id')
|
||||
->where('norujukan', $ic->norujukan)
|
||||
->where('jbg', $ic->tempoh)
|
||||
->where('lelongbid.kodcaw', $user['kodcaw'])
|
||||
->where('lelong_id', $request->lelong_id)
|
||||
->get();
|
||||
// dd($getnorujukan);
|
||||
|
||||
|
||||
$customer_detail = Customer::where('kpbaru', $ic['nokp'])
|
||||
->orWhere('kplama', $ic['nokp'])
|
||||
->first();
|
||||
|
||||
// $getic['customer_detail'] = $customer_detail;
|
||||
// $getic2 = $customer_detail;
|
||||
// dd($getic2);
|
||||
|
||||
foreach($getnorujukan as $norujukan)
|
||||
{
|
||||
// dd($norujukan);
|
||||
@@ -104,21 +125,27 @@ class TangguhLelongController extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
$getic[$index1]['user_details'] = $getnorujukan;
|
||||
$getic[$index1]['t_lelong'] = $getnorujukan[0]['t_lelong'];
|
||||
$getic[$index1]['sdhadapengesahan'] = $adapengesahan;
|
||||
}
|
||||
|
||||
$getic[$index1]['user_details'] = $getnorujukan;
|
||||
// dd($getic[$index1]['user_details']);
|
||||
$getic[$index1]['sdhadapengesahan'] = $adapengesahan;
|
||||
}
|
||||
|
||||
}
|
||||
// $icarray = [];
|
||||
|
||||
// foreach($getic->toArray() as $array)
|
||||
// {
|
||||
// if(sizeof($array) == 170)
|
||||
// array_push($icarray, $array);
|
||||
// }
|
||||
|
||||
// dd($getic->toArray());
|
||||
$getic_array = $getic->toArray();
|
||||
dd($getic_array);
|
||||
|
||||
$lelong_id = $request->lelong_id;
|
||||
|
||||
return view('tangguhlelong.searchbyic', compact('getic', 'user', 'lelong_id'));
|
||||
return view('tangguhlelong.searchbyic', compact('getic', 'customer_detail', 'user', 'lelong_id', 'namacaw'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,15 @@
|
||||
@endif
|
||||
<h3 class="pt-3" style="margin-left:1%;">Senarai Tangguh Lelong Yang Telah Disahkan Oleh Operasi</h3>
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
|
||||
<p><b>Cawangan :</b> {{ $lelong['caw_name'] }} </p>
|
||||
<p><b>Tarikh Lelong : </b> {{ $lelong['tarikh_lelong'] }} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<form id="exportform" action="" method="POST">
|
||||
<input type="hidden" name="type" value="User">
|
||||
<table class="table table-striped table-xl text-center" id="sentangguhlelongsah" style="width:100%">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<h4 class="pt-3" style="margin-left:1%;">Pengesahan Perubahan Mutu Marhun</h4>
|
||||
<table class="table table-striped table-xl text-center" id="tablelelong" style="width:100%">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
|
||||
@@ -10,7 +10,18 @@
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="container">
|
||||
<div class="row mb-2">
|
||||
<div class="col-md-12 mx-auto card p-4" style="margin-top:2%; margin-bottom:2%;">
|
||||
<p> <b>Nama : {{$customer_detail['nama']}} </b> </p>
|
||||
<p> <b>No Kad Pengenalan : {{ ($customer_detail) ? $customer_detail['kpbaru'] : $customer_detail['kplama']}} </b></p>
|
||||
<p> <b>Alamat : {{$customer_detail['alamat1']}}</b></p>
|
||||
<p> <b>Not Telefon : {{$customer_detail['telefon']}}</b></p>
|
||||
<p> <b>Tarikh Lelong : {{$getic[0]['t_lelong']}} </b></p>
|
||||
<p> <b>Nama Cawangan : {{$namacaw['caw_name']}} </b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="formtangguhlel" action="{{route('tangguhlelong.tangguhlelong')}}" method="POST">
|
||||
@csrf
|
||||
<input type="hidden" name="lelong_id" value="{{ $lelong_id }}">
|
||||
@@ -18,7 +29,6 @@
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Tarikh Lelong</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>JBG</th>
|
||||
<th>Narhun</th>
|
||||
@@ -33,7 +43,6 @@
|
||||
@foreach ($getic as $ic)
|
||||
<tr>
|
||||
<td>{{$loop->iteration}}</td>
|
||||
<td>{{$ic['user_details'][0]['t_lelong']}}</td>
|
||||
<td>{{$ic['norujukan']}}</td>
|
||||
<td>{{$ic['jbg']}}</td>
|
||||
<td>{{$ic['marhun']}}</td>
|
||||
@@ -41,16 +50,17 @@
|
||||
<td>{{$ic['pinjaman']}}</td>
|
||||
<td>{{$ic['berat']}}</td>
|
||||
<td class="text-center">
|
||||
@if(sizeof($ic['sdhadapengesahan']) !== 0)
|
||||
@if(!$ic['sdhadapengesahan'])
|
||||
|
||||
@else
|
||||
<input type="checkbox" onclick="bidmarhunfunc(this)" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $ic['user_details'][0]['id'] }}" data-bidmarhun="{{ $ic['user_details'][0]['id'] }}">
|
||||
<input type="checkbox" onclick="bidmarhunfunc(this)" aria-label="Checkbox for following text input" name="checkboxdata[]" value="{{ $ic['user_details'][0]['lelongbid_id'] }}" data-bidmarhun="{{ $ic['user_details'][0]['lelongbid_id'] }}">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div class="form-group row">
|
||||
<label for="remark" class=" col-form-label mr-4" style="margin-left:2%;">Remark</label>
|
||||
<div>
|
||||
|
||||
@@ -65,6 +65,7 @@ Route::group(['middleware' => ['auth:sanctum']], function () {
|
||||
Route::post('/bidder/biditem', [LelongMobileController::class, 'bidderSelectBidItem']);
|
||||
Route::get('/bidder/listbiditem', [LelongMobileController::class, 'listBidItem']);
|
||||
Route::get('/bidder/listBidItemWeb', [LelongMobileController::class, 'listBidItemWeb']);
|
||||
Route::get('/bidder/hisfeepay', [LelongMobileController::class, 'hisfeepay']);
|
||||
Route::post('/bidder/updatebiditem', [LelongMobileController::class, 'updatebiditem']);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user