update error report
This commit is contained in:
@@ -123,6 +123,8 @@ class ReportController extends Controller
|
||||
foreach($datasimulasi as $index=>$totharga){
|
||||
|
||||
$total_hargaasas = $total_hargaasas + $totharga['hargaasas'];
|
||||
$total_berat = $total_berat + $totharga['berat'];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -137,10 +139,7 @@ class ReportController extends Controller
|
||||
->where('nokp','=',$upah['nokp'])
|
||||
->get();
|
||||
|
||||
foreach($listsag as $index=>$listing){
|
||||
|
||||
$total_berat = $total_berat + $listing['berat'];
|
||||
}
|
||||
|
||||
}
|
||||
$marhuns[$index1]['listsag'] = $listsag;
|
||||
|
||||
@@ -972,6 +971,8 @@ class ReportController extends Controller
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
$arraydetails = [];
|
||||
$total_berat = 0;
|
||||
$total_hargaasas = 0;
|
||||
|
||||
$cawangan_id = $request->caw;
|
||||
|
||||
@@ -994,10 +995,25 @@ class ReportController extends Controller
|
||||
->join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('lelongbid','cawangan.caw_code','=','lelongbid.kodcaw')
|
||||
->where([['tarikh_lelong','>=',$request->datemula],['tarikh_lelong','<=',$request->datehingga]])
|
||||
->select('norujukan','marhun','berat','hargaasas','cawangan_lelong.lelong_id','lelongbid.id','cawangan.caw_code')
|
||||
->get()->toArray();
|
||||
|
||||
|
||||
return view('pdf.cetakbdbrglelong',compact('cawangan'));
|
||||
foreach($cawangan as $index1=>$brglelong){
|
||||
|
||||
$data = LelongBid::where('id','=',$brglelong['id'])
|
||||
->where('kodcaw','=',$brglelong['caw_code'])
|
||||
->get();
|
||||
$total_berat = $total_berat + ($data->sum('berat'));
|
||||
$total_hargaasas = $total_hargaasas + ($data->sum('hargaasas'));
|
||||
|
||||
|
||||
}
|
||||
// dd($total_berat);
|
||||
|
||||
|
||||
|
||||
return view('pdf.cetakbdbrglelong',compact('cawangan','total_berat','total_hargaasas'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user