/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 07:47:17 [1.76ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:47:17 [0.4ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:47:17 [0.8ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:47:17 [7.06ms] */
update `userprofiles` set `login_count` = 2487, `last_login` = '2025-05-22 07:47:17', `userprofiles`.`updated_at` = '2025-05-22 07:47:17' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:47:17 [0.54ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:47:17 [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-05-22 07:47:17 [0.57ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:47:17 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:47:17 [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-05-22 07:47:17 [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-05-22 07:47:17 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:47:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:47:17 [3.48ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d', 154, 5, '[]', 0, '2025-05-22 07:47:17', '2025-05-22 07:47:17', '2026-05-22 07:47:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:47:17 [0.34ms] */
select * from `oauth_access_tokens` where `id` = '00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:47:17 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:47:17 [2.39ms] */
select * from `oauth_access_tokens` where `id` = '00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:47:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:47:17 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:47:17 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:47:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '00e1681b8f619abe9f01fdce6a2cdad5a90a0661ca7f73ff43007c8bd414bd9777e438f88ac8945d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:47:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:47:17 [2.38ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'LI712' 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-05-22 07:47:17 [0.52ms] */
select * from `party` where `party`.`id` = 53663 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:47:17 [0.51ms] */
select * from `vehicle` where `id` = 85671 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:47:17 [0.55ms] */
select * from `party_vehicle` where `vehicle_id` = 85671 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-05-22 07:47:22 [1.43ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:47:22 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:47:22 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:47:22 [6.1ms] */
update `userprofiles` set `login_count` = 2488, `last_login` = '2025-05-22 07:47:22', `userprofiles`.`updated_at` = '2025-05-22 07:47:22' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:47:22 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:47:22 [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-05-22 07:47:22 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:47:22 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:47:22 [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-05-22 07:47:22 [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-05-22 07:47:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:47:22 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:47:22 [3.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334', 154, 5, '[]', 0, '2025-05-22 07:47:22', '2025-05-22 07:47:22', '2026-05-22 07:47:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:47:22 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:47:22 [2.87ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:47:22 [1.53ms] */
select * from `oauth_access_tokens` where `id` = 'b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:47:22 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:47:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:47:22 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:47:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b9ecc958d9b67a6411f69f20a8ce5d5bd2fc811058ee6e730a7bde94d65169702226c7b0cbf96334' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:47:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:47:22 [0.33ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'LI712' 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-05-22 07:47:22 [0.15ms] */
select * from `party` where `party`.`id` = 53663 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:47:22 [0.15ms] */
select * from `vehicle` where `id` = 85671 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:47:22 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 85671 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-05-22 07:49:50 [2.19ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:50 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:50 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:50 [6.3ms] */
update `userprofiles` set `login_count` = 2489, `last_login` = '2025-05-22 07:49:50', `userprofiles`.`updated_at` = '2025-05-22 07:49:50' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:50 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:50 [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-05-22 07:49:50 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:50 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:50 [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-05-22 07:49:50 [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-05-22 07:49:50 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:50 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:50 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756', 154, 5, '[]', 0, '2025-05-22 07:49:50', '2025-05-22 07:49:50', '2026-05-22 07:49:50');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:50 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:50 [3.09ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:50 [1.71ms] */
select * from `oauth_access_tokens` where `id` = '99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:50 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:50 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:50 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:50 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '99f9f57277b1ef35f8a56bade6f85c836f32628e7c0d29a758a81da100c216559211f2c7f366f756' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:50 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:50 [1.74ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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-05-22 07:49:50 [0.28ms] */
select * from `party` where `party`.`id` = 12999 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:50 [0.37ms] */
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 10 - 2025-05-22 07:49:50 [0.35ms] */
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-05-22 07:49:50 [1.6ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:50 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:50 [0.68ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:50 [6.87ms] */
update `userprofiles` set `login_count` = 2490, `userprofiles`.`updated_at` = '2025-05-22 07:49:50' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:50 [0.62ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:50 [1.01ms] */
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-05-22 07:49:50 [0.45ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:50 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:50 [0.23ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 07:49:50 [0.28ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 07:49:50 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:50 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:50 [3.38ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8', 154, 5, '[]', 0, '2025-05-22 07:49:50', '2025-05-22 07:49:50', '2026-05-22 07:49:50');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:50 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:50 [3.15ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:51 [2.22ms] */
select * from `oauth_access_tokens` where `id` = '19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:51 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:51 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:51 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:51 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '19a2f731ee93b3cf7d982f0f378403b04aa1bfd545bc640ec12d7ed1f4820909aa766f1e8a5724b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:51 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:51 [0.83ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'SM218' 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-05-22 07:49:51 [0.26ms] */
select * from `party` where `party`.`id` = 51885 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:51 [0.29ms] */
select * from `vehicle` where `id` = 82069 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:49:51 [0.3ms] */
select * from `party_vehicle` where `vehicle_id` = 82069 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-05-22 07:49:51 [1.58ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:51 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:51 [0.61ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:51 [6.1ms] */
update `userprofiles` set `login_count` = 2491, `last_login` = '2025-05-22 07:49:51', `userprofiles`.`updated_at` = '2025-05-22 07:49:51' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:51 [0.3ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:51 [0.66ms] */
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-05-22 07:49:51 [0.3ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:51 [0.31ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:51 [0.27ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 07:49:51 [0.31ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 07:49:51 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:51 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:51 [3.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7', 154, 5, '[]', 0, '2025-05-22 07:49:51', '2025-05-22 07:49:51', '2026-05-22 07:49:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:51 [0.44ms] */
select * from `oauth_access_tokens` where `id` = 'af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:51 [3.34ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:51 [1.76ms] */
select * from `oauth_access_tokens` where `id` = 'af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:51 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:51 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:51 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:51 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'af725094f785dc1c0641363c7f186577ddf439864d88eb1b5edfbaa6eb856ecc0450986fb0d947b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:51 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:51 [1.03ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'E4612' 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-05-22 07:49:51 [0.45ms] */
select * from `party` where `party`.`id` = 59672 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:51 [0.41ms] */
select * from `vehicle` where `id` = 97768 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:49:51 [0.44ms] */
select * from `party_vehicle` where `vehicle_id` = 97768 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-05-22 07:49:51 [1.46ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:51 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:51 [0.48ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:51 [6.98ms] */
update `userprofiles` set `login_count` = 2492, `userprofiles`.`updated_at` = '2025-05-22 07:49:51' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:51 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:51 [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-05-22 07:49:51 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:51 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:51 [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-05-22 07:49:51 [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-05-22 07:49:51 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:51 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:51 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54', 154, 5, '[]', 0, '2025-05-22 07:49:51', '2025-05-22 07:49:51', '2026-05-22 07:49:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:51 [0.45ms] */
select * from `oauth_access_tokens` where `id` = 'c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:51 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:51 [2.23ms] */
select * from `oauth_access_tokens` where `id` = 'c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:51 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:51 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:51 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:51 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'c46e4b96e4ce94225e6ab410f1bf1163aef085a83f45b642167eacb4f209f9dd2a2de4592dbf1f54' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:51 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:51 [0.87ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'CI457' 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-05-22 07:49:51 [0.22ms] */
select * from `party` where `party`.`id` = 55306 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:51 [0.25ms] */
select * from `vehicle` where `id` = 88376 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:49:51 [0.26ms] */
select * from `party_vehicle` where `vehicle_id` = 88376 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-05-22 07:49:52 [2.21ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:52 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:52 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:52 [3.13ms] */
update `userprofiles` set `login_count` = 2493, `last_login` = '2025-05-22 07:49:52', `userprofiles`.`updated_at` = '2025-05-22 07:49:52' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:52 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:52 [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-05-22 07:49:52 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49: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-05-22 07:49:52 [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-05-22 07:49: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-05-22 07:49:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:52 [3.1ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47', 154, 5, '[]', 0, '2025-05-22 07:49:52', '2025-05-22 07:49:52', '2026-05-22 07:49:52');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:52 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:52 [2.73ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:52 [2.48ms] */
select * from `oauth_access_tokens` where `id` = '154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:52 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:52 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:52 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:52 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '154976c85e7670b1e0b33df5aa1f24c01ab55cf733d7a938bc903ec1aa4e8a298696baf052d67d47' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:52 [0.31ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:52 [0.8ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'M3584' 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-05-22 07:49:52 [0.27ms] */
select * from `party` where `party`.`id` = 58693 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:52 [0.27ms] */
select * from `vehicle` where `id` = 90219 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:49:52 [0.26ms] */
select * from `party_vehicle` where `vehicle_id` = 90219 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-05-22 07:49:52 [1.36ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:52 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:52 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:52 [3.36ms] */
update `userprofiles` set `login_count` = 2494, `userprofiles`.`updated_at` = '2025-05-22 07:49:52' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:52 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:52 [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-05-22 07:49:52 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:52 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:52 [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-05-22 07:49: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-05-22 07:49:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:52 [2.98ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a', 154, 5, '[]', 0, '2025-05-22 07:49:52', '2025-05-22 07:49:52', '2026-05-22 07:49:52');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:52 [0.42ms] */
select * from `oauth_access_tokens` where `id` = '2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:52 [2.93ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:52 [1.72ms] */
select * from `oauth_access_tokens` where `id` = '2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:52 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:52 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:52 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2828cdbfe75b10025f0ba64a200e511e3c0167ffc4178a8a179b987624ed4110b12de6c7d557cc8a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:52 [0.89ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'AF601' 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-05-22 07:49:52 [0.35ms] */
select * from `party` where `party`.`id` = 58008 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-22 07:49:52 [0.28ms] */
select * from `company` where `company`.`id` = 2295 and `company`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-22 07:49:52 [0.27ms] */
select * from `party` where `party`.`id` = 1 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 11 - 2025-05-22 07:49:52 [0.23ms] */
select * from `party` where `party`.`id` = 1 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 12 - 2025-05-22 07:49:52 [0.29ms] */
select * from `person` where `person`.`id` = 1 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 13 - 2025-05-22 07:49:52 [0.24ms] */
select * from `vehicle` where `id` = 87853 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 14 - 2025-05-22 07:49:52 [0.27ms] */
select * from `party_vehicle` where `vehicle_id` = 87853 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-05-22 07:49:52 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 07:49:52 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 07:49:52 [0.79ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 07:49:52 [6.21ms] */
update `userprofiles` set `login_count` = 2495, `userprofiles`.`updated_at` = '2025-05-22 07:49:52' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 07:49:52 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 07:49:52 [0.58ms] */
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-05-22 07:49:52 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 07:49:52 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 07:49:52 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 07:49:52 [0.32ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 07:49:52 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 07:49:52 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 07:49:52 [3.46ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1', 154, 5, '[]', 0, '2025-05-22 07:49:52', '2025-05-22 07:49:52', '2026-05-22 07:49:52');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 07:49:52 [0.34ms] */
select * from `oauth_access_tokens` where `id` = 'f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 07:49:52 [2.87ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-22 07:49:52 [1.53ms] */
select * from `oauth_access_tokens` where `id` = 'f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-22 07:49:52 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-22 07:49:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-22 07:49:52 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-22 07:49:52 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'f4a2f86b056e5f5ab87d8e7db4c6f7a6d80fdf0a8c59286e3a811d7ce0dbbcca05d24b43a64736b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-22 07:49:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-22 07:49:52 [0.65ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_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_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` = 'RTA201' 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-05-22 07:49:52 [0.26ms] */
select * from `vehicle` where `license_plate` = 'RTA201' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:05 [2.99ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:05 [0.57ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:05 [1.97ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:05 [11.41ms] */
update `userprofiles` set `login_count` = 2496, `last_login` = '2025-05-22 11:00:05', `userprofiles`.`updated_at` = '2025-05-22 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:05 [1.41ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:05 [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-05-22 11:00:05 [1.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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:05 [0.58ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:05 [0.27ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 11:00:05 [0.84ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 11:00:05 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:05 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:05 [4.86ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335', 154, 5, '[]', 0, '2025-05-22 11:00:05', '2025-05-22 11:00:05', '2026-05-22 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:05 [0.51ms] */
select * from `oauth_access_tokens` where `id` = '49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:05 [3.61ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:05 [1.67ms] */
select * from `oauth_access_tokens` where `id` = '49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:05 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:05 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:05 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:05 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '49fff5126b23256a35398b82ecbe6da36d9a5d613445711385fb8ae7e78de513df426242b84ec335' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:05 [0.29ms] */
select count(*) as aggregate from `party` where `id` = 33125;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:05 [0.35ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'BS724';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:05 [1.55ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 33125 and `license_plate` = 'BS724' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:05 [1.45ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:05 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:05 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:05 [5.89ms] */
update `userprofiles` set `login_count` = 2497, `userprofiles`.`updated_at` = '2025-05-22 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:05 [0.3ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:05 [0.67ms] */
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-05-22 11:00:05 [0.23ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:05 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:05 [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-05-22 11:00:05 [0.2ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 11:00:05 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:05 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:05 [3.81ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a', 154, 5, '[]', 0, '2025-05-22 11:00:05', '2025-05-22 11:00:05', '2026-05-22 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:05 [0.33ms] */
select * from `oauth_access_tokens` where `id` = 'afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:05 [2.76ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:05 [1.54ms] */
select * from `oauth_access_tokens` where `id` = 'afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:05 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'afef0ef728cb3b6ac5611a5b8109a9c4cc97bbcacb5bb9484c2142dbf5c103af5bc418782349fe3a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:05 [0.92ms] */
select count(*) as aggregate from `party` where `id` = 64940;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:05 [0.77ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '5656SXYVCYHC';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:05 [2.7ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:06 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:06 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:06 [4.09ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:06 [7.84ms] */
update `userprofiles` set `login_count` = 2498, `last_login` = '2025-05-22 11:00:06', `userprofiles`.`updated_at` = '2025-05-22 11:00:06' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:06 [0.37ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:06 [0.84ms] */
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-05-22 11:00:06 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:06 [0.27ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:06 [0.22ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 11:00:06 [0.26ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-22 11:00:06 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:06 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:06 [2.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c', 154, 5, '[]', 0, '2025-05-22 11:00:06', '2025-05-22 11:00:06', '2026-05-22 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:06 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:06 [2.76ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:06 [1.86ms] */
select * from `oauth_access_tokens` where `id` = '44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:06 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:06 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:06 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:06 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '44433c8d5a941491dcfea60baf0c1e5e2b5119bfa608f0196e88973b9979e3e82cee8621a79e235c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:06 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:06 [0.61ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:06 [0.77ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC003';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:06 [7.39ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC003' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:07 [1.81ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:07 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:07 [0.46ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:07 [2.98ms] */
update `userprofiles` set `login_count` = 2499, `last_login` = '2025-05-22 11:00:07', `userprofiles`.`updated_at` = '2025-05-22 11:00:07' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:07 [0.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:07 [0.63ms] */
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-05-22 11:00:07 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:07 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:07 [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-05-22 11:00:07 [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-05-22 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:07 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:07 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7', 154, 5, '[]', 0, '2025-05-22 11:00:07', '2025-05-22 11:00:07', '2026-05-22 11:00:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:07 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:07 [2.83ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:07 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:07 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:07 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:07 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5d5ee8fc4c8409d1f9f9708bd4f6a1e8ef4e1f75ace3e1cd947a11bac91ee4c1d9219880fd1635a7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:07 [0.14ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:07 [0.35ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC002';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:07 [5.52ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:08 [1.4ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:08 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:08 [1.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:08 [6.43ms] */
update `userprofiles` set `login_count` = 2500, `last_login` = '2025-05-22 11:00:08', `userprofiles`.`updated_at` = '2025-05-22 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:08 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:08 [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-05-22 11:00:08 [0.23ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:08 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:08 [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-05-22 11:00:08 [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-05-22 11:00:08 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:08 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:08 [3.5ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391', 154, 5, '[]', 0, '2025-05-22 11:00:08', '2025-05-22 11:00:08', '2026-05-22 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:08 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:08 [3.05ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:08 [1.29ms] */
select * from `oauth_access_tokens` where `id` = '7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:08 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:08 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:08 [0.15ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:08 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '7e39677af8a8776e2f63be436b45f64a89fb97d9c6f4cef89de3f89a9f47fccc0270c7e1a2c0d391' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:08 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 639;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:08 [0.26ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'RTA009';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:08 [1.1ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 639 and `license_plate` = 'RTA009' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:09 [1.51ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:09 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:09 [0.87ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:09 [6.47ms] */
update `userprofiles` set `login_count` = 2501, `last_login` = '2025-05-22 11:00:09', `userprofiles`.`updated_at` = '2025-05-22 11:00:09' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:09 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:09 [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-05-22 11:00:09 [0.2ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:09 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:09 [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-05-22 11:00:09 [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-05-22 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:09 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:09 [4.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c', 154, 5, '[]', 0, '2025-05-22 11:00:09', '2025-05-22 11:00:09', '2026-05-22 11:00:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:09 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:09 [2.67ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:09 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:09 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:09 [0.23ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:09 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2d2aa5d9de721dd99508a11325ab8b0460b7f898b1e4bc704f43a61adb9b45796ddd0fcf3a4e417c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:09 [0.14ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:09 [4.99ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC005';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:10 [1.45ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:10 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:10 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:10 [5.69ms] */
update `userprofiles` set `login_count` = 2502, `last_login` = '2025-05-22 11:00:10', `userprofiles`.`updated_at` = '2025-05-22 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:10 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:10 [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-05-22 11:00:10 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:10 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:10 [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-05-22 11:00:10 [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-05-22 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:10 [2.94ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50', 154, 5, '[]', 0, '2025-05-22 11:00:10', '2025-05-22 11:00:10', '2026-05-22 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:10 [0.54ms] */
select * from `oauth_access_tokens` where `id` = '632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:10 [2.86ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:10 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:10 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:10 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:10 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:10 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '632ce38a4d3b8f161ae8a1c168c3ba947e3ee95164594073f36765561352643f5c2b19e78ef4bd50' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:10 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:10 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 36578;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:10 [0.29ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'AA584';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:10 [2.1ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 36578 and `license_plate` = 'AA584' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:11 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:11 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:11 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:11 [2.85ms] */
update `userprofiles` set `login_count` = 2503, `last_login` = '2025-05-22 11:00:11', `userprofiles`.`updated_at` = '2025-05-22 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:11 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:11 [0.38ms] */
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-05-22 11:00:11 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:11 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:11 [0.14ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-22 11:00:11 [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-05-22 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:11 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b', 154, 5, '[]', 0, '2025-05-22 11:00:11', '2025-05-22 11:00:11', '2026-05-22 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:11 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:11 [2.73ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:11 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:11 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:11 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:11 [0.53ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:11 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '398ed312999d27e9b0b65dd07f72643965592a966354ac56680f58e4850dadb6ab2b2692d5afe11b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:11 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:11 [0.16ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:11 [0.25ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC1253RTA001';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:11 [1.06ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC1253RTA001' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:11 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:11 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:11 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:11 [5.69ms] */
update `userprofiles` set `login_count` = 2504, `userprofiles`.`updated_at` = '2025-05-22 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:11 [0.3ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:11 [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-05-22 11:00:11 [0.26ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:11 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:11 [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-05-22 11:00:11 [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-05-22 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:11 [3.22ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6', 154, 5, '[]', 0, '2025-05-22 11:00:11', '2025-05-22 11:00:11', '2026-05-22 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:11 [0.47ms] */
select * from `oauth_access_tokens` where `id` = '81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:12 [3.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:12 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:12 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '81c860d8fd1dd1c00699d6e5260a74d16537c9f70146824a445237e989c0ca3daec0bd6818af6be6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:12 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 54700;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:12 [0.23ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YP073';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:12 [1.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 54700 and `license_plate` = 'YP073' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:12 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:12 [0.22ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:12 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:12 [5.82ms] */
update `userprofiles` set `login_count` = 2505, `last_login` = '2025-05-22 11:00:12', `userprofiles`.`updated_at` = '2025-05-22 11:00:12' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:12 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:12 [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-05-22 11:00:12 [0.26ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:12 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:12 [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-05-22 11:00:12 [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-05-22 11:00:12 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:12 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:12 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821', 154, 5, '[]', 0, '2025-05-22 11:00:12', '2025-05-22 11:00:12', '2026-05-22 11:00:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:12 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:12 [2.81ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:12 [1.84ms] */
select * from `oauth_access_tokens` where `id` = 'e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:12 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:12 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:12 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:12 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'e4357b0738f75444625b69a4939e673e15efe4f966b3581c851a2e8503dea00a4b5b4a4cac156821' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:12 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:12 [0.35ms] */
select count(*) as aggregate from `party` where `id` = 99460;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-22 11:00:13 [2.19ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-22 11:00:13 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-22 11:00:13 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 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-05-22 11:00:13 [5.71ms] */
update `userprofiles` set `login_count` = 2506, `last_login` = '2025-05-22 11:00:13', `userprofiles`.`updated_at` = '2025-05-22 11:00:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-22 11:00:13 [0.27ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-22 11:00:13 [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-05-22 11:00:13 [0.26ms] */
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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-22 11:00:13 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-22 11:00:13 [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-05-22 11:00:13 [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-05-22 11:00:13 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-22 11:00:13 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-22 11:00:13 [2.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec', 154, 5, '[]', 0, '2025-05-22 11:00:13', '2025-05-22 11:00:13', '2026-05-22 11:00:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-22 11:00:13 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-22 11:00:13 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-22 11:00:13 [1.4ms] */
select * from `oauth_access_tokens` where `id` = 'e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-22 11:00:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-22 11:00:13 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-22 11:00:13 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-22 11:00:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e9cf258e0100d42abdc08c767a238f1039ccc9d1c0784057e5473efad13ef7eead3c21c2481172ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-22 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-22 11:00:13 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 59307;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-22 11:00:13 [0.29ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'IF124';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-22 11:00:13 [1.14ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `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, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `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`, 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_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 59307 and `license_plate` = 'IF124' and `invoice`.`deleted_at` is null;
/*==================================================*/
