update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9c4065664060e30527ea8d3ae579acb9d4bc42cabe3879cf6e48eb8b3c8bfcade90ca667a5a95597';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 09:50:34 [1.59ms] */
select * from `oauth_access_tokens` where `id` = '9c4065664060e30527ea8d3ae579acb9d4bc42cabe3879cf6e48eb8b3c8bfcade90ca667a5a95597' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 09:50:34 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '9c4065664060e30527ea8d3ae579acb9d4bc42cabe3879cf6e48eb8b3c8bfcade90ca667a5a95597' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 09:50:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 09:50:34 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 09:50:34 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '9c4065664060e30527ea8d3ae579acb9d4bc42cabe3879cf6e48eb8b3c8bfcade90ca667a5a95597' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 09:50:34 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 09:50:34 [1.1ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 09:54:02 [2.2ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 09:54:02 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 09:54:02 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 09:54:02 [12.7ms] */
update `userprofiles` set `login_count` = 358, `last_login` = '2025-02-14 09:54:02', `userprofiles`.`updated_at` = '2025-02-14 09:54:02' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 09:54:02 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 09:54:02 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 09:54:02 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 09:54:02 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 09:54:02 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 09:54:02 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 09:54:02 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 09:54:02 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 09:54:02 [3.29ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('251068d58192b5aac037874230e6ae7a1d1ca3f3968984d39945a6a4722dfd8660e4dbf9b7662972', 149, 5, '[]', 0, '2025-02-14 09:54:02', '2025-02-14 09:54:02', '2026-02-14 09:54:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 09:54:02 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '251068d58192b5aac037874230e6ae7a1d1ca3f3968984d39945a6a4722dfd8660e4dbf9b7662972' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 09:54:02 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '251068d58192b5aac037874230e6ae7a1d1ca3f3968984d39945a6a4722dfd8660e4dbf9b7662972';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 09:54:04 [2.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 09:54:04 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 09:54:04 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 09:54:04 [6.32ms] */
update `userprofiles` set `login_count` = 359, `last_login` = '2025-02-14 09:54:04', `userprofiles`.`updated_at` = '2025-02-14 09:54:04' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 09:54:04 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 09:54:04 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 09:54:04 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 09:54:04 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 09:54:04 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 09:54:04 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 09:54:04 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 09:54:04 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 09:54:04 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5d93b1abbcc8d489daf5ec52a8a3755707760fba3fc251825fa0cca9aee516853d6afc18bb1c8520', 149, 5, '[]', 0, '2025-02-14 09:54:04', '2025-02-14 09:54:04', '2026-02-14 09:54:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 09:54:04 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '5d93b1abbcc8d489daf5ec52a8a3755707760fba3fc251825fa0cca9aee516853d6afc18bb1c8520' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 09:54:04 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5d93b1abbcc8d489daf5ec52a8a3755707760fba3fc251825fa0cca9aee516853d6afc18bb1c8520';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 10:04:41 [2.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 10:04:41 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 10:04:41 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 10:04:41 [5.92ms] */
update `userprofiles` set `login_count` = 360, `last_login` = '2025-02-14 10:04:41', `userprofiles`.`updated_at` = '2025-02-14 10:04:41' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 10:04:41 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 10:04:41 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 10:04:41 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 10:04:41 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 10:04:41 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 10:04:41 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 10:04:41 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 10:04:41 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 10:04:41 [3.34ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d', 149, 5, '[]', 0, '2025-02-14 10:04:41', '2025-02-14 10:04:41', '2026-02-14 10:04:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 10:04:41 [0.5ms] */
select * from `oauth_access_tokens` where `id` = 'f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 10:04:41 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 10:04:41 [2.47ms] */
select * from `oauth_access_tokens` where `id` = 'f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 10:04:41 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 10:04:41 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 10:04:41 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 10:04:41 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'f12dfb6d1733402a3949a9c33612bc93cbf452198abb21f57ce357ecba6178493704ed33f7790b5d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 10:04:41 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 10:04:41 [0.38ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 10:04:41 [0.16ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 10:04:41 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 10:04:42 [2.27ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 10:04:42 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 10:04:42 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 10:04:42 [10.99ms] */
update `userprofiles` set `login_count` = 361, `last_login` = '2025-02-14 10:04:42', `userprofiles`.`updated_at` = '2025-02-14 10:04:42' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 10:04:42 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 10:04:42 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 10:04:42 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 10:04:42 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 10:04:42 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 10:04:42 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 10:04:42 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 10:04:42 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 10:04:42 [3.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33', 149, 5, '[]', 0, '2025-02-14 10:04:42', '2025-02-14 10:04:42', '2026-02-14 10:04:42');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 10:04:42 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 10:04:42 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 10:04:42 [1.54ms] */
select * from `oauth_access_tokens` where `id` = '1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 10:04:42 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 10:04:42 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 10:04:42 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 10:04:42 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1b9c2a214c71d426bd54e0b6733cd9d6377f3a9be7b919b1d43731620e028b183dec0c07fccbeb33' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 10:04:42 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 10:04:42 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 10:07:24 [2.85ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 10:07:24 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 10:07:24 [0.55ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 10:07:24 [6.28ms] */
update `userprofiles` set `login_count` = 362, `last_login` = '2025-02-14 10:07:24', `userprofiles`.`updated_at` = '2025-02-14 10:07:24' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 10:07:24 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 10:07:24 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 10:07:24 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 10:07:24 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 10:07:24 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 10:07:24 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 10:07:24 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 10:07:24 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 10:07:24 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430', 149, 5, '[]', 0, '2025-02-14 10:07:24', '2025-02-14 10:07:24', '2026-02-14 10:07:24');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 10:07:24 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 10:07:24 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 10:07:24 [2.54ms] */
select * from `oauth_access_tokens` where `id` = '85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 10:07:24 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 10:07:24 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 10:07:24 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 10:07:24 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '85a132610e4b2583d498db4d3142f333d8217dce071503f72acb0f582b4aad87abbbd5a1ea1bf430' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 10:07:24 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 10:07:24 [0.33ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 10:07:24 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 10:07:24 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 10:07:25 [1.42ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 10:07:25 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 10:07:25 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 10:07:25 [12.03ms] */
update `userprofiles` set `login_count` = 363, `last_login` = '2025-02-14 10:07:25', `userprofiles`.`updated_at` = '2025-02-14 10:07:25' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 10:07:25 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 10:07:25 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 10:07:25 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 10:07:25 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 10:07:25 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 10:07:25 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 10:07:25 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 10:07:25 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 10:07:25 [6.56ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106', 149, 5, '[]', 0, '2025-02-14 10:07:25', '2025-02-14 10:07:25', '2026-02-14 10:07:25');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 10:07:25 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 10:07:25 [3.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 10:07:25 [2.56ms] */
select * from `oauth_access_tokens` where `id` = '734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 10:07:25 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 10:07:25 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 10:07:25 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 10:07:25 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '734651935f0a9c02ca6aa3515d4e40f82a48dd40bc09dd4fce220fb4634ebc198304e4f80eb85106' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 10:07:25 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 10:07:25 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:27:03 [1.82ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:27:03 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:27:03 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:27:03 [18.71ms] */
update `userprofiles` set `login_count` = 364, `last_login` = '2025-02-14 11:27:03', `userprofiles`.`updated_at` = '2025-02-14 11:27:03' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:27:03 [0.45ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:27:03 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:27:03 [0.52ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:27:03 [0.32ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:27:03 [0.24ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:27:03 [0.36ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:27:03 [0.37ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:27:03 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:27:03 [3.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8', 149, 5, '[]', 0, '2025-02-14 11:27:03', '2025-02-14 11:27:03', '2026-02-14 11:27:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:27:03 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:27:03 [2.94ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:27:03 [2.37ms] */
select * from `oauth_access_tokens` where `id` = '75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:27:03 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:27:03 [0.47ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:27:03 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:27:03 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '75f1014633809bfb5f3bef88cc2e1c188df390a86c44849ac8b74ca644bb8820d27036a262b868b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:27:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:27:03 [1.18ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:27:03 [0.59ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:27:03 [0.54ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:27:04 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:27:04 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:27:04 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:27:04 [6.16ms] */
update `userprofiles` set `login_count` = 365, `last_login` = '2025-02-14 11:27:04', `userprofiles`.`updated_at` = '2025-02-14 11:27:04' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:27:04 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:27:04 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:27:04 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:27:04 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:27:04 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:27:04 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:27:04 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:27:04 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:27:04 [3.29ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26', 149, 5, '[]', 0, '2025-02-14 11:27:04', '2025-02-14 11:27:04', '2026-02-14 11:27:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:27:04 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:27:04 [4.96ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:27:05 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:27:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:27:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:27:05 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:27:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1bf621e3836895f73864755c2605963ab4567da036686e85d4246a5be03718912ed392ac5a7bda26' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:27:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:27:05 [0.85ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:30 [1.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:30 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:30 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:30 [6.25ms] */
update `userprofiles` set `login_count` = 366, `last_login` = '2025-02-14 11:30:30', `userprofiles`.`updated_at` = '2025-02-14 11:30:30' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:30 [0.22ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:30 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:30 [0.18ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:30 [0.27ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:30 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:30 [0.24ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:30 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:30 [3.45ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301', 149, 5, '[]', 0, '2025-02-14 11:30:30', '2025-02-14 11:30:30', '2026-02-14 11:30:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:30 [0.47ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:30 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:30 [2.6ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:30 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:30 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:30 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:30 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:30 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:30 [0.48ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:30 [0.25ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:30 [0.24ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:30 [2.11ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:30 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:30 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:30 [0.33ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:30 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:30 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:30 [0.91ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:30 [0.26ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:30 [0.27ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:31 [2.24ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:31 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:31 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:31 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '064e92623ce3172b13e1fbcc2c3c99537bf36a1746ebf8e06273d4e8ad06f14434c6175543da6301' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:31 [0.79ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:31 [0.25ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:31 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:35 [2.42ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:35 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:35 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:35 [6.19ms] */
update `userprofiles` set `login_count` = 367, `last_login` = '2025-02-14 11:30:35', `userprofiles`.`updated_at` = '2025-02-14 11:30:35' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:35 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:35 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:35 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:35 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:35 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:35 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:35 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:35 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:35 [3.43ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2', 149, 5, '[]', 0, '2025-02-14 11:30:35', '2025-02-14 11:30:35', '2026-02-14 11:30:35');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:35 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:35 [3.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:35 [1.64ms] */
select * from `oauth_access_tokens` where `id` = '8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:35 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:35 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:35 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:35 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8353d9aa89cb05af08d15d4c27e38adc85ccfba0f02822c7c19d53d0f2bf88d5bef977bdca3b6ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:35 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:35 [0.38ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:35 [0.16ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:35 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:36 [2.53ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:36 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:36 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:36 [3.38ms] */
update `userprofiles` set `login_count` = 368, `last_login` = '2025-02-14 11:30:36', `userprofiles`.`updated_at` = '2025-02-14 11:30:36' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:36 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:36 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:36 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:36 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:36 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:36 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:36 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:36 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:36 [3.11ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad', 149, 5, '[]', 0, '2025-02-14 11:30:36', '2025-02-14 11:30:36', '2026-02-14 11:30:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:36 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'd6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:36 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:30:37 [1.86ms] */
select * from `oauth_access_tokens` where `id` = 'd6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:30:37 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'd6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:30:37 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:30:37 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:30:37 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd6b6bb201e88cde2d58e17687d51dc8a22ba782388b8b2c83413406032d6778feaf5f64400f9ebad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:30:37 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:30:37 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:45 [2.45ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:45 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:45 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:45 [11.06ms] */
update `userprofiles` set `login_count` = 369, `last_login` = '2025-02-14 11:30:45', `userprofiles`.`updated_at` = '2025-02-14 11:30:45' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:45 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:45 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:45 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:45 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:45 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:45 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:45 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:45 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:45 [7.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980', 149, 5, '[]', 0, '2025-02-14 11:30:45', '2025-02-14 11:30:45', '2026-02-14 11:30:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:45 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:45 [3.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:45 [2.3ms] */
select * from `oauth_access_tokens` where `id` = '08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:45 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:45 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:45 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:45 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '08fb18b007c94912a2abfd2af105b81d6ed501182183efc6285f43aeaacbce8af91eed4d8344d980' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:45 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:45 [0.33ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:45 [0.16ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:45 [0.17ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:46 [1.42ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:46 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:46 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:46 [13.05ms] */
update `userprofiles` set `login_count` = 370, `last_login` = '2025-02-14 11:30:46', `userprofiles`.`updated_at` = '2025-02-14 11:30:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:46 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:46 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:46 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:46 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:46 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:46 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:46 [7.63ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2', 149, 5, '[]', 0, '2025-02-14 11:30:46', '2025-02-14 11:30:46', '2026-02-14 11:30:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:46 [0.42ms] */
select * from `oauth_access_tokens` where `id` = '01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:46 [7.47ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:30:46 [2.46ms] */
select * from `oauth_access_tokens` where `id` = '01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:30:46 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:30:46 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:30:46 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:30:46 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '01a5a76272d2976da554f92b71a6c0740fbfe25c7d5ba568c64d0bc2c9f10ae8f3e61ae7054fc7b2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:30:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:30:46 [1.25ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:52 [1.44ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:52 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:52 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:52 [11.2ms] */
update `userprofiles` set `login_count` = 371, `last_login` = '2025-02-14 11:30:52', `userprofiles`.`updated_at` = '2025-02-14 11:30:52' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:52 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:52 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:52 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:52 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:52 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:52 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:52 [3.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86', 149, 5, '[]', 0, '2025-02-14 11:30:52', '2025-02-14 11:30:52', '2026-02-14 11:30:52');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:52 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:52 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:30:52 [2.59ms] */
select * from `oauth_access_tokens` where `id` = 'b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:30:52 [0.22ms] */
select * from `oauth_access_tokens` where `id` = 'b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:30:52 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:30:52 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:30:52 [0.22ms] */
select * from `oauth_access_tokens` where `id` = 'b10625e8e007f5a652e226a9eeefb9a85b85cb830516a04c2f23b6e077fabe27149e777f5bc0db86' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:30:52 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:30:52 [0.52ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:30:52 [0.27ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:30:52 [0.24ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:30:53 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:30:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:30:53 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:30:53 [9.04ms] */
update `userprofiles` set `login_count` = 372, `last_login` = '2025-02-14 11:30:53', `userprofiles`.`updated_at` = '2025-02-14 11:30:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:30:53 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:30:53 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:30:53 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:30:53 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:30:53 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:30:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:30:53 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65', 149, 5, '[]', 0, '2025-02-14 11:30:53', '2025-02-14 11:30:53', '2026-02-14 11:30:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:30:53 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:30:53 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:30:53 [1.54ms] */
select * from `oauth_access_tokens` where `id` = '7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:30:53 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7c5d5c7477984f559732ea61c28d8d25f0343db3b2c707f4507614df06eacea516f57fa9d48c5d65' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:30:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:30:53 [1.04ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:47:32 [2.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:47:32 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:47:32 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:47:32 [11.33ms] */
update `userprofiles` set `login_count` = 373, `last_login` = '2025-02-14 11:47:32', `userprofiles`.`updated_at` = '2025-02-14 11:47:32' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:47:32 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:47:32 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:47:32 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:47:32 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:47:32 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:47:32 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:47:32 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:47:32 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:47:32 [3.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d1fa791ab97fc31a2a9a89ee3cec9ce838e87b39c154d0e43a86b6ca9b4e0d2ca128ed09ed6328b3', 149, 5, '[]', 0, '2025-02-14 11:47:32', '2025-02-14 11:47:32', '2026-02-14 11:47:32');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:47:32 [0.43ms] */
select * from `oauth_access_tokens` where `id` = 'd1fa791ab97fc31a2a9a89ee3cec9ce838e87b39c154d0e43a86b6ca9b4e0d2ca128ed09ed6328b3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:47:32 [2.89ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd1fa791ab97fc31a2a9a89ee3cec9ce838e87b39c154d0e43a86b6ca9b4e0d2ca128ed09ed6328b3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:47:53 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:47:53 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:47:53 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:47:53 [5.91ms] */
update `userprofiles` set `login_count` = 374, `last_login` = '2025-02-14 11:47:53', `userprofiles`.`updated_at` = '2025-02-14 11:47:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:47:53 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:47:53 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:47:53 [0.18ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:47:53 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:47:53 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:47:53 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:47:53 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:47:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:47:53 [6.59ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116', 149, 5, '[]', 0, '2025-02-14 11:47:53', '2025-02-14 11:47:53', '2026-02-14 11:47:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:47:53 [0.44ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:47:53 [3.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:47:53 [2.66ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:47:53 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:47:53 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:47:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:47:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:47:53 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:47:53 [0.17ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:47:53 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:47:53 [1.43ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:47:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:47:53 [0.33ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:47:53 [0.15ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:47:53 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:47:53 [1.4ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:47:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:47:53 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'eed4ddb6f9a443196a72f4ac474bb9da141d1f6e540c470e8d1c6092853bc2badb2d7193eb845116' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:47:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:47:53 [0.35ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:47:53 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:47:53 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:47:59 [1.48ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:47:59 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:47:59 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:47:59 [10.92ms] */
update `userprofiles` set `login_count` = 375, `last_login` = '2025-02-14 11:47:59', `userprofiles`.`updated_at` = '2025-02-14 11:47:59' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:47:59 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:47:59 [0.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:47:59 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:47:59 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:47:59 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:47:59 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:47:59 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:47:59 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:47:59 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53', 149, 5, '[]', 0, '2025-02-14 11:47:59', '2025-02-14 11:47:59', '2026-02-14 11:47:59');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:47:59 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:47:59 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:47:59 [1.62ms] */
select * from `oauth_access_tokens` where `id` = '34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:47:59 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:47:59 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:47:59 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:47:59 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '34a8518c5a66ff08d0173f1363c6fb05262fa0ec8e0a4b07013302f25c3f2418ea8f1d7c92384f53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:47:59 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:47:59 [0.36ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:47:59 [0.16ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:47:59 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:48:01 [1.41ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:48:01 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:48:01 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:48:01 [3.16ms] */
update `userprofiles` set `login_count` = 376, `last_login` = '2025-02-14 11:48:01', `userprofiles`.`updated_at` = '2025-02-14 11:48:01' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:48:01 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:48:01 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:48:01 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:48:01 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:48:01 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:48:01 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:48:01 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:48:01 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:48:01 [3.01ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3', 149, 5, '[]', 0, '2025-02-14 11:48:01', '2025-02-14 11:48:01', '2026-02-14 11:48:01');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:48:01 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:48:01 [2.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:48:01 [1.59ms] */
select * from `oauth_access_tokens` where `id` = '83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:48:01 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:48:01 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:48:01 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:48:01 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '83b8cfed18ef09413d8883fcc58d870b9fa93fa1290417443e38f8d2615fcd24d8ae235b878ddfb3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:48:01 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:48:01 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:48:10 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:48:10 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:48:10 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:48:10 [11.02ms] */
update `userprofiles` set `login_count` = 377, `last_login` = '2025-02-14 11:48:10', `userprofiles`.`updated_at` = '2025-02-14 11:48:10' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:48:10 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:48:10 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:48:10 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:48:10 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:48:10 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:48:10 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:48:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:48:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:48:10 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160', 149, 5, '[]', 0, '2025-02-14 11:48:10', '2025-02-14 11:48:10', '2026-02-14 11:48:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:48:10 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:48:10 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:48:10 [1.55ms] */
select * from `oauth_access_tokens` where `id` = 'b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:48:10 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:48:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:48:10 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:48:10 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b5eaecc2630ff03c11abf716d43a31d9d7f385acac143d9cfdd9422781ba0fc2c05c54e56853d160' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:48:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:48:10 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:48:10 [0.16ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:48:10 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:48:11 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:48:12 [0.21ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:48:12 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:48:12 [6.3ms] */
update `userprofiles` set `login_count` = 378, `last_login` = '2025-02-14 11:48:12', `userprofiles`.`updated_at` = '2025-02-14 11:48:12' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:48:12 [0.28ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:48:12 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:48:12 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:48:12 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:48:12 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:48:12 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:48:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:48:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:48:12 [3.7ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500', 149, 5, '[]', 0, '2025-02-14 11:48:12', '2025-02-14 11:48:12', '2026-02-14 11:48:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:48:12 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:48:12 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:48:12 [1.54ms] */
select * from `oauth_access_tokens` where `id` = 'ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:48:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:48:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:48:12 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:48:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ebf28c6743785fb6754faf9b66534e5954e22a58889857e158f125054408066ca4f605abcfd5f500' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:48:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:48:12 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:57:02 [2.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:57:02 [0.23ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:57:02 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:57:02 [23.13ms] */
update `userprofiles` set `login_count` = 379, `last_login` = '2025-02-14 11:57:02', `userprofiles`.`updated_at` = '2025-02-14 11:57:02' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:57:02 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:57:02 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:57:02 [0.35ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:57:02 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:57:02 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:57:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:57:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:57:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:57:02 [3.44ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa', 149, 5, '[]', 0, '2025-02-14 11:57:02', '2025-02-14 11:57:02', '2026-02-14 11:57:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:57:02 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:57:02 [3.15ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:57:03 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:57:03 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:57:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:57:03 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:57:03 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6b6f2aa0b9ceee7c7a076639ef32e226fdedb9f81492581b43e1a3871cb76417e4bff18cd054ebfa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:57:03 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:57:03 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:57:03 [0.16ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:57:03 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:57:04 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:57:04 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:57:04 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:57:04 [5.73ms] */
update `userprofiles` set `login_count` = 380, `last_login` = '2025-02-14 11:57:04', `userprofiles`.`updated_at` = '2025-02-14 11:57:04' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:57:04 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:57:04 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:57:04 [0.19ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:57:04 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:57:04 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:57:04 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:57:04 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:57:04 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:57:04 [3.34ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b', 149, 5, '[]', 0, '2025-02-14 11:57:04', '2025-02-14 11:57:04', '2026-02-14 11:57:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:57:04 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:57:04 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:57:04 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:57:04 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:57:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:57:04 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:57:04 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '9d90e6d1a55190b3651e3f1a947aa6138540eb8080c19350fade1557eb4e806d34d041e49311c16b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:57:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:57:04 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:57:43 [1.44ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:57:43 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:57:43 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:57:43 [6.17ms] */
update `userprofiles` set `login_count` = 381, `last_login` = '2025-02-14 11:57:43', `userprofiles`.`updated_at` = '2025-02-14 11:57:43' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:57:43 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:57:43 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:57:43 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:57:43 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:57:43 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:57:43 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:57:43 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:57:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:57:43 [3.47ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284', 149, 5, '[]', 0, '2025-02-14 11:57:43', '2025-02-14 11:57:43', '2026-02-14 11:57:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:57:43 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:57:43 [3.29ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:57:43 [2.49ms] */
select * from `oauth_access_tokens` where `id` = '4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:57:43 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:57:43 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:57:43 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:57:43 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '4950fcf7b73e24ce726487e5bdc40c8268037d3f10869f20d00f8db5a7e143b0829e769d80c08284' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:57:43 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:57:43 [0.48ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:57:43 [0.24ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:57:43 [0.23ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:57:44 [2.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:57:44 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:57:44 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:57:44 [14.33ms] */
update `userprofiles` set `login_count` = 382, `last_login` = '2025-02-14 11:57:44', `userprofiles`.`updated_at` = '2025-02-14 11:57:44' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:57:44 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:57:44 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:57:44 [0.32ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:57:44 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:57:44 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:57:44 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:57:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:57:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:57:44 [11.45ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8', 149, 5, '[]', 0, '2025-02-14 11:57:44', '2025-02-14 11:57:44', '2026-02-14 11:57:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:57:44 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:57:44 [7.27ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:57:44 [2.57ms] */
select * from `oauth_access_tokens` where `id` = 'ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:57:44 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:57:44 [0.34ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:57:44 [0.34ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:57:44 [0.22ms] */
select * from `oauth_access_tokens` where `id` = 'ba947c2f91940824dcb13d865e40d8f9dd6da69302932cc839b755493eabae49f78eea9e660138d8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:57:44 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:57:44 [0.5ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:59:21 [2.41ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:59:21 [0.29ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:59:21 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:59:21 [3.07ms] */
update `userprofiles` set `login_count` = 383, `last_login` = '2025-02-14 11:59:21', `userprofiles`.`updated_at` = '2025-02-14 11:59:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:59:21 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:59:21 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:59:21 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:59:21 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:59:21 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:59:21 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:59:21 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:59:21 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:59:21 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19', 149, 5, '[]', 0, '2025-02-14 11:59:21', '2025-02-14 11:59:21', '2026-02-14 11:59:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:59:21 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:59:21 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 11:59:21 [2.56ms] */
select * from `oauth_access_tokens` where `id` = '9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 11:59:21 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 11:59:21 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 11:59:21 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 11:59:21 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '9dc73a6bcb751535854ddef62309ecb5f0e34b4f72e337c95897dbb7a436d89523443c2c65ac3b19' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 11:59:21 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 11:59:21 [0.48ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 11:59:21 [0.24ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 11:59:21 [0.26ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 11:59:22 [2.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 11:59:22 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 11:59:22 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 11:59:22 [8.29ms] */
update `userprofiles` set `login_count` = 384, `last_login` = '2025-02-14 11:59:22', `userprofiles`.`updated_at` = '2025-02-14 11:59:22' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 11:59:22 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 11:59:22 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 11:59:22 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 11:59:22 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 11:59:22 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 11:59:22 [0.25ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 11:59:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 11:59:22 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 11:59:22 [3.46ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338', 149, 5, '[]', 0, '2025-02-14 11:59:22', '2025-02-14 11:59:22', '2026-02-14 11:59:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 11:59:22 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 11:59:22 [2.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 11:59:22 [2.36ms] */
select * from `oauth_access_tokens` where `id` = '8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 11:59:22 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 11:59:22 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 11:59:22 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 11:59:22 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '8db2734a5e04b86284497fbed53eca09642e4ebd61252f5d06afcd7ff0105b23cdaa1dd7b6597338' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 11:59:22 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 11:59:22 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:00:27 [2.59ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:00:27 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:00:27 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:00:27 [13.81ms] */
update `userprofiles` set `login_count` = 385, `last_login` = '2025-02-14 12:00:27', `userprofiles`.`updated_at` = '2025-02-14 12:00:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:00:27 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:00:27 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:00:27 [0.34ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:00:27 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:00:27 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:00:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:00:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:00:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:00:27 [3.27ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645', 149, 5, '[]', 0, '2025-02-14 12:00:27', '2025-02-14 12:00:27', '2026-02-14 12:00:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:00:27 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:00:27 [2.75ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:00:27 [2.32ms] */
select * from `oauth_access_tokens` where `id` = '6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:00:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:00:27 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:00:27 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:00:27 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6188d40e3fc364b8e548a4589964715d8bdd6802be27acfe91193090c6c3f39c6e28f06b6970a645' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:00:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:00:27 [0.35ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:00:27 [0.15ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:00:27 [0.17ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:00:29 [2.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:00:29 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:00:29 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:00:29 [5.87ms] */
update `userprofiles` set `login_count` = 386, `last_login` = '2025-02-14 12:00:29', `userprofiles`.`updated_at` = '2025-02-14 12:00:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:00:29 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:00:29 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:00:29 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:00:29 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:00:29 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:00:29 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:00:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:00:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:00:29 [5.81ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e', 149, 5, '[]', 0, '2025-02-14 12:00:29', '2025-02-14 12:00:29', '2026-02-14 12:00:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:00:29 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:00:29 [2.83ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:00:29 [2.19ms] */
select * from `oauth_access_tokens` where `id` = '470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:00:29 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:00:29 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:00:29 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:00:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '470ed2b4ac2d3fafd894e8d91ffd9fd7e5d6b765668c293ac422cc65429c39edc8cd3a2b0ee08e4e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:00:29 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:00:29 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:00:54 [2.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:00:54 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:00:54 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:00:54 [10.99ms] */
update `userprofiles` set `login_count` = 387, `last_login` = '2025-02-14 12:00:54', `userprofiles`.`updated_at` = '2025-02-14 12:00:54' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:00:54 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:00:54 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:00:54 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:00:54 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:00:54 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:00:54 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:00:54 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:00:54 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:00:54 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71', 149, 5, '[]', 0, '2025-02-14 12:00:54', '2025-02-14 12:00:54', '2026-02-14 12:00:54');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:00:54 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:00:54 [3.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:00:54 [2.23ms] */
select * from `oauth_access_tokens` where `id` = 'aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:00:54 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:00:54 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:00:54 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:00:54 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'aa7454fed53340498ecf2d36cef713bb83acaa7488ff26a35f9d9df4c56d1c709ab79b088e601b71' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:00:54 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:00:54 [0.36ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:00:54 [0.18ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:00:54 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:00:55 [2.12ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:00:55 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:00:55 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:00:55 [11.04ms] */
update `userprofiles` set `login_count` = 388, `last_login` = '2025-02-14 12:00:55', `userprofiles`.`updated_at` = '2025-02-14 12:00:55' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:00:55 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:00:55 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:00:55 [0.32ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:00:55 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:00:55 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:00:55 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:00:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:00:55 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:00:55 [3.12ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd', 149, 5, '[]', 0, '2025-02-14 12:00:55', '2025-02-14 12:00:55', '2026-02-14 12:00:55');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:00:55 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:00:55 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:00:55 [2.22ms] */
select * from `oauth_access_tokens` where `id` = '118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:00:55 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:00:55 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:00:55 [0.3ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:00:55 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '118bbffcb15dfaf9dc7246f2cc13515bf3fd5a7d892789b5c36ea40eefec994228a6815083bbccfd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:00:55 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:00:55 [0.57ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:01:15 [2.47ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:01:15 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:01:15 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:01:15 [5.59ms] */
update `userprofiles` set `login_count` = 389, `last_login` = '2025-02-14 12:01:15', `userprofiles`.`updated_at` = '2025-02-14 12:01:15' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:01:15 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:01:15 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:01:15 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:01:15 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:01:15 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:01:15 [0.13ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:01:15 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:01:15 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:01:15 [2.88ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082', 149, 5, '[]', 0, '2025-02-14 12:01:15', '2025-02-14 12:01:15', '2026-02-14 12:01:15');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:01:15 [0.38ms] */
select * from `oauth_access_tokens` where `id` = 'ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:01:15 [2.82ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:01:15 [2.21ms] */
select * from `oauth_access_tokens` where `id` = 'ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:01:15 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:01:15 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:01:15 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:01:15 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'ba5a38f036c65a588673b572fc4140f12debda9977607f60a6757a681eb792b66aaaf8c4c0f9a082' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:01:15 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:01:15 [0.33ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:01:15 [0.15ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:01:15 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:01:16 [2.28ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:01:16 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:01:16 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:01:16 [5.65ms] */
update `userprofiles` set `login_count` = 390, `last_login` = '2025-02-14 12:01:16', `userprofiles`.`updated_at` = '2025-02-14 12:01:16' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:01:16 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:01:16 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:01:16 [0.19ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:01:16 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:01:16 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:01:16 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:01:16 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:01:16 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:01:16 [3.01ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce', 149, 5, '[]', 0, '2025-02-14 12:01:16', '2025-02-14 12:01:16', '2026-02-14 12:01:16');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:01:16 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:01:16 [2.87ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:01:16 [2ms] */
select * from `oauth_access_tokens` where `id` = '3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:01:16 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:01:16 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:01:16 [0.41ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:01:16 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '3960659cc4fa71f8da23775ad4f51f28f5fb8b3b39424a7b93f14c366e8ecef010361b5c34f7a3ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:01:16 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:01:16 [0.59ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:02:44 [2.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:02:44 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:02:44 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:02:44 [3.1ms] */
update `userprofiles` set `login_count` = 391, `last_login` = '2025-02-14 12:02:44', `userprofiles`.`updated_at` = '2025-02-14 12:02:44' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:02:44 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:02:44 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:02:44 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:02:44 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:02:44 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:02:44 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:02:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:02:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:02:44 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b', 149, 5, '[]', 0, '2025-02-14 12:02:44', '2025-02-14 12:02:44', '2026-02-14 12:02:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:02:44 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:02:44 [3.44ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:02:44 [2.27ms] */
select * from `oauth_access_tokens` where `id` = '90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:02:44 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:02:44 [0.33ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:02:44 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:02:44 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '90c43388a29a386a025f4e9a217342f12c320fe221c200425e4c225f67497f18b78b26c87b327b1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:02:44 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:02:44 [0.52ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:02:44 [0.25ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:02:44 [0.24ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:02:45 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:02:45 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:02:45 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:02:45 [5.92ms] */
update `userprofiles` set `login_count` = 392, `last_login` = '2025-02-14 12:02:45', `userprofiles`.`updated_at` = '2025-02-14 12:02:45' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:02:45 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:02:45 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:02:45 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:02:45 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:02:45 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:02:45 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:02:45 [4.51ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f', 149, 5, '[]', 0, '2025-02-14 12:02:45', '2025-02-14 12:02:45', '2026-02-14 12:02:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:02:45 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:02:45 [2.89ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:02:45 [1.51ms] */
select * from `oauth_access_tokens` where `id` = 'ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:02:45 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ecc591dae069848f6bea0aeb372b50882073c5263a455e248e50e885dfe56620578460af1361754f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:02:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:02:45 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:06:52 [2.54ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:06:52 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:06:52 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:06:52 [8.01ms] */
update `userprofiles` set `login_count` = 393, `last_login` = '2025-02-14 12:06:52', `userprofiles`.`updated_at` = '2025-02-14 12:06:52' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:06:52 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:06:52 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:06:52 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:06:52 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:06:52 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:06:52 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:06:52 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:06:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:06:52 [3.38ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea', 149, 5, '[]', 0, '2025-02-14 12:06:52', '2025-02-14 12:06:52', '2026-02-14 12:06:52');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:06:52 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:06:52 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:06:52 [2.33ms] */
select * from `oauth_access_tokens` where `id` = '6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:06:52 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:06:52 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:06:52 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:06:52 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '6276d713bc12e02af1fd136ac6be947a5f97dc4967b2141ba3a847ad81963b04a15fead693bdefea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:06:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:06:52 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:06:52 [0.16ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:06:52 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:06:53 [2.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:06:53 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:06:53 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:06:53 [5.98ms] */
update `userprofiles` set `login_count` = 394, `last_login` = '2025-02-14 12:06:53', `userprofiles`.`updated_at` = '2025-02-14 12:06:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:06:53 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:06:53 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:06:53 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:06:53 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:06:53 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:06:53 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:06:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:06:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:06:53 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f', 149, 5, '[]', 0, '2025-02-14 12:06:53', '2025-02-14 12:06:53', '2026-02-14 12:06:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:06:53 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:06:53 [3.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:06:53 [2.23ms] */
select * from `oauth_access_tokens` where `id` = '11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:06:53 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:06:53 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:06:53 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:06:53 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '11582f5b8c07a13a8041a9d8170df9c5dd8a5aecd763124d7a74278e4fe180b0e51ab8e1fd3c875f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:06:53 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:06:53 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 12999 and `license_plate` = 'GI870' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:07:01 [2.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:07:01 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:07:01 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:07:01 [6.21ms] */
update `userprofiles` set `login_count` = 395, `last_login` = '2025-02-14 12:07:01', `userprofiles`.`updated_at` = '2025-02-14 12:07:01' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:07:01 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:07:01 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:07:01 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:07:01 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:07:01 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:07:01 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:07:01 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:07:01 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:07:01 [3.7ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf', 149, 5, '[]', 0, '2025-02-14 12:07:01', '2025-02-14 12:07:01', '2026-02-14 12:07:01');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:07:01 [0.34ms] */
select * from `oauth_access_tokens` where `id` = 'd3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:07:01 [3.29ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:07:01 [2.36ms] */
select * from `oauth_access_tokens` where `id` = 'd3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:07:01 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'd3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:07:01 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:07:01 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:07:01 [0.2ms] */
select * from `oauth_access_tokens` where `id` = 'd3b72a547d8bd588072f2c343fd7f028519f5dfaf5738eed92323282d0ca9b71817c6b7debfe2faf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:07:01 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:07:01 [0.35ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:07:01 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:07:01 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:07:02 [2.42ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:07:03 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:07:03 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:07:03 [11.01ms] */
update `userprofiles` set `login_count` = 396, `last_login` = '2025-02-14 12:07:03', `userprofiles`.`updated_at` = '2025-02-14 12:07:03' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:07:03 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:07:03 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:07:03 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:07:03 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:07:03 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:07:03 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:07:03 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:07:03 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:07:03 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4', 149, 5, '[]', 0, '2025-02-14 12:07:03', '2025-02-14 12:07:03', '2026-02-14 12:07:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:07:03 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'd1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:07:03 [3.49ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:07:03 [1.69ms] */
select * from `oauth_access_tokens` where `id` = 'd1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:07:03 [0.19ms] */
select * from `oauth_access_tokens` where `id` = 'd1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:07:03 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:07:03 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:07:03 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'd1ea5ff5ef1a5db348692ff7b73f36b041d34d8d6a2608b848d45af1fec478e39737094ee795d9b4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:07:03 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:07:03 [0.43ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:07:27 [2.19ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:07:27 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:07:27 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:07:27 [11.12ms] */
update `userprofiles` set `login_count` = 397, `last_login` = '2025-02-14 12:07:27', `userprofiles`.`updated_at` = '2025-02-14 12:07:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:07:27 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:07:27 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:07:27 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:07:27 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:07:27 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:07:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:07:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:07:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:07:27 [3.02ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881', 149, 5, '[]', 0, '2025-02-14 12:07:27', '2025-02-14 12:07:27', '2026-02-14 12:07:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:07:27 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:07:27 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:07:28 [2.28ms] */
select * from `oauth_access_tokens` where `id` = '41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:07:28 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:07:28 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:07:28 [0.33ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:07:28 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '41bbe3b9cc35fb70a10650192ffc822823d320de0eb19a4016b3305e1ea5a0e5e19842f0bfd8a881' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:07:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:07:28 [0.36ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:07:28 [0.15ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:07:28 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:07:29 [2.22ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:07:29 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:07:29 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:07:29 [6.08ms] */
update `userprofiles` set `login_count` = 398, `last_login` = '2025-02-14 12:07:29', `userprofiles`.`updated_at` = '2025-02-14 12:07:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:07:29 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:07:29 [0.49ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:07:29 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:07:29 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:07:29 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:07:29 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:07:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:07:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:07:29 [3.13ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1', 149, 5, '[]', 0, '2025-02-14 12:07:29', '2025-02-14 12:07:29', '2026-02-14 12:07:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:07:29 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:07:29 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:07:29 [2.32ms] */
select * from `oauth_access_tokens` where `id` = '750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:07:29 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:07:29 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:07:29 [0.34ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:07:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '750be62c74c371f0a2a56b3882f0735f79b7bc157090cac7f142cdd0c862621c8d4499ddc5a7f0e1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:07:29 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:07:29 [0.55ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:16:32 [2.15ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:16:32 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:16:32 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:16:32 [11.21ms] */
update `userprofiles` set `login_count` = 399, `last_login` = '2025-02-14 12:16:32', `userprofiles`.`updated_at` = '2025-02-14 12:16:32' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:16:32 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:16:32 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:16:32 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:16:32 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:16:32 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:16:32 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:16:32 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:16:32 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:16:32 [3.1ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885', 149, 5, '[]', 0, '2025-02-14 12:16:32', '2025-02-14 12:16:32', '2026-02-14 12:16:32');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:16:32 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:16:32 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:16:33 [2.62ms] */
select * from `oauth_access_tokens` where `id` = '691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:16:33 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:16:33 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:16:33 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:16:33 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '691bd190fe053c536a5b8a6053045b55ef352a188ab6d77fb55b8dd98aadc82ced5a85b3ed77f885' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:16:33 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:16:33 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:16:33 [0.16ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:16:33 [0.18ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:16:34 [1.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:16:34 [0.29ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:16:34 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:16:34 [5.68ms] */
update `userprofiles` set `login_count` = 400, `last_login` = '2025-02-14 12:16:34', `userprofiles`.`updated_at` = '2025-02-14 12:16:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:16:34 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:16:34 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:16:34 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:16:34 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:16:34 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:16:34 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:16:34 [2.81ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414', 149, 5, '[]', 0, '2025-02-14 12:16:34', '2025-02-14 12:16:34', '2026-02-14 12:16:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:16:34 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:16:34 [7.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:16:34 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:16:34 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4cf92b5b61cdce4c1fc00ce1955ebc442ac0acba3c920f9edd45bf0202a3365ab8a3500b63837414' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:16:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:16:34 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 50457 and `license_plate` = '5656SXYVCYHC' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:17:27 [2.68ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:17:27 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:17:27 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:17:27 [5.95ms] */
update `userprofiles` set `login_count` = 401, `last_login` = '2025-02-14 12:17:27', `userprofiles`.`updated_at` = '2025-02-14 12:17:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:17:27 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:17:27 [0.49ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:17:27 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:17:27 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:17:27 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:17:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:17:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:17:27 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:17:27 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5', 149, 5, '[]', 0, '2025-02-14 12:17:27', '2025-02-14 12:17:27', '2026-02-14 12:17:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:17:27 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:17:27 [3.18ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-14 12:17:28 [2.32ms] */
select * from `oauth_access_tokens` where `id` = '2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-14 12:17:28 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-14 12:17:28 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-14 12:17:28 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-14 12:17:28 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '2300abaf74a4cdaf72ec3781333dc39e87cd306b027785b898434f40d22dbd9ec522e0ad3c5e86e5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-14 12:17:28 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-14 12:17:28 [0.51ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'GI870' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-14 12:17:28 [0.16ms] */
select * from `vehicle` where `id` = 8216 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-14 12:17:28 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 8216 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-14 12:17:33 [2.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-14 12:17:33 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-14 12:17:33 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-14 12:17:33 [6.12ms] */
update `userprofiles` set `login_count` = 402, `last_login` = '2025-02-14 12:17:33', `userprofiles`.`updated_at` = '2025-02-14 12:17:33' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-14 12:17:33 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-14 12:17:33 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-14 12:17:33 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-14 12:17:33 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-14 12:17:33 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-14 12:17:33 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-14 12:17:33 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-14 12:17:33 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-14 12:17:33 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862', 149, 5, '[]', 0, '2025-02-14 12:17:33', '2025-02-14 12:17:33', '2026-02-14 12:17:33');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-14 12:17:33 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-14 12:17:33 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-14 12:17:33 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-14 12:17:33 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-14 12:17:33 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-14 12:17:33 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-14 12:17:33 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5e90ab48997864c07413b925150b9aa355f30981f6bd74480170e9b53a6b6471e2dbb8a1e7939862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-14 12:17:33 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-14 12:17:33 [0.34ms] */
