update laporan, uninstall ckeditor
This commit is contained in:
@@ -88,7 +88,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->where('cawangan.caw_code', $kodcaw)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get()->toArray();
|
||||
|
||||
@@ -103,26 +103,45 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$brglelong = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->where('lelongbid.lelong_id', $lelong_id)
|
||||
->where('lelongbid.kodcaw', $kodcaw)
|
||||
->get()->toArray();
|
||||
|
||||
$keuntungan=0;
|
||||
$total_hargaasas = 0;
|
||||
$total_berat = 0;
|
||||
$total_berat = 0;
|
||||
|
||||
|
||||
$marhun = LelongBid::join('cawangan', 'lelongbid.caw_id', '=', 'cawangan.id')
|
||||
->where('lelong_id','=',$lelong_id)
|
||||
->where('lelongbid.kodcaw', $kodcaw);
|
||||
|
||||
foreach($brglelong as $index1=>$upah)
|
||||
$arraynorujukan = $marhun->pluck('norujukan')->toArray();
|
||||
$datasimulasi = $marhun->get();
|
||||
|
||||
foreach($datasimulasi as $index=>$totharga){
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $totharga['hargaasas'];
|
||||
}
|
||||
|
||||
|
||||
$marhuns = Gadai::on($datasimulasi[0]['kodcaw'])->whereIn('norujukan', $arraynorujukan)
|
||||
->get()->toArray();
|
||||
// dd($marhuns);
|
||||
|
||||
foreach($marhuns as $index1=>$upah)
|
||||
{
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $upah['hargaasas'];
|
||||
$total_berat = $total_berat + $upah['berat'];
|
||||
|
||||
}
|
||||
|
||||
$listsag = Gadai::on($datasimulasi[0]['kodcaw'])->whereIn('norujukan', $arraynorujukan)
|
||||
->where('nokp','=',$upah['nokp'])
|
||||
->get();
|
||||
|
||||
foreach($listsag as $index=>$listing){
|
||||
|
||||
$total_berat = $total_berat + $listing['berat'];
|
||||
}
|
||||
}
|
||||
$marhuns[$index1]['listsag'] = $listsag;
|
||||
|
||||
|
||||
$pdf = PDF::loadView('pdf.listlelong',compact('arrayinfo','lelongid','brglelong','lelong_id','keuntungan','total_hargaasas','total_berat'))
|
||||
->setPaper('a4', 'potrait');
|
||||
$pdf = PDF::loadView('pdf.listlelong',compact('arrayinfo','marhuns','lelong_id','keuntungan','total_hargaasas','total_berat','datasimulasi'))
|
||||
->setPaper('a4', 'landscape');
|
||||
|
||||
return $pdf->download('Senarai Barang Lelong.pdf');
|
||||
}
|
||||
@@ -180,7 +199,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()->toArray();
|
||||
|
||||
@@ -263,7 +282,7 @@ class ReportController extends Controller
|
||||
->join('cawangan','cawangan_lelong.caw_id','=','cawangan.id')
|
||||
->where('cawangan_lelong.lelong_id','=',$lelong_id)
|
||||
->where('cawangan.caw_code',$kodcaw)
|
||||
->select('lelong_id','tarikh_lelong','fasa')
|
||||
->select('lelong_id','tarikh_lelong','lelong.fasa')
|
||||
->groupBy('lelong_id')
|
||||
->get();
|
||||
|
||||
@@ -448,6 +467,8 @@ class ReportController extends Controller
|
||||
array_push($arrayinfocaw,['laporancaw' => $laporancaw,'cawangan' => $cawangan]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$brglelpembida = LelongBid::join('gadai','lelongbid.norujukan','=','gadai.norujukan')
|
||||
->join('lelongbidder','lelongbid.id','=','lelongbidder.lelongbid_id')
|
||||
->where('lelongbid.kodcaw',$kodcaw)
|
||||
@@ -461,7 +482,6 @@ class ReportController extends Controller
|
||||
$total_hargaasas = $total_hargaasas + $totalbrglelpembida['hargaasas'];
|
||||
$total_hargalelong = $total_hargalelong + $totalbrglelpembida['hargabida'];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user