tangguh lelong by pc
This commit is contained in:
@@ -69,11 +69,24 @@ class TangguhLelongController extends Controller
|
||||
|
||||
$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)
|
||||
|
||||
$lelongbid = LelongBid::where('kodcaw', $user['kodcaw']);
|
||||
|
||||
$arraylelongbid = $lelongbid->pluck('kodcaw')->toArray();
|
||||
$datalelongbid = $lelongbid->get();
|
||||
|
||||
$checkkodcaw = Customer::query()
|
||||
->where('kpbaru',$request->nokp)
|
||||
->orWhere('kplama',$request->nokp)
|
||||
->first();
|
||||
|
||||
// dd($checkkodcaw);
|
||||
|
||||
// $checkkodcaw = Customer::join('lelongbid', 'customer.kodcaw', '=', 'lelongbid.kodcaw')
|
||||
// ->where('lelongbid.kodcaw', $user['kodcaw'])
|
||||
// ->where('customer.kpbaru', $request->nokp)
|
||||
// ->orWhere('customer.kplama', $request->nokp)
|
||||
// ->first();
|
||||
// dd($checkkodcaw);
|
||||
|
||||
if($request->nokp == null)
|
||||
@@ -88,12 +101,23 @@ class TangguhLelongController extends Controller
|
||||
{
|
||||
$lelong = Lelong::where('id', $request->lelong_id)->first();
|
||||
|
||||
$getic = LelongBid::join('gadai', 'lelongbid.norujukan', '=', 'gadai.norujukan')
|
||||
->where('lelongbid.kodcaw', $user['kodcaw'])
|
||||
$lelbid = LelongBid::where('kodcaw', $user['kodcaw'])
|
||||
->where('lelong_id', $request->lelong_id);
|
||||
|
||||
$arraylelbid = $lelbid->pluck('norujukan')->toArray();
|
||||
$datalelbid = $lelbid->get();
|
||||
|
||||
$getic = Gadai::on($datalelbid[0]['kodcaw'])->whereIn('norujukan',$arraylelbid)
|
||||
->where('gadai.nokp', $request->nokp)
|
||||
->where('lelongbid.lelong_id', $request->lelong_id)
|
||||
->get();
|
||||
|
||||
|
||||
// $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();
|
||||
|
||||
foreach($getic as $index1=>$ic)
|
||||
{
|
||||
$getnorujukan = LelongBid::join('lelongbidmarhun', 'lelongbid.id', '=', 'lelongbidmarhun.lelongbid_id')
|
||||
@@ -104,11 +128,23 @@ class TangguhLelongController extends Controller
|
||||
->get();
|
||||
// dd($getnorujukan);
|
||||
|
||||
$customer_detail = Customer::join('daerah', 'customer.koddaerah', '=', 'daerah.koddaerah')
|
||||
->join('negeri', 'customer.kodnegeri', '=', 'negeri.kodnegeri')
|
||||
$customer = LelongBid::where('kodcaw', $user['kodcaw']);
|
||||
|
||||
$arraycustomer = $customer->pluck('kodcaw')->toArray();
|
||||
$datacustomer = $customer->get();
|
||||
|
||||
$customer_detail = Customer::query()
|
||||
->join('daerah', 'customer.koddaerah', '=', 'daerah.koddaerah')
|
||||
->join('negeri', 'customer.kodnegeri', '=', 'negeri.kodnegeri')
|
||||
->where('customer.kpbaru', $ic['nokp'])
|
||||
->orWhere('customer.kplama', $ic['nokp'])
|
||||
->orWhere('customer.kplama', $ic['nokp'])
|
||||
->first();
|
||||
|
||||
// $customer_detail = Customer::join('daerah', 'customer.koddaerah', '=', 'daerah.koddaerah')
|
||||
// ->join('negeri', 'customer.kodnegeri', '=', 'negeri.kodnegeri')
|
||||
// ->where('customer.kpbaru', $ic['nokp'])
|
||||
// ->orWhere('customer.kplama', $ic['nokp'])
|
||||
// ->first();
|
||||
// dd($customer_detail);
|
||||
|
||||
// $getic['customer_detail'] = $customer_detail;
|
||||
|
||||
@@ -59,8 +59,10 @@
|
||||
</td>
|
||||
<td>
|
||||
@if($lel['info']['sts_lelong'] == 0)
|
||||
<a href="{{ route('tangguhlelong.carian', $lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Carian" style="margin-right:40px"><i class="fas fa-search"></i></a>
|
||||
<a href="{{ route('tangguhlelong.listtangguh', [$lel['info']['lelong_id'], $details['caw_code']]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Tangguh" style="margin-right:40px"><i class="fas fa-list"></i></a>
|
||||
@foreach($lel['detailsinfo'] as $details)
|
||||
<a href="{{ route('tangguhlelong.carian', $lel['info']['lelong_id']) }}" data-toggle="tooltip" data-placement="top" title="Carian" style="margin-right:40px"><i class="fas fa-search"></i></a>
|
||||
<a href="{{ route('tangguhlelong.listtangguh', [$lel['info']['lelong_id'], $details['caw_code']]) }}" data-toggle="tooltip" data-placement="top" title="Senarai Tangguh" style="margin-right:40px"><i class="fas fa-list"></i></a>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user