Compare commits

...

2 Commits

Author SHA1 Message Date
c25d3dbab6 update 2026-06-17 11:55:56 +07:00
2a2f3eac9a update 2026-06-17 11:54:58 +07:00
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ class ReportsController extends Controller
public function view_report_vehicle_trips(Request $req) public function view_report_vehicle_trips(Request $req)
{ {
$q = "SELECT id, nopol1 from t_vehicles WHERE dlt is null order by nopol1"; $q = "SELECT id, nopol1 from t_vehicles WHERE dlt is null order by nopol1";
$vehicletype = DB::table('t_vehicles_types')->where('is_active', 1)->get(); $vehicletype = DB::table('t_vehicles_cats')->where('is_active', 1)->get();
$listNopol = DB::select($q); $listNopol = DB::select($q);
$data = [ $data = [
@ -156,7 +156,7 @@ class ReportsController extends Controller
FROM trips t FROM trips t
JOIN TotalMileage tm ON t.id = tm.id JOIN TotalMileage tm ON t.id = tm.id
LEFT JOIN t_vehicles tvt ON tvt.id = t.vhc_id LEFT JOIN t_vehicles tvt ON tvt.id = t.vhc_id
LEFT JOIN t_vehicles_types vt ON vt.id = tvt.type_id LEFT JOIN t_vehicles_cats vt ON vt.id = tvt.cat_id
WHERE WHERE
t.start BETWEEN ? AND ? t.start BETWEEN ? AND ?
and if(? , t.id = ? , 1=1) and if(? , t.id = ? , 1=1)

View File

@ -69,7 +69,7 @@
<div class="col-md-2"> <div class="col-md-2">
<div class="form-group"> <div class="form-group">
<label class="form-label text-muted mb-1">Vehicle Type</label> <label class="form-label text-muted mb-1">Vehicle Category</label>
<select name="vehicle_type" class="form-control" id="vehicleType"> <select name="vehicle_type" class="form-control" id="vehicleType">
<option value="">-- All --</option> <option value="">-- All --</option>
@foreach ($vehicletype as $vehicletypes) @foreach ($vehicletype as $vehicletypes)
@ -107,7 +107,7 @@
<th class="">Finish (km)</th> <th class="">Finish (km)</th>
<th class="">Distance (km)</th> <th class="">Distance (km)</th>
<th class="">Fuel (L)</th> <th class="">Fuel (L)</th>
<th class="">Vehicle Type</th> <th class="">Vehicle Category</th>
<th class="">Detail</th> <th class="">Detail</th>
</tr> </tr>
</thead> </thead>