update add pool filter on vehicle trips report
This commit is contained in:
@ -25,10 +25,12 @@ class ReportsController extends Controller
|
||||
$q = "SELECT id, nopol1 from t_vehicles WHERE dlt is null order by nopol1";
|
||||
$vehicletype = DB::table('t_vehicles_cats')->where('is_active', 1)->get();
|
||||
$listNopol = DB::select($q);
|
||||
$listpool = DB::table('t_conf_pools')->where('is_active')->get();
|
||||
|
||||
$data = [
|
||||
'listNopol' => $listNopol,
|
||||
'vehicletype' => $vehicletype
|
||||
'vehicletype' => $vehicletype,
|
||||
'listpool' => $listpool
|
||||
];
|
||||
|
||||
$log = [
|
||||
@ -63,6 +65,7 @@ class ReportsController extends Controller
|
||||
$to_date = $req->input('to_date') - Helper::TIMEFIX;
|
||||
$vid = $req->input('vid');
|
||||
$vt = $req->input('vt');
|
||||
$poolcode = $req->input('poolcode');
|
||||
// $from_date = 1756054800;
|
||||
// $to_date = 1756745940;
|
||||
|
||||
@ -161,7 +164,8 @@ class ReportsController extends Controller
|
||||
t.start BETWEEN ? AND ?
|
||||
and if(? , t.id = ? , 1=1)
|
||||
and if(? , vt.id = ? , 1=1)
|
||||
", [$from_date, $to_date, $from_date, $to_date, $vid, $vid, $vt, $vt]);
|
||||
and if(? , t.pool_code = ? , 1=1)
|
||||
", [$from_date, $to_date, $from_date, $to_date, $vid, $vid, $vt, $vt, $poolcode, $poolcode]);
|
||||
|
||||
// // RETURN 1 - LIST
|
||||
// if($req->type != 'report'){
|
||||
|
||||
Reference in New Issue
Block a user