update perubahan mutu marhun join marhun cawangan
This commit is contained in:
@@ -674,7 +674,26 @@ class MarhunController extends Controller
|
||||
// 'gadaimarhun.id as idgadaimarhun'
|
||||
)
|
||||
->get();
|
||||
// dd($lelbidmarhuns);
|
||||
|
||||
|
||||
|
||||
$arraygadai = $lelbidmarhuns->pluck('norujukan')->toArray();
|
||||
$datagadai = $lelbidmarhuns;
|
||||
|
||||
|
||||
$gadai = GadaiMarhun::on($datagadai[0]['kodcaw'])->whereIn('norujukan', $arraygadai)
|
||||
->get()->toArray();
|
||||
|
||||
foreach($gadai as $index1=>$gadai2)
|
||||
{
|
||||
|
||||
$listgadai = GadaiMarhun::on($datagadai[0]['kodcaw'])->whereIn('norujukan', $arraygadai)
|
||||
->get();
|
||||
|
||||
}
|
||||
$gadai[$index1]['listgadai'] = $listgadai;
|
||||
// dd($gadai);
|
||||
|
||||
|
||||
$arraylelbidmarhun = [];
|
||||
$bakilelong = 0;
|
||||
@@ -685,11 +704,11 @@ class MarhunController extends Controller
|
||||
->where('id', $lelbidmarhun->lelongbidmarhun_id)
|
||||
->get()->toArray();
|
||||
|
||||
$marhunsgadai = GadaiMarhun::where('norujukan', $norujukan)
|
||||
// ->where('karat', $lelbidmarhun->karat)
|
||||
// ->where('id', $lelbidmarhun->idgadaimarhun)
|
||||
->first();
|
||||
// dd($lelbidmarhun->idgadaimarhun);
|
||||
// $marhunsgadai = GadaiMarhun::where('norujukan', $norujukan)
|
||||
// // ->where('karat', $lelbidmarhun->karat)
|
||||
// // ->where('id', $lelbidmarhun->idgadaimarhun)
|
||||
// ->first();
|
||||
// // dd($lelbidmarhun->idgadaimarhun);
|
||||
|
||||
$lelongbid = LelongBid::where('lelongbid.id', $lelbidmarhun->lelongbid_id)
|
||||
->where('lelongbid.lelong_id', $id)
|
||||
@@ -724,7 +743,7 @@ class MarhunController extends Controller
|
||||
$rugilelong = $totalbaki;
|
||||
}
|
||||
|
||||
$marhuns[$index1]['harga_gadai'] = $marhunsgadai['harga'];
|
||||
// $marhuns[$index1]['harga_gadai'] = $marhunsgadai['harga'];
|
||||
$marhuns[$index1]['nmarhun_gadai'] = $marhun['old_nmarhun'];
|
||||
$marhuns[$index1]['old_marhun'] = $marhun['marhun'];
|
||||
$marhuns[$index1]['status_ubah'] = $status;
|
||||
@@ -738,7 +757,7 @@ class MarhunController extends Controller
|
||||
}
|
||||
|
||||
|
||||
return view('pengesahan.mutumarhun', compact('lelongbid', 'norujukan', 'id', 'arraylelbidmarhun', 'marhuns'));
|
||||
return view('pengesahan.mutumarhun', compact('lelongbid', 'norujukan', 'id', 'arraylelbidmarhun', 'marhuns','gadai'));
|
||||
}
|
||||
|
||||
public function terimaperubahan(Request $request)
|
||||
|
||||
@@ -277,6 +277,8 @@ class ReportController extends Controller
|
||||
|
||||
$arraydetails = [];
|
||||
$arrayinfocaw = [];
|
||||
$total_hargaasas = 0;
|
||||
$total_hargabida = 0;
|
||||
|
||||
$lelongid = CawanganLelong::join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
@@ -304,9 +306,13 @@ class ReportController extends Controller
|
||||
->groupBy('lelongbid_id')
|
||||
->get()
|
||||
->toArray();
|
||||
|
||||
|
||||
foreach( $laporanpembida as $index1=>$totlappembida){
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $totlappembida['hargaasas'];
|
||||
// $total_hargabida = $total_hargabida + $totlappembida['hargabida'];
|
||||
|
||||
}
|
||||
foreach($laporanpembida as $laporan)
|
||||
{
|
||||
$details = LelongBidder::where('lelongbid_id',$laporan['lelongbid_id'])
|
||||
@@ -317,7 +323,10 @@ class ReportController extends Controller
|
||||
array_push($arraydetails,['laporan' => $laporan,'details' => $details]);
|
||||
}
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdfsenarailapbidaan', compact('lelongid','arraydetails','lelong_id','lelongid','cawangan','arrayinfocaw'))
|
||||
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.pdfsenarailapbidaan', compact('lelongid','arraydetails','lelong_id','lelongid','cawangan','arrayinfocaw','total_hargaasas','total_hargabida'))
|
||||
->setPaper('a4', 'potrait');
|
||||
|
||||
return $pdf->download('Senarai Nama Bidaan Pembida.pdf');
|
||||
@@ -453,7 +462,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan.caw_code',$kodcaw)
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get();
|
||||
|
||||
@@ -469,8 +478,7 @@ class ReportController extends Controller
|
||||
|
||||
|
||||
|
||||
$brglelpembida = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
$brglelpembida = LelongBid::join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.kodcaw',$kodcaw)
|
||||
->where('lelongbid.lelong_id','=',$lelong_id)
|
||||
->where('lelongbidder.status_bidder','=','1')
|
||||
|
||||
Reference in New Issue
Block a user