laporan backdate update
This commit is contained in:
@@ -961,9 +961,48 @@ class ReportController extends Controller
|
||||
|
||||
public function bdbrglelong (){
|
||||
|
||||
return view('laporan.bdbrglelong');
|
||||
$caw = Cawangan::all();
|
||||
|
||||
return view('laporan.bdbrglelong',compact('caw'));
|
||||
}
|
||||
|
||||
public function cetakbdbrglelong (Request $request){
|
||||
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
$tarikh_cetak = $current->toDateString();
|
||||
$arraydetails = [];
|
||||
|
||||
$cawangan_id = $request->caw;
|
||||
|
||||
if($request->datemula == null){
|
||||
$mula_date = '2017-01-01';
|
||||
}else{
|
||||
$split_date = explode('-', $request->datemula);
|
||||
$mula_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
if($request->datehingga == null){
|
||||
$hingga_date = $current->toDateString();
|
||||
}else{
|
||||
$split_date = explode('-', $request->datehingga);
|
||||
$hingga_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
|
||||
}
|
||||
|
||||
$cawangan = Cawangan::where('cawangan.id',$cawangan_id)
|
||||
->join('cawangan_lelong','cawangan.id','=','cawangan_lelong.caw_id')
|
||||
->join('lelong','cawangan_lelong.lelong_id','=','lelong.id')
|
||||
->join('lelongbid','cawangan.caw_code','=','lelongbid.kodcaw')
|
||||
->where([['tarikh_lelong','>=',$request->datemula],['tarikh_lelong','<=',$request->datehingga]])
|
||||
->get()->toArray();
|
||||
|
||||
|
||||
return view('pdf.cetakbdbrglelong',compact('cawangan'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user