CHANGE__Case_Change_in_MiS_Report__By__VADIVEL_J__2025-10-28_18:18
This commit is contained in:
parent
bf4e66ff54
commit
51a079504c
@ -124,9 +124,10 @@ class AuthController extends ResourceController
|
||||
|
||||
// Format date for FE
|
||||
$user = $this->userModel->select('user_id,first_name,last_name,role_id,org_id,group_id,last_login_at')->where('email', $data->email)->first();
|
||||
$user['last_login_at'] = !empty($user['last_login_at'])
|
||||
? date('d, M-Y h:iA', strtotime($user['last_login_at']))
|
||||
: null;
|
||||
$user['last_login_at'] = empty($user['last_login_at'])
|
||||
? null
|
||||
: date('d, M-Y h:iA', strtotime($user['last_login_at']));
|
||||
|
||||
|
||||
|
||||
//get service for the organization
|
||||
|
||||
@ -43,10 +43,10 @@ class ReportsController extends BaseController
|
||||
}
|
||||
|
||||
// Separate domestic
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'domestic'));
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'Domestic'));
|
||||
|
||||
// Separate international
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'international'));
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'International'));
|
||||
|
||||
if(isset($data['export']))
|
||||
{
|
||||
@ -108,10 +108,10 @@ class ReportsController extends BaseController
|
||||
}
|
||||
|
||||
// Separate domestic
|
||||
$domestic = array_values(array_filter($flat_result, fn($row) => $row['plan_trip_type'] === 'domestic'));
|
||||
$domestic = array_values(array_filter($flat_result, fn($row) => $row['plan_trip_type'] === 'Domestic'));
|
||||
|
||||
// Separate international
|
||||
$international = array_values(array_filter($flat_result, fn($row) => $row['plan_trip_type'] === 'international'));
|
||||
$international = array_values(array_filter($flat_result, fn($row) => $row['plan_trip_type'] === 'International'));
|
||||
|
||||
|
||||
|
||||
@ -167,10 +167,10 @@ class ReportsController extends BaseController
|
||||
}
|
||||
|
||||
// Separate domestic
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'domestic'));
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'Domestic'));
|
||||
|
||||
// Separate international
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'international'));
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'International'));
|
||||
|
||||
if(isset($data['export']))
|
||||
{
|
||||
@ -222,10 +222,10 @@ class ReportsController extends BaseController
|
||||
}
|
||||
|
||||
// Separate domestic
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'domestic'));
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'Domestic'));
|
||||
|
||||
// Separate international
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'international'));
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'International'));
|
||||
|
||||
|
||||
if(isset($data['export']))
|
||||
@ -324,10 +324,10 @@ class ReportsController extends BaseController
|
||||
}
|
||||
|
||||
// Separate domestic
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'domestic'));
|
||||
$domestic = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'Domestic'));
|
||||
|
||||
// Separate international
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'international'));
|
||||
$international = array_values(array_filter($result, fn($row) => $row['plan_trip_type'] === 'International'));
|
||||
|
||||
if(isset($data['export']))
|
||||
{
|
||||
|
||||
@ -21,8 +21,8 @@ class ReportsModel extends Model
|
||||
m_plan.so_number,
|
||||
m_cost_center.name AS cost_center,
|
||||
CASE
|
||||
WHEN m_plan.trip_type = 1 THEN 'domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'international'
|
||||
WHEN m_plan.trip_type = 1 THEN 'Domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'International'
|
||||
ELSE 'unknown'
|
||||
END AS plan_trip_type,
|
||||
al.Service,
|
||||
@ -124,8 +124,8 @@ class ReportsModel extends Model
|
||||
'{$serviceAlias}' As 'Service',
|
||||
COUNT(*) AS service_count,
|
||||
CASE
|
||||
WHEN m_plan.trip_type = 1 THEN 'domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'international'
|
||||
WHEN m_plan.trip_type = 1 THEN 'Domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'International'
|
||||
ELSE 'unknown'
|
||||
END AS plan_trip_type
|
||||
FROM
|
||||
@ -169,8 +169,8 @@ class ReportsModel extends Model
|
||||
m_cost_center.name AS cost_center,
|
||||
c_flight.trip_type AS flight_trip_type,
|
||||
CASE
|
||||
WHEN m_plan.trip_type = 1 THEN 'domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'international'
|
||||
WHEN m_plan.trip_type = 1 THEN 'Domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'International'
|
||||
ELSE 'unknown'
|
||||
END AS plan_trip_type,
|
||||
-- CONCAT_WS(' - ',
|
||||
@ -230,8 +230,8 @@ class ReportsModel extends Model
|
||||
m_plan.so_number,
|
||||
m_cost_center.name AS cost_center,
|
||||
CASE
|
||||
WHEN m_plan.trip_type = 1 THEN 'domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'international'
|
||||
WHEN m_plan.trip_type = 1 THEN 'Domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'International'
|
||||
ELSE 'unknown'
|
||||
END AS plan_trip_type,
|
||||
c_accomodation.hotel_name AS hotel_name,
|
||||
@ -331,8 +331,8 @@ class ReportsModel extends Model
|
||||
m_cost_center.name AS cost_center,
|
||||
c_flight.trip_type AS flight_trip_type,
|
||||
CASE
|
||||
WHEN m_plan.trip_type = 1 THEN 'domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'international'
|
||||
WHEN m_plan.trip_type = 1 THEN 'Domestic'
|
||||
WHEN m_plan.trip_type = 2 THEN 'International'
|
||||
ELSE 'unknown'
|
||||
END AS plan_trip_type,
|
||||
CONCAT_WS(' - ',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user