fuel info

This commit is contained in:
Pringgosutono
2025-12-04 08:35:57 +07:00
parent 7180b14f76
commit b0f51efb0e
2 changed files with 12 additions and 203 deletions

View File

@ -74,7 +74,7 @@ class VehiclesController extends Controller
$list = DB::select("SELECT $list = DB::select("SELECT
v.id, v.name, v.device_id, nopol1, nopol2, nopol3, v.sum_milleage, v.id, v.name, v.device_id, nopol1, nopol2, nopol3, v.sum_milleage,
fvhc_img, vyear, t.`desc` type_name, c_name company_name, rltm.crt_d, rltm.crt crt_rltm, fvhc_img, vyear, t.`desc` type_name, c_name company_name, rltm.crt_d, rltm.crt crt_rltm,
dvc.crt, dvc.simcard dvc.crt, dvc.simcard, fuel_curr
FROM t_vehicles as v FROM t_vehicles as v
INNER JOIN t_vehicles_detail AS vd ON v.id = vd.vid INNER JOIN t_vehicles_detail AS vd ON v.id = vd.vid
LEFT JOIN t_vehicles_types AS t ON v.type_id = t.id LEFT JOIN t_vehicles_types AS t ON v.type_id = t.id

View File

@ -56,6 +56,7 @@
<th class="">Type</th> <th class="">Type</th>
<th class="">Manufacture Year</th> <th class="">Manufacture Year</th>
<th class=""><span class="text-nowrap">Mileage <span class="text-lowercase">(km)</span></span></th> <th class=""><span class="text-nowrap">Mileage <span class="text-lowercase">(km)</span></span></th>
<th class=""><span class="text-nowrap">Fuel <span class="text-lowercase">(L)</span></span></th>
<th class="">Company</th> <th class="">Company</th>
</tr> </tr>
</thead> </thead>
@ -753,42 +754,6 @@
}, },
}, },
{ data: 'name', className: 'text-start text-nowrap', visible: true, orderable: true, searchable: true }, { data: 'name', className: 'text-start text-nowrap', visible: true, orderable: true, searchable: true },
// {
// data: 'stnk_img',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// // exp: ${row.stnk_exp?.split('-').reverse().join('-') || ''}
// return `
// <img src="${State.storage_lara}${data}" class="img-fluid thumb-img-table" /><br>
// ${row.nopol1} ${row.nopol2} ${row.nopol3}<br>
// exp: ${moment(row.stnk_exp).format('DD MMM YYYY') || '-'}
// `;
// },
// },
// {
// data: 'tax_exp',
// className: 'text-end text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// // return (`${data?.split('-').reverse().join('-') || '-'}`);
// return (`${moment(data).format('DD MMM YYYY') || '-'}`);
// },
// },
// {
// data: 'kir_exp',
// className: 'text-end text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${moment(data).format('DD MMM YYYY') || '-'}`);
// },
// },
{ {
data: 'crt', data: 'crt',
className: 'text-end text-nowrap', className: 'text-end text-nowrap',
@ -833,36 +798,6 @@
}, },
}, },
@endif @endif
// {
// data: 'dc_fullname',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (
// `${data}<br>` +
// `<a href="tel:0${row.dc_phone}">${Helper.splitEvery4Char('0'+row.dc_phone)}</a>` +
// ` || ` +
// `<a href="https://api.whatsapp.com/send/?phone=62${row.dc_phone}&text=Halo&app_absent=0" class="bg-light" target="_blank"><i class="text-success ion-social-whatsapp"></i></a>`
// );
// },
// },
// {
// data: 'da_fullname',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (
// `${data}<br>` +
// `<a href="tel:0${row.da_phone}">${Helper.splitEvery4Char('0'+row.da_phone)}</a>` +
// ` || ` +
// `<a href="https://api.whatsapp.com/send/?phone=62${row.da_phone}&text=Halo&app_absent=0" class="bg-light" target="_blank"><i class="text-success ion-social-whatsapp"></i></a>`
// );
// },
// },
{ {
data: 'type_name', data: 'type_name',
className: 'text-start text-nowrap', className: 'text-start text-nowrap',
@ -884,125 +819,6 @@
return (`${(data || '-')}`); return (`${(data || '-')}`);
}, },
}, },
// {
// data: 'cc',
// className: 'text-start',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${(data || '0')} CC`);
// },
// },
// {
// data: 'vin',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${Helper.splitEvery4Char(data || '-')}`);
// },
// },
// {
// data: 'en',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${Helper.splitEvery4Char(data || '-')}`);
// },
// },
// {
// data: 'vcolor',
// className: 'text-start',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${(data || '-')}`);
// },
// },
// {
// data: 'fuel_type',
// className: 'text-start',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${(data || '-')}`);
// },
// },
// {
// data: 'tnkb_color',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${(data || '-')}`);
// },
// },
// {
// data: 'regis_year',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return (`${(data || '-')}`);
// },
// },
// {
// data: 'speed_limit',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'fuel_capacity',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'fuel_drop_treshold',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'max_pressure',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'alert_zones',
// className: 'text-start',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'is_track_holiday_text',
// className: 'text-start',
// visible: true,
// orderable: true,
// searchable: true,
// },
// {
// data: 'track_schedule',
// className: 'text-end',
// visible: true,
// orderable: true,
// searchable: true,
// },
{ {
data: 'sum_milleage', data: 'sum_milleage',
className: 'text-end', className: 'text-end',
@ -1013,13 +829,16 @@
return Number(data).toFixed(2); return Number(data).toFixed(2);
} }
}, },
// { {
// data: 'cameras', data: 'fuel_curr',
// className: 'text-start', className: 'text-end',
// visible: true, visible: true,
// orderable: true, orderable: true,
// searchable: true, searchable: true,
// }, render: function(data, type, row, meta) {
return Number(data/10).toFixed(1);
}
},
{ {
data: 'company_name', data: 'company_name',
className: 'text-start text-nowrap', className: 'text-start text-nowrap',
@ -1030,16 +849,6 @@
return data || '-'; return data || '-';
} }
}, },
// {
// data: 'group_name',
// className: 'text-start text-nowrap',
// visible: true,
// orderable: true,
// searchable: true,
// render: function(data, type, row, meta) {
// return data || 'All Group';
// }
// },
{ data: 'device_id', visible: false}, { data: 'device_id', visible: false},
], ],
buttons: [ buttons: [