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-03-15 14:40:27 [0.54ms] */
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-03-15 14:40:27 [11.8ms] */
update `userprofiles` set `login_count` = 1049, `last_login` = '2025-03-15 14:40:27', `userprofiles`.`updated_at` = '2025-03-15 14:40:27' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:27 [0.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-03-15 14:40:27 [0.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:40:27 [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-03-15 14:40:27 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:27 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:27 [2.93ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb', 154, 5, '[]', 0, '2025-03-15 14:40:27', '2025-03-15 14:40:27', '2026-03-15 14:40:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:27 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:27 [2.79ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:27 [2.29ms] */
select * from `oauth_access_tokens` where `id` = '5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:27 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:27 [0.27ms] */
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-03-15 14:40:27 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '5acbf8a63525b4d646a5ea5a071eeeb324c33a55590a861b2d1c8bd7a8173b2e1f63b4be84e132cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:27 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:27 [1.54ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-15 14:40:27 [0.49ms] */
select * from `party` where `party`.`id` = 64940 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:27 [0.49ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:27 [0.52ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:40:27 [1.3ms] */
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-03-15 14:40:27 [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-03-15 14:40:27 [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-03-15 14:40:27 [5.71ms] */
update `userprofiles` set `login_count` = 1050, `userprofiles`.`updated_at` = '2025-03-15 14:40:27' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:27 [0.26ms] */
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-03-15 14:40:27 [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-03-15 14:40:27 [0.33ms] */
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-03-15 14:40:27 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:27 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:27 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:27 [2.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573', 154, 5, '[]', 0, '2025-03-15 14:40:27', '2025-03-15 14:40:27', '2026-03-15 14:40:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:27 [0.56ms] */
select * from `oauth_access_tokens` where `id` = 'c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:27 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:27 [2.39ms] */
select * from `oauth_access_tokens` where `id` = 'c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:27 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:27 [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-03-15 14:40:27 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'c8b2f1220d8ba12fc5fab8740074322b4d565b0b6f8e412bf595c09419d6f7938dc0eaa190272573' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:27 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:27 [0.97ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'LIC1253RTA001' 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-03-15 14:40:27 [0.39ms] */
select * from `party` where `party`.`id` = 64946 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:27 [0.23ms] */
select * from `vehicle` where `id` = 99468 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:27 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 99468 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-03-15 14:40:27 [2.01ms] */
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-03-15 14:40:27 [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-03-15 14:40:27 [0.37ms] */
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-03-15 14:40:27 [5.87ms] */
update `userprofiles` set `login_count` = 1051, `userprofiles`.`updated_at` = '2025-03-15 14:40:27' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:27 [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-03-15 14:40:27 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:40:27 [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-03-15 14:40:27 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:27 [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-03-15 14:40:27 [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-03-15 14:40:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:27 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:27 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550', 154, 5, '[]', 0, '2025-03-15 14:40:27', '2025-03-15 14:40:27', '2026-03-15 14:40:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:27 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:27 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:28 [2.19ms] */
select * from `oauth_access_tokens` where `id` = '02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:28 [0.35ms] */
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-03-15 14:40:28 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '02751403a2abc5066e9c770f66aa2987594142cf3ba692a405bcb4ff00c6b743d3d4a08502e11550' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:28 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:28 [0.75ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'YP073' 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-03-15 14:40:28 [0.22ms] */
select * from `party` where `party`.`id` = 54700 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:28 [0.25ms] */
select * from `vehicle` where `id` = 87438 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:28 [0.26ms] */
select * from `party_vehicle` where `vehicle_id` = 87438 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-03-15 14:40:28 [2.08ms] */
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-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [5.75ms] */
update `userprofiles` set `login_count` = 1052, `last_login` = '2025-03-15 14:40:28', `userprofiles`.`updated_at` = '2025-03-15 14:40:28' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:28 [3.12ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4', 154, 5, '[]', 0, '2025-03-15 14:40:28', '2025-03-15 14:40:28', '2026-03-15 14:40:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:28 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:28 [2.79ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:28 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:28 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6f0f8d37be2bda6e8dedeaa26a8954c4827db373477c748ef82e78e0d1bd32001388804c4498ade4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:28 [0.75ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'SFDYUF520002' 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-03-15 14:40:28 [0.25ms] */
select * from `party` where `party`.`id` = 64942 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:28 [0.35ms] */
select * from `vehicle` where `id` = 99460 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:28 [0.29ms] */
select * from `party_vehicle` where `vehicle_id` = 99460 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-03-15 14:40:28 [2.06ms] */
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-03-15 14:40:28 [0.15ms] */
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-03-15 14:40:28 [0.4ms] */
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-03-15 14:40:28 [5.75ms] */
update `userprofiles` set `login_count` = 1053, `userprofiles`.`updated_at` = '2025-03-15 14:40:28' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:28 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9', 154, 5, '[]', 0, '2025-03-15 14:40:28', '2025-03-15 14:40:28', '2026-03-15 14:40:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:28 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:28 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:28 [1.51ms] */
select * from `oauth_access_tokens` where `id` = '1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:28 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1a35897ffcb0166c55b08bbcf329e30d30a2a6908fb76b5ce3f4dc4871b6dddba23aa8f431392eb9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:28 [1.13ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 23627 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-03-15 14:40:28 [0.38ms] */
select * from `party` where `party`.`id` = 6359 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:28 [0.23ms] */
select * from `vehicle` where `id` = 10270 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:28 [0.27ms] */
select * from `party_vehicle` where `vehicle_id` = 10270 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-03-15 14:40:28 [2.04ms] */
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-03-15 14:40:28 [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-03-15 14:40:28 [0.37ms] */
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-03-15 14:40:28 [5.9ms] */
update `userprofiles` set `login_count` = 1054, `userprofiles`.`updated_at` = '2025-03-15 14:40:28' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:28 [2.95ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c', 154, 5, '[]', 0, '2025-03-15 14:40:28', '2025-03-15 14:40:28', '2026-03-15 14:40:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:28 [0.47ms] */
select * from `oauth_access_tokens` where `id` = '00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:28 [2.94ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:28 [2.26ms] */
select * from `oauth_access_tokens` where `id` = '00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '00a9df31e88c6f1f1d940b089e880aa2db0b866ef89329f33de3a4e6bfb9a19bb87354a231470a0c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:28 [0.83ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'TT11111' 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-03-15 14:40:28 [0.24ms] */
select * from `party` where `party`.`id` = 21317 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:28 [0.25ms] */
select * from `vehicle` where `id` = 99457 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:28 [0.32ms] */
select * from `party_vehicle` where `vehicle_id` = 99457 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-03-15 14:40:28 [1.84ms] */
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-03-15 14:40:28 [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-03-15 14:40:28 [0.63ms] */
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-03-15 14:40:28 [6.01ms] */
update `userprofiles` set `login_count` = 1055, `userprofiles`.`updated_at` = '2025-03-15 14:40:28' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:28 [0.31ms] */
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-03-15 14:40:28 [0.64ms] */
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-03-15 14:40:28 [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-03-15 14:40:28 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:28 [4.36ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f', 154, 5, '[]', 0, '2025-03-15 14:40:28', '2025-03-15 14:40:28', '2026-03-15 14:40:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:28 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:28 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:28 [2.24ms] */
select * from `oauth_access_tokens` where `id` = '740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:28 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:28 [0.25ms] */
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-03-15 14:40:28 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '740d460fb209045b151b49cf4694219be6e52b438163b681ec0753bbf576671ff2d0e1855a30d69f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:28 [0.95ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'YUGYUGI3362592' 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-03-15 14:40:28 [0.31ms] */
select * from `party` where `party`.`id` = 64943 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:28 [0.31ms] */
select * from `vehicle` where `id` = 99461 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:28 [0.35ms] */
select * from `party_vehicle` where `vehicle_id` = 99461 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-03-15 14:40:28 [1.96ms] */
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-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [5.78ms] */
update `userprofiles` set `login_count` = 1056, `userprofiles`.`updated_at` = '2025-03-15 14:40:28' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:28 [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-03-15 14:40:28 [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-03-15 14:40:28 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:28 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893', 154, 5, '[]', 0, '2025-03-15 14:40:28', '2025-03-15 14:40:28', '2026-03-15 14:40:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:28 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:28 [2.93ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:29 [1.69ms] */
select * from `oauth_access_tokens` where `id` = '1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:29 [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-03-15 14:40:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1bc2f743eeaa7fad1a7b074133e79db0d293f63cc42b9cc05b432c5ae1ae7263a4ffdb1a7f22a893' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:29 [0.91ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 12527 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-03-15 14:40:29 [0.25ms] */
select * from `party` where `party`.`id` = 56659 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:29 [0.26ms] */
select * from `company` where `company`.`id` = 946 and `company`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:29 [0.15ms] */
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-03-15 14:40:29 [0.28ms] */
select * from `vehicle` where `id` = 98554 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 12 - 2025-03-15 14:40:29 [0.27ms] */
select * from `party_vehicle` where `vehicle_id` = 98554 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-03-15 14:40:31 [2.16ms] */
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 1 - 2025-03-15 14:40:31 [1.37ms] */
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 1 - 2025-03-15 14:40:31 [1.62ms] */
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-03-15 14:40:31 [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 2 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [0.41ms] */
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 3 - 2025-03-15 14:40:31 [0.18ms] */
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 2 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [0.36ms] */
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-03-15 14:40:31 [5.81ms] */
update `userprofiles` set `login_count` = 1057, `last_login` = '2025-03-15 14:40:31', `userprofiles`.`updated_at` = '2025-03-15 14:40:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 14:40:31 [2.63ms] */
update `userprofiles` set `login_count` = 1057, `last_login` = '2025-03-15 14:40:31', `userprofiles`.`updated_at` = '2025-03-15 14:40:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 14:40:31 [5.73ms] */
update `userprofiles` set `login_count` = 1057, `last_login` = '2025-03-15 14:40:31', `userprofiles`.`updated_at` = '2025-03-15 14:40:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:31 [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 5 - 2025-03-15 14:40:31 [0.17ms] */
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-03-15 14:40:31 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 14:40:31 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [0.5ms] */
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-03-15 14:40:31 [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 7 - 2025-03-15 14:40:31 [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 7 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:40:31 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:31 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:40:31 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:31 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:40:31 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:40:31 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:31 [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-03-15 14:40:31 [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-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:31 [3.29ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8', 154, 5, '[]', 0, '2025-03-15 14:40:31', '2025-03-15 14:40:31', '2026-03-15 14:40:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:31 [3.82ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c', 154, 5, '[]', 0, '2025-03-15 14:40:31', '2025-03-15 14:40:31', '2026-03-15 14:40:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:31 [4.53ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895', 154, 5, '[]', 0, '2025-03-15 14:40:31', '2025-03-15 14:40:31', '2026-03-15 14:40:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:31 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:31 [2.62ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:31 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:31 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:31 [4.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:31 [5.66ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:40:31 [1.51ms] */
select * from `oauth_access_tokens` where `id` = '1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:40:31 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:40:31 [0.17ms] */
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-03-15 14:40:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1ff68026498b5966ebb8cc280791ace0b266fdbeb64ea338520fbce242e0245d249a0f9471eff53c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:40:31 [1.26ms] */
select * from `oauth_access_tokens` where `id` = '4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:40:31 [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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:40:31 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:40:31 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '4a3b8c001d6ffa79dd660f483c5011c2558a53d21ade4cffa972b939ca63b237b4d9e8a59bf6aff8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:40:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 14:40:31 [1.61ms] */
select * from `oauth_access_tokens` where `id` = '78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:40:31 [0.88ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 14:40:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:40:31 [0.3ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:40:31 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 14:40:31 [0.17ms] */
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-03-15 14:40:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '78011bf8d53abc2836c29041adb46a9d4dd4cf5beab656b3ded9cac69a61f7efce697950e0e6c895' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 14:40:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 14:40:31 [0.31ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'TT11111' 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-03-15 14:40:31 [0.15ms] */
select * from `party` where `party`.`id` = 21317 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 14:40:31 [0.15ms] */
select * from `vehicle` where `id` = 99457 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 14:40:31 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 99457 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-03-15 14:40:35 [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-03-15 14:40:35 [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-03-15 14:40:35 [0.37ms] */
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-03-15 14:40:35 [11.09ms] */
update `userprofiles` set `login_count` = 1058, `last_login` = '2025-03-15 14:40:35', `userprofiles`.`updated_at` = '2025-03-15 14:40:35' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:35 [0.17ms] */
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-03-15 14:40:35 [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-03-15 14:40:35 [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-03-15 14:40:35 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:35 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:40:35 [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-03-15 14:40:35 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:35 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:35 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8', 154, 5, '[]', 0, '2025-03-15 14:40:35', '2025-03-15 14:40:35', '2026-03-15 14:40:35');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:35 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:35 [3.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:40:36 [2.66ms] */
select * from `oauth_access_tokens` where `id` = '6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:40:36 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:40:36 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:40:36 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:40:36 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6c8d2d8b6177f9e6857f39e849fe82dd3f5e23e2c411594a3f6a351c545ee3bac6d898409cb5a2e8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:40:36 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:40:36 [137.71ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:40:36 [0.43ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:40:57 [2.08ms] */
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-03-15 14:40:57 [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-03-15 14:40:57 [0.41ms] */
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-03-15 14:40:57 [7.46ms] */
update `userprofiles` set `login_count` = 1059, `last_login` = '2025-03-15 14:40:57', `userprofiles`.`updated_at` = '2025-03-15 14:40:57' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:57 [0.21ms] */
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-03-15 14:40:57 [0.48ms] */
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-03-15 14:40:57 [0.41ms] */
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-03-15 14:40:57 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:57 [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-03-15 14:40:57 [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-03-15 14:40:57 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:57 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:57 [3ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6', 154, 5, '[]', 0, '2025-03-15 14:40:57', '2025-03-15 14:40:57', '2026-03-15 14:40:57');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:57 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:57 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:40:57 [1.34ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:40:57 [1.59ms] */
select * from `oauth_access_tokens` where `id` = 'f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:40:57 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:40:57 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:40:57 [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-03-15 14:40:57 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'f4f5531499de45ebec520e85a3f471e39e35f901313fac9b8f7dc7263d82b8957e26196dda1208f6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:40:57 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:40:57 [0.43ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 14:40:57 [0.31ms] */
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-03-15 14:40:57 [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-03-15 14:40:57 [3.4ms] */
update `userprofiles` set `login_count` = 1060, `userprofiles`.`updated_at` = '2025-03-15 14:40:57' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:40:57 [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-03-15 14:40:57 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:40:57 [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-03-15 14:40:57 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:40:57 [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-03-15 14:40:57 [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-03-15 14:40:57 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:40:57 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:40:57 [3.29ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79', 154, 5, '[]', 0, '2025-03-15 14:40:57', '2025-03-15 14:40:57', '2026-03-15 14:40:57');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:40:57 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:40:57 [3.07ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:40:57 [2.17ms] */
select * from `oauth_access_tokens` where `id` = '280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:40:57 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:40:57 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:40:57 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:40:57 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '280ebf992d7410aa695098b4f228298805d0760322621b168947dcbba18434051623e5e8e028df79' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:40:57 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:40:57 [0.43ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:40:57 [0.28ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:40:57 [0.24ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:40:59 [1.31ms] */
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-03-15 14:41:00 [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-03-15 14:41:00 [0.41ms] */
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-03-15 14:41:00 [11.19ms] */
update `userprofiles` set `login_count` = 1061, `last_login` = '2025-03-15 14:41:00', `userprofiles`.`updated_at` = '2025-03-15 14:41:00' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:41:00 [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-03-15 14:41:00 [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-03-15 14:41:00 [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-03-15 14:41:00 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:41:00 [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-03-15 14:41:00 [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-03-15 14:41:00 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:41:00 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:41:00 [3.32ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9', 154, 5, '[]', 0, '2025-03-15 14:41:00', '2025-03-15 14:41:00', '2026-03-15 14:41:00');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:41:00 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:41:00 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:41:00 [2.13ms] */
select * from `oauth_access_tokens` where `id` = 'cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:41:00 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:41:00 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:41:00 [0.35ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:41:00 [0.34ms] */
select * from `oauth_access_tokens` where `id` = 'cd1df2b57c8b39fe32c8f7d8fca08e0300e07f3089e4d4aca95a7472048e96f35ab6e05f97fbced9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:41:00 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:41:00 [0.49ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:41:00 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:41:02 [2.03ms] */
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 1 - 2025-03-15 14:41:02 [2.26ms] */
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-03-15 14:41:02 [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-03-15 14:41:02 [0.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 2 - 2025-03-15 14:41:02 [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-03-15 14:41:02 [0.57ms] */
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-03-15 14:41:02 [6ms] */
update `userprofiles` set `login_count` = 1062, `last_login` = '2025-03-15 14:41:02', `userprofiles`.`updated_at` = '2025-03-15 14:41:02' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 14:41:02 [0.24ms] */
update `userprofiles` set `login_count` = 1062, `last_login` = '2025-03-15 14:41:02', `userprofiles`.`updated_at` = '2025-03-15 14:41:02' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:41:02 [0.19ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:41:02 [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-03-15 14:41:02 [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 6 - 2025-03-15 14:41:02 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:41:02 [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 7 - 2025-03-15 14:41:02 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:41:02 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:41:02 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:41:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:41:02 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:41:02 [0.18ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:41:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:41:02 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:41:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:41:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:41:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:41:02 [3.52ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad', 154, 5, '[]', 0, '2025-03-15 14:41:02', '2025-03-15 14:41:02', '2026-03-15 14:41:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:41:02 [8.52ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da', 154, 5, '[]', 0, '2025-03-15 14:41:02', '2025-03-15 14:41:02', '2026-03-15 14:41:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:41:02 [0.61ms] */
select * from `oauth_access_tokens` where `id` = 'a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:41:02 [6.72ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:41:02 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:41:02 [7.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:41:02 [2.15ms] */
select * from `oauth_access_tokens` where `id` = 'a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:41:02 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:41:02 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:41:02 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:41:02 [2.08ms] */
select * from `oauth_access_tokens` where `id` = '0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:41:02 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'a4914384aac1e1b656712a80066656214a2569c8a631b615dcb4f13efb0d266b1c9de564f36ec6ad' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:41:02 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:41:02 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:41:02 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:41:02 [0.3ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:41:02 [0.16ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:41:02 [0.16ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:41:02 [0.25ms] */
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-03-15 14:41:02 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '0d930fd859d5b932d14f03e93869b48f21cd25f89f93f4279b2d045a60834053b7e720efc72a60da' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:41:02 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:41:02 [0.47ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:42:34 [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-03-15 14:42:34 [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-03-15 14:42:34 [0.41ms] */
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-03-15 14:42:34 [9.66ms] */
update `userprofiles` set `login_count` = 1063, `last_login` = '2025-03-15 14:42:34', `userprofiles`.`updated_at` = '2025-03-15 14:42:34' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:42:34 [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-03-15 14:42:34 [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-03-15 14:42:34 [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-03-15 14:42:34 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:42:34 [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-03-15 14:42:34 [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-03-15 14:42:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:42:34 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:42:34 [2.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635', 154, 5, '[]', 0, '2025-03-15 14:42:34', '2025-03-15 14:42:34', '2026-03-15 14:42:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:42:34 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:42:34 [2.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:42:35 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:42:35 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:42:35 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:42:35 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:42:35 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '9a74ce2e2e302d46223f07a565df70253d9f9368c3b75aea6a89dda55f2434bd2fb145263bc04635' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:42:35 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:42:35 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:42:35 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:42:38 [2.33ms] */
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 1 - 2025-03-15 14:42:38 [1.97ms] */
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-03-15 14:42:38 [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-03-15 14:42:38 [0.45ms] */
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-03-15 14:42:38 [12.67ms] */
update `userprofiles` set `login_count` = 1064, `last_login` = '2025-03-15 14:42:38', `userprofiles`.`updated_at` = '2025-03-15 14:42:38' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 14:42:38 [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-03-15 14:42:38 [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 5 - 2025-03-15 14:42:38 [0.34ms] */
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-03-15 14:42:38 [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 4 - 2025-03-15 14:42:38 [3.05ms] */
update `userprofiles` set `login_count` = 1065, `userprofiles`.`updated_at` = '2025-03-15 14:42:38' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:42:38 [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 7 - 2025-03-15 14:42:38 [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 6 - 2025-03-15 14:42:38 [0.44ms] */
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-03-15 14:42:38 [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-03-15 14:42:38 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:42:38 [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-03-15 14:42:38 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:42:38 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:42:38 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:42:38 [0.22ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:42:38 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:42:38 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:42:38 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:42:38 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:42:38 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702', 154, 5, '[]', 0, '2025-03-15 14:42:38', '2025-03-15 14:42:38', '2026-03-15 14:42:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:42:38 [3.08ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92', 154, 5, '[]', 0, '2025-03-15 14:42:38', '2025-03-15 14:42:38', '2026-03-15 14:42:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:42:38 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:42:38 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:42:38 [3.07ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:42:38 [5.29ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:42:38 [1.53ms] */
select * from `oauth_access_tokens` where `id` = '2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:42:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:42:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:42:38 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:42:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2fac02000fe6f9daed20e764a24d24e5940d5d585a2d2e434ffec4dc5991ed4b9d1eaa6ad9f7d702' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:42:38 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:42:38 [0.31ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:42:38 [0.19ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:42:38 [0.16ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:42:38 [2.09ms] */
select * from `oauth_access_tokens` where `id` = '3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:42:38 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:42:38 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:42:38 [0.28ms] */
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-03-15 14:42:38 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '3d425e46edd120ccf8fc37e3efc24774ec4d3290ca2c3365565738e7acb7b382fde8fbef5fb61c92' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:42:38 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:42:38 [0.49ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:45:01 [2.07ms] */
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-03-15 14:45:01 [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-03-15 14:45:01 [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-03-15 14:45:01 [9.66ms] */
update `userprofiles` set `login_count` = 1066, `last_login` = '2025-03-15 14:45:01', `userprofiles`.`updated_at` = '2025-03-15 14:45:01' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:01 [0.32ms] */
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-03-15 14:45:01 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:45:01 [0.15ms] */
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-03-15 14:45:01 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:01 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:45:01 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:45:01 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:01 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:01 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c', 154, 5, '[]', 0, '2025-03-15 14:45:01', '2025-03-15 14:45:01', '2026-03-15 14:45:01');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:01 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:01 [2.86ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:45:01 [1.53ms] */
select * from `oauth_access_tokens` where `id` = '41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:45:01 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:45:01 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:45:01 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:45:01 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '41ac504e7a2d6c45b04831bd42e0e2444033eb431d6d0a1f724863e72ff845da55dbd24f45361e3c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:45:01 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:45:01 [0.27ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:45:01 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:45:04 [2.54ms] */
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 1 - 2025-03-15 14:45:04 [2.04ms] */
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-03-15 14:45:04 [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-03-15 14:45:04 [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-03-15 14:45:04 [10.91ms] */
update `userprofiles` set `login_count` = 1067, `last_login` = '2025-03-15 14:45:04', `userprofiles`.`updated_at` = '2025-03-15 14:45:04' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:04 [0.31ms] */
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-03-15 14:45:04 [0.65ms] */
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-03-15 14:45:04 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:45:04 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:04 [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-03-15 14:45:04 [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-03-15 14:45:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:04 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 14:45:04 [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-03-15 14:45:04 [0.36ms] */
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 13 - 2025-03-15 14:45:04 [4.81ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c', 154, 5, '[]', 0, '2025-03-15 14:45:04', '2025-03-15 14:45:04', '2026-03-15 14:45:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 14:45:04 [4.89ms] */
update `userprofiles` set `login_count` = 1068, `userprofiles`.`updated_at` = '2025-03-15 14:45:04' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:04 [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-03-15 14:45:04 [0.37ms] */
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-03-15 14:45:04 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:04 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:04 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:45:04 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:04 [0.15ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 14:45:04 [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-03-15 14:45:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:04 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:04 [3.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98', 154, 5, '[]', 0, '2025-03-15 14:45:04', '2025-03-15 14:45:04', '2026-03-15 14:45:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:04 [0.44ms] */
select * from `oauth_access_tokens` where `id` = 'd4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:04 [2.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:45:04 [2.64ms] */
select * from `oauth_access_tokens` where `id` = '1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:45:04 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:45:04 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:45:04 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:45:04 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1cceece0ab3043dde37e03577f243696427897e8f1a5200c6c4a867d3d2c8a9fc67410e4e5d1d83c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:45:04 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:45:04 [0.32ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:45:04 [0.18ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:45:04 [0.16ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:45:04 [2.12ms] */
select * from `oauth_access_tokens` where `id` = 'd4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:45:04 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'd4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:45:04 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:45:04 [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-03-15 14:45:04 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'd4117e6b787dd9cb5926e27fb69c93fa281143c8f9ead846da008b6b83ca3c6ee5e972a871938e98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:45:04 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:45:04 [0.47ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:45:10 [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-03-15 14:45: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/login
   Query 3 - 2025-03-15 14:45:10 [0.51ms] */
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-03-15 14:45:10 [11.68ms] */
update `userprofiles` set `login_count` = 1069, `last_login` = '2025-03-15 14:45:10', `userprofiles`.`updated_at` = '2025-03-15 14:45:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:10 [0.32ms] */
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-03-15 14:45:10 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:45:10 [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-03-15 14:45:10 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:10 [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-03-15 14:45:10 [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-03-15 14:45:10 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:10 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:10 [3.27ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0', 154, 5, '[]', 0, '2025-03-15 14:45:10', '2025-03-15 14:45:10', '2026-03-15 14:45:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:10 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:10 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:45:11 [2.44ms] */
select * from `oauth_access_tokens` where `id` = '6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:45:11 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:45:11 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:45:11 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:45:11 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6a78d9301d18102b1112a4a451161613136ee049adc89240727d10792178ea0c91556d3e644a3de0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:45:11 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:45:11 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:45:11 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:45:12 [1.34ms] */
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 1 - 2025-03-15 14:45:12 [1.97ms] */
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-03-15 14:45:13 [0.21ms] */
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-03-15 14:45:13 [0.5ms] */
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-03-15 14:45:13 [4.95ms] */
update `userprofiles` set `login_count` = 1070, `last_login` = '2025-03-15 14:45:13', `userprofiles`.`updated_at` = '2025-03-15 14:45:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:13 [0.19ms] */
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-03-15 14:45:13 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:45:13 [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-03-15 14:45:13 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:13 [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-03-15 14:45:13 [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-03-15 14:45:13 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:13 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 14:45:13 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:13 [3.34ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640', 154, 5, '[]', 0, '2025-03-15 14:45:13', '2025-03-15 14:45:13', '2026-03-15 14:45:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 14:45:13 [0.58ms] */
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-03-15 14:45:13 [3.06ms] */
update `userprofiles` set `login_count` = 1071, `userprofiles`.`updated_at` = '2025-03-15 14:45:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:13 [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-03-15 14:45:13 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:13 [0.43ms] */
select * from `oauth_access_tokens` where `id` = 'aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:45:13 [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 15 - 2025-03-15 14:45:13 [3.22ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:45:13 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:13 [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-03-15 14:45:13 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:45:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:13 [3.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7', 154, 5, '[]', 0, '2025-03-15 14:45:13', '2025-03-15 14:45:13', '2026-03-15 14:45:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:13 [0.52ms] */
select * from `oauth_access_tokens` where `id` = 'baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:13 [3.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:45:13 [1.92ms] */
select * from `oauth_access_tokens` where `id` = 'aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:45:13 [1.42ms] */
select * from `oauth_access_tokens` where `id` = 'baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:45:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:45:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:45:13 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:45:13 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:45:13 [0.17ms] */
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-03-15 14:45:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'baa72348992fd74195442fb0868d4d961f68478d1b34d0261361ab3c64d94d2b9c76335b77d4d1b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:45:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:45:13 [0.34ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:45:13 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:45:13 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'aa30b0a011921fc3e8ae73cec7df97f517aad89857143b50b541741edddca186dbdeb84d52e75640' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:45:13 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:45:13 [0.52ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:45:13 [0.24ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:45:13 [0.31ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:45:14 [1.33ms] */
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-03-15 14:45:14 [0.15ms] */
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-03-15 14:45:14 [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-03-15 14:45:14 [12.18ms] */
update `userprofiles` set `login_count` = 1072, `last_login` = '2025-03-15 14:45:14', `userprofiles`.`updated_at` = '2025-03-15 14:45:14' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:45:14 [0.31ms] */
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-03-15 14:45:14 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:45:14 [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-03-15 14:45:14 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:45:14 [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-03-15 14:45:14 [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-03-15 14:45:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:45:14 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:45:14 [7.73ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9', 154, 5, '[]', 0, '2025-03-15 14:45:14', '2025-03-15 14:45:14', '2026-03-15 14:45:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:45:14 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:45:14 [7.46ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:45:15 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:45:15 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:45:15 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:45:15 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:45:15 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '9e0e466bf7c106ce738e77d22f43d8b343535d1cbbaa23cd1f1aedb6b3cfdde8e744ea8a5b0d25f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:45:15 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:45:15 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:45:15 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:46:31 [2.13ms] */
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-03-15 14:46:31 [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-03-15 14:46:31 [0.44ms] */
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-03-15 14:46:31 [3.71ms] */
update `userprofiles` set `login_count` = 1073, `last_login` = '2025-03-15 14:46:31', `userprofiles`.`updated_at` = '2025-03-15 14:46:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:46:31 [0.2ms] */
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-03-15 14:46:31 [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-03-15 14:46:31 [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-03-15 14:46:31 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:46:31 [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-03-15 14:46:31 [0.3ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:46:31 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:46:31 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:46:31 [3.38ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01', 154, 5, '[]', 0, '2025-03-15 14:46:31', '2025-03-15 14:46:31', '2026-03-15 14:46:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:46:31 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:46:31 [2.71ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:46:31 [2.22ms] */
select * from `oauth_access_tokens` where `id` = '3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:46:31 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:46:31 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:46:31 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:46:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '3c996e9f751c1cb59a15f117bd46bea23eaed6b9558636e4e8c3f5509a6ea869183eea847c7c9c01' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:46:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:46:31 [0.27ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:46:31 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:46:46 [2.02ms] */
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-03-15 14:46:46 [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-03-15 14:46:46 [0.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-03-15 14:46:46 [11.34ms] */
update `userprofiles` set `login_count` = 1074, `last_login` = '2025-03-15 14:46:46', `userprofiles`.`updated_at` = '2025-03-15 14:46:46' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:46:46 [0.26ms] */
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-03-15 14:46:46 [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-03-15 14:46:46 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:46:46 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:46:46 [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-03-15 14:46:46 [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-03-15 14:46:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:46:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:46:46 [3.3ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a', 154, 5, '[]', 0, '2025-03-15 14:46:46', '2025-03-15 14:46:46', '2026-03-15 14:46:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:46:46 [0.42ms] */
select * from `oauth_access_tokens` where `id` = '3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:46:46 [3.22ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:46:46 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:46:46 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:46:46 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:46:46 [0.34ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:46:46 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '3a769579fd53b028fa416ed7eb142e95d9870d6da8d04d33d65d2571689c2843758743641c45858a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:46:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:46:46 [0.27ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485808 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:46:46 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485808 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:46:59 [1.32ms] */
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-03-15 14:46:59 [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-03-15 14:46:59 [0.47ms] */
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-03-15 14:46:59 [12.24ms] */
update `userprofiles` set `login_count` = 1075, `last_login` = '2025-03-15 14:46:59', `userprofiles`.`updated_at` = '2025-03-15 14:46:59' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:46:59 [0.31ms] */
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-03-15 14:46:59 [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-03-15 14:46:59 [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-03-15 14:46:59 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:46:59 [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-03-15 14:46:59 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:46:59 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:46:59 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:46:59 [3.46ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83', 154, 5, '[]', 0, '2025-03-15 14:46:59', '2025-03-15 14:46:59', '2026-03-15 14:46:59');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:46:59 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:46:59 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:46:59 [2.37ms] */
select * from `oauth_access_tokens` where `id` = 'f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:46:59 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:46:59 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:46:59 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:46:59 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'f1602abc5b094d74f42360cc4058ce6795fd323e6e7ad2809b510479570535f4907f5517c5969a83' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:46:59 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:46:59 [116.34ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485809 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:46:59 [0.35ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485809 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:47:25 [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-03-15 14:47:25 [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-03-15 14:47:25 [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-03-15 14:47:25 [11.55ms] */
update `userprofiles` set `login_count` = 1076, `last_login` = '2025-03-15 14:47:25', `userprofiles`.`updated_at` = '2025-03-15 14:47:25' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:47:25 [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-03-15 14:47:25 [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-03-15 14:47:25 [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-03-15 14:47:25 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:47:25 [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-03-15 14:47:25 [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-03-15 14:47:25 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:47:25 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:47:25 [3.54ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52', 154, 5, '[]', 0, '2025-03-15 14:47:25', '2025-03-15 14:47:25', '2026-03-15 14:47:25');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:47:26 [0.42ms] */
select * from `oauth_access_tokens` where `id` = 'ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:47:26 [3.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 14:47:26 [1.8ms] */
select * from `oauth_access_tokens` where `id` = 'ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 14:47:26 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 14:47:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 14:47:26 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 14:47:26 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ae8429e6f996932b2ea21b811b8f0c733887a6edf51a4c163440ce6b8d9e5fb88680424571fd7a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 14:47:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 14:47:26 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 485809 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 14:47:26 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 485809 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:48:36 [1.34ms] */
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-03-15 14:48:36 [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-03-15 14:48:36 [0.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-03-15 14:48:36 [11.36ms] */
update `userprofiles` set `login_count` = 1077, `last_login` = '2025-03-15 14:48:36', `userprofiles`.`updated_at` = '2025-03-15 14:48:36' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:48:36 [0.31ms] */
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-03-15 14:48:36 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:48:36 [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-03-15 14:48:36 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:48:36 [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-03-15 14:48:36 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:48:36 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:48:36 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:48:36 [3.65ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d', 154, 5, '[]', 0, '2025-03-15 14:48:36', '2025-03-15 14:48:36', '2026-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:48:36 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:48:36 [3.48ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 1 - 2025-03-15 14:48:36 [2.3ms] */
select * from `oauth_access_tokens` where `id` = '7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 2 - 2025-03-15 14:48:36 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 3 - 2025-03-15 14:48:36 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 4 - 2025-03-15 14:48:36 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 5 - 2025-03-15 14:48:36 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '7193aa9b44e6ef2ed800e923ba20f4fe93b939b5196ad1dd5e82880e9acbaace3bfec9ff3109b61d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 6 - 2025-03-15 14:48:36 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 7 - 2025-03-15 14:48:36 [40.8ms] */
select count(*) as aggregate from `payment` where `external_payment_reference_no` = 'PRC183DEDE';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 8 - 2025-03-15 14:48:36 [0.33ms] */
select * from `payment_method` where `name` = 'SomBank' and `payment_method`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 9 - 2025-03-15 14:48:36 [1.3ms] */
select * from `invoice` where `id` in (485809) and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 10 - 2025-03-15 14:48:36 [7.69ms] */
insert into `Payment` (`payment_amount`, `payment_date`, `external_payment_reference_no`, `payment_method_id`, `paid_by`, `paid_by_mobile`, `payment_collected_by`, `district_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (38.00, '2025-03-15 14:48:36', 'PRC183DEDE', 6, 'Anand abin', +25296004716, 1, 1, 154, 154, '2025-03-15 14:48:36', '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 11 - 2025-03-15 14:48:36 [0.38ms] */
select * from `Payment` where `id` = 177658 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 12 - 2025-03-15 14:48:36 [3.99ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('Payment', '{"attributes":{"payment_method_id":6,"payment_amount":"38.00","payment_date":"2025-03-15 14:48:36","external_payment_reference_no":"PRC183DEDE","payment_receipt_number":null,"siinpay_payref_number":null,"paid_by":"Anand abin","paid_by_mobile":"+25296004716","district_id":1,"migration_id":null,"payment_collected_by":1}}', 154, 'App\Models\User', 177658, 'Modules\Transaction\Entities\Payment', 'created', '2025-03-15 14:48:36', '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 13 - 2025-03-15 14:48:36 [3.56ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-03-15 14:48:36', 485809, 177658, '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-03-15 14:48:36 [0.41ms] */
select * from `invoice` where `invoice`.`id` = 485809 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-03-15 14:48:36 [0.49ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 485809 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-03-15 14:48:36 [0.47ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 485809 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-03-15 14:48:36 [3.17ms] */
update `invoice` set `invoice_amount` = 38, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 38, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-03-15 14:48:36' where `id` = 485809;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-03-15 14:48:36 [0.24ms] */
select * from `invoice` where `id` = 485809 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-03-15 14:48:36 [3.07ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 485809, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-03-15 14:48:36', '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-03-15 14:48:36 [375.11ms] */
select * from `transaction` where `invoice_id` = 485809 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-03-15 14:48:36 [6.01ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-03-15 14:48:36' where `id` = 400623 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-03-15 14:48:36 [0.26ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 23 - 2025-03-15 14:48:36 [0.64ms] */
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/make_payments
   Query 24 - 2025-03-15 14:48:36 [0.23ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-03-15 14:48:36 [0.42ms] */
select * from `transaction` where `transaction`.`id` = 510106 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-03-15 14:48:36 [0.26ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 27 - 2025-03-15 14:48:36 [0.28ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-03-15 14:48:36 [0.13ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 29 - 2025-03-15 14:48:36 [0.29ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (510106, 'APPROVED', '2025-03-15 14:48:36', 5, 154, null, 154, 154, '2025-03-15 14:48:36', '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-03-15 14:48:36 [0.13ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 31 - 2025-03-15 14:48:36 [0.25ms] */
update `transaction` set `current_workflow_state_id` = 8, `status` = 'INPROGRESS', `updated_by` = 154, `transaction`.`updated_at` = '2025-03-15 14:48:36' where `id` = 510106;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-03-15 14:48:36 [0.12ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 33 - 2025-03-15 14:48:36 [0.21ms] */
select * from `invoice` where `invoice`.`id` = 485809 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-03-15 14:48:36 [0.22ms] */
select * from `vehicle_tax` where `transaction_id` = 510106 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-03-15 14:48:36 [0.19ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-03-15 14:48:36' where `id` = 400623;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-03-15 14:48:36 [0.16ms] */
select * from `vehicle_tax` where `id` = 400623 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-03-15 14:48:36 [0.21ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 400623, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-03-15 14:48:36', '2025-03-15 14:48:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 14:48:43 [1.37ms] */
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 1 - 2025-03-15 14:48:43 [2.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-03-15 14:48:44 [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-03-15 14:48:44 [0.45ms] */
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 2 - 2025-03-15 14:48:44 [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-03-15 14:48:44 [0.36ms] */
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-03-15 14:48:44 [7.4ms] */
update `userprofiles` set `login_count` = 1078, `last_login` = '2025-03-15 14:48:44', `userprofiles`.`updated_at` = '2025-03-15 14:48:44' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 14:48:44 [11.34ms] */
update `userprofiles` set `login_count` = 1078, `last_login` = '2025-03-15 14:48:44', `userprofiles`.`updated_at` = '2025-03-15 14:48:44' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:48:44 [0.17ms] */
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-03-15 14:48:44 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 14:48:44 [0.31ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 14:48:44 [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 6 - 2025-03-15 14:48:44 [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-03-15 14:48:44 [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-03-15 14:48:44 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:48:44 [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-03-15 14:48:44 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 14:48:44 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:48:44 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 14:48:44 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 14:48:44 [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-03-15 14:48:44 [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-03-15 14:48:44 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 14:48:44 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:48:44 [3.62ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa', 154, 5, '[]', 0, '2025-03-15 14:48:44', '2025-03-15 14:48:44', '2026-03-15 14:48:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 14:48:44 [3.38ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10', 154, 5, '[]', 0, '2025-03-15 14:48:44', '2025-03-15 14:48:44', '2026-03-15 14:48:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:48:44 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 14:48:44 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:48:44 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 14:48:44 [2.8ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 14:48:44 [1.5ms] */
select * from `oauth_access_tokens` where `id` = '09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 14:48:44 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 14:48:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 14:48:44 [0.17ms] */
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-03-15 14:48:44 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '09c65ac41815794d801ba75666286742f8f295baff5bf92c278dd1b8c8c8d804b9a2eece7cf746fa' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 14:48:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 14:48:44 [1.02ms] */
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` = 21317 and `license_plate` = 'TT11111' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 14:48:44 [1.66ms] */
select * from `oauth_access_tokens` where `id` = 'b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 14:48:44 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 14:48:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 14:48:44 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 14:48:44 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b526531d4631fd346c30035c2928c8785be82364b109c7b3d04d8dc8bf5e031edf134b688b232e10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 14:48:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 14:48:44 [0.94ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 21317 and `vehicle`.`license_plate` = 'TT11111' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 14:48:44 [0.55ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177658 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 14:48:44 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177617 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-03-15 14:48:44 [0.35ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177353 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 15:02:02 [2.16ms] */
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-03-15 15:02:02 [0.63ms] */
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-03-15 15:02:02 [1.23ms] */
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-03-15 15:02:02 [13.53ms] */
update `userprofiles` set `login_count` = 1079, `last_login` = '2025-03-15 15:02:02', `userprofiles`.`updated_at` = '2025-03-15 15:02:02' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:02 [0.59ms] */
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-03-15 15:02:02 [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-03-15 15:02:02 [1.91ms] */
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-03-15 15:02:02 [0.55ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02:02 [0.38ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 15:02:02 [0.27ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:02 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:02 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e', 154, 5, '[]', 0, '2025-03-15 15:02:02', '2025-03-15 15:02:02', '2026-03-15 15:02:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:02 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:02 [3.3ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 15:02:02 [2.2ms] */
select * from `oauth_access_tokens` where `id` = '1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 15:02:02 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 15:02:02 [0.42ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 15:02:02 [0.63ms] */
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-03-15 15:02:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1c5f936ae5e8a7d13bcceb9df54fb93f41ba0bc26385bb9238df62e9b78dab98f9174a5504e4980e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 15:02:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 15:02:02 [1.18ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'VH001' 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-03-15 15:02:02 [0.26ms] */
select * from `party` where `party`.`id` = 64948 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 15:02:02 [0.23ms] */
select * from `vehicle` where `id` = 99502 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 15:02:02 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 99502 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-03-15 15:02:02 [2.07ms] */
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-03-15 15:02:02 [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-03-15 15:02:02 [0.86ms] */
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-03-15 15:02:02 [3.96ms] */
update `userprofiles` set `login_count` = 1080, `userprofiles`.`updated_at` = '2025-03-15 15:02:02' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:02 [0.31ms] */
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-03-15 15:02:02 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 15:02:02 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 15:02:02 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02:02 [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-03-15 15:02:02 [0.27ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:02 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:02 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:02 [3.86ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727', 154, 5, '[]', 0, '2025-03-15 15:02:02', '2025-03-15 15:02:02', '2026-03-15 15:02:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:02 [0.58ms] */
select * from `oauth_access_tokens` where `id` = '47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:02 [3.52ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 15:02:02 [2.33ms] */
select * from `oauth_access_tokens` where `id` = '47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 15:02:02 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 15:02:02 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 15:02:03 [0.27ms] */
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-03-15 15:02:03 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '47ad1c7bf4afd1ebfafc6b3a5f3d11aaf2a108c034e05c64359235e69574cbd062697cc6b657a727' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 15:02:03 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 15:02:03 [1.1ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'VH002' 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-03-15 15:02:03 [0.63ms] */
select * from `party` where `party`.`id` = 64949 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 15:02:03 [0.54ms] */
select * from `vehicle` where `id` = 99503 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 15:02:03 [0.54ms] */
select * from `party_vehicle` where `vehicle_id` = 99503 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-03-15 15:02:05 [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 1 - 2025-03-15 15:02:05 [1.77ms] */
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 1 - 2025-03-15 15:02:05 [2.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-03-15 15:02:05 [0.23ms] */
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-03-15 15:02:05 [0.41ms] */
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-03-15 15:02:05 [10.85ms] */
update `userprofiles` set `login_count` = 1081, `last_login` = '2025-03-15 15:02:05', `userprofiles`.`updated_at` = '2025-03-15 15:02:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 15:02:05 [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 5 - 2025-03-15 15:02:05 [0.34ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 15:02:05 [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 6 - 2025-03-15 15:02:05 [0.96ms] */
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 4 - 2025-03-15 15:02:05 [3.07ms] */
update `userprofiles` set `login_count` = 1082, `userprofiles`.`updated_at` = '2025-03-15 15:02:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 15:02:05 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:05 [0.14ms] */
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-03-15 15:02:05 [0.35ms] */
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-03-15 15:02:05 [0.14ms] */
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-03-15 15:02: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-03-15 15:02: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-03-15 15:02:05 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 15:02:05 [0.12ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02:05 [0.1ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 15:02:05 [0.11ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:05 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:05 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:05 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 15:02: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/login
   Query 3 - 2025-03-15 15:02:05 [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 13 - 2025-03-15 15:02:05 [3.18ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097', 154, 5, '[]', 0, '2025-03-15 15:02:05', '2025-03-15 15:02:05', '2026-03-15 15:02:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:05 [5.62ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8', 154, 5, '[]', 0, '2025-03-15 15:02:05', '2025-03-15 15:02:05', '2026-03-15 15:02:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 15:02:05 [3.97ms] */
update `userprofiles` set `login_count` = 1083, `userprofiles`.`updated_at` = '2025-03-15 15:02:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:05 [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-03-15 15:02:05 [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-03-15 15:02:05 [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 14 - 2025-03-15 15:02:05 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:05 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 15:02:05 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02: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 15 - 2025-03-15 15:02:05 [3ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 15:02:05 [0.19ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:05 [4.68ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:05 [4.12ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b', 154, 5, '[]', 0, '2025-03-15 15:02:05', '2025-03-15 15:02:05', '2026-03-15 15:02:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:05 [0.48ms] */
select * from `oauth_access_tokens` where `id` = 'd5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:05 [3.68ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 15:02:05 [1.54ms] */
select * from `oauth_access_tokens` where `id` = '2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 15:02:05 [1.54ms] */
select * from `oauth_access_tokens` where `id` = '3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 15:02:05 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 15:02:05 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 15:02:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 15:02:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 15:02:05 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 15:02:05 [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-03-15 15:02:05 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2b64f0885a9253daff8fa8630607b4099b3c6589212ca8748f517faf94236458bae419d08279beb8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 15:02:05 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '3898043f9d02b19cfdd0220ada804dff716b284f99c45031f86b860979bee8b6a2db1f97088ba097' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 15:02:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 15:02:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 15:02:05 [0.38ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'VH002' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 15:02:05 [2.15ms] */
select * from `oauth_access_tokens` where `id` = 'd5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 15:02:05 [1.2ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 64949 and `vehicle`.`license_plate` = 'VH002' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-15 15:02:05 [0.15ms] */
select * from `party` where `party`.`id` = 64949 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 15:02:05 [0.44ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177649 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 15:02:05 [0.15ms] */
select * from `vehicle` where `id` = 99503 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 15:02:05 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 99503 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 15:02:05 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'd5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 15:02:05 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 15:02:05 [0.31ms] */
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-03-15 15:02:05 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'd5c061bf32216d598fed75d4567693c9a535201ed8f14c27bd4a2751cc360237979f5fc0b4e99b3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 15:02:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 15:02:05 [0.94ms] */
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` = 64949 and `license_plate` = 'VH002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 15:02:43 [2.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-03-15 15:02:43 [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-03-15 15:02:43 [0.41ms] */
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-03-15 15:02:43 [3.35ms] */
update `userprofiles` set `login_count` = 1084, `last_login` = '2025-03-15 15:02:43', `userprofiles`.`updated_at` = '2025-03-15 15:02:43' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:43 [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-03-15 15:02:43 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 15:02:43 [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-03-15 15:02:43 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02:43 [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-03-15 15:02:43 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:43 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:43 [3.26ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8', 154, 5, '[]', 0, '2025-03-15 15:02:43', '2025-03-15 15:02:43', '2026-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:43 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:43 [3.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 1 - 2025-03-15 15:02:43 [1.44ms] */
select * from `oauth_access_tokens` where `id` = '232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 2 - 2025-03-15 15:02:43 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 3 - 2025-03-15 15:02:43 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 4 - 2025-03-15 15:02:43 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 5 - 2025-03-15 15:02:43 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '232cacca99864a3168d6a9d25ec8ecf49ff9169d3380854810db44f7e04874040ffc7696e041d0b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 6 - 2025-03-15 15:02:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 7 - 2025-03-15 15:02:43 [57.84ms] */
select count(*) as aggregate from `payment` where `external_payment_reference_no` = 'PRF9F5044E';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 8 - 2025-03-15 15:02:43 [0.46ms] */
select * from `payment_method` where `name` = 'SomBank' and `payment_method`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 9 - 2025-03-15 15:02:43 [0.35ms] */
select * from `invoice` where `id` in (486535) and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 10 - 2025-03-15 15:02:43 [4.14ms] */
insert into `Payment` (`payment_amount`, `payment_date`, `external_payment_reference_no`, `payment_method_id`, `paid_by`, `paid_by_mobile`, `payment_collected_by`, `district_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (38.00, '2025-03-15 15:02:43', 'PRF9F5044E', 6, 'test', +252222333444, 1, 1, 154, 154, '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 11 - 2025-03-15 15:02:43 [0.28ms] */
select * from `Payment` where `id` = 177659 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 12 - 2025-03-15 15:02:43 [5.55ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('Payment', '{"attributes":{"payment_method_id":6,"payment_amount":"38.00","payment_date":"2025-03-15 15:02:43","external_payment_reference_no":"PRF9F5044E","payment_receipt_number":null,"siinpay_payref_number":null,"paid_by":"test","paid_by_mobile":"+252222333444","district_id":1,"migration_id":null,"payment_collected_by":1}}', 154, 'App\Models\User', 177659, 'Modules\Transaction\Entities\Payment', 'created', '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 13 - 2025-03-15 15:02:43 [6.71ms] */
select * from `invoice` where `id` = 486595 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-03-15 15:02:43 [3.75ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-03-15 15:02:43', 486595, 177659, '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-03-15 15:02:43 [0.32ms] */
select * from `invoice` where `invoice`.`id` = 486595 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-03-15 15:02:43 [0.44ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 486595 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-03-15 15:02:43 [4.62ms] */
update `invoice` set `outstanding_balance` = 0, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-03-15 15:02:43' where `id` = 486595;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-03-15 15:02:43 [0.25ms] */
select * from `invoice` where `id` = 486595 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-03-15 15:02:43 [3.89ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 486595, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-03-15 15:02:43 [2.94ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-03-15 15:02:43', 486535, 177659, '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-03-15 15:02:43 [0.23ms] */
select * from `invoice` where `invoice`.`id` = 486535 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-03-15 15:02:43 [0.27ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 486535 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 23 - 2025-03-15 15:02:43 [1.24ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 486535 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 24 - 2025-03-15 15:02:43 [3.29ms] */
update `invoice` set `invoice_amount` = 38, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 38, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-03-15 15:02:43' where `id` = 486535;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-03-15 15:02:43 [0.21ms] */
select * from `invoice` where `id` = 486535 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-03-15 15:02:43 [2.83ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 486535, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 27 - 2025-03-15 15:02:43 [488.41ms] */
select * from `transaction` where `invoice_id` = 486535 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-03-15 15:02:43 [3.16ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-03-15 15:02:43' where `id` = 401124 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 29 - 2025-03-15 15:02:43 [0.41ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-03-15 15:02:43 [0.46ms] */
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/make_payments
   Query 31 - 2025-03-15 15:02:43 [0.29ms] */
select * from `roles` where `roles`.`id` = 7 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-03-15 15:02:43 [0.35ms] */
select * from `transaction` where `transaction`.`id` = 510860 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 33 - 2025-03-15 15:02:43 [0.31ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-03-15 15:02:43 [0.29ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-03-15 15:02:43 [0.26ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-03-15 15:02:43 [0.48ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (510860, 'APPROVED', '2025-03-15 15:02:43', 7, 154, null, 154, 154, '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-03-15 15:02:43 [0.32ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 38 - 2025-03-15 15:02:43 [0.38ms] */
update `transaction` set `current_workflow_state_id` = 8, `updated_by` = 154, `transaction`.`updated_at` = '2025-03-15 15:02:43' where `id` = 510860;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 39 - 2025-03-15 15:02:43 [0.25ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 40 - 2025-03-15 15:02:43 [0.3ms] */
select * from `invoice` where `invoice`.`id` = 486535 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 41 - 2025-03-15 15:02:43 [0.31ms] */
select * from `vehicle_tax` where `transaction_id` = 510860 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 42 - 2025-03-15 15:02:43 [0.2ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-03-15 15:02:43' where `id` = 401124;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 43 - 2025-03-15 15:02:43 [0.21ms] */
select * from `vehicle_tax` where `id` = 401124 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 44 - 2025-03-15 15:02:43 [0.44ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 401124, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 45 - 2025-03-15 15:02:43 [0.58ms] */
select * from `transaction` where `transaction`.`id` = 510920 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 46 - 2025-03-15 15:02:43 [0.2ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 47 - 2025-03-15 15:02:43 [0.18ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 48 - 2025-03-15 15:02:43 [0.19ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 49 - 2025-03-15 15:02:43 [0.27ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (510920, 'APPROVED', '2025-03-15 15:02:43', 7, 154, null, 154, 154, '2025-03-15 15:02:43', '2025-03-15 15:02:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 50 - 2025-03-15 15:02:43 [0.19ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 51 - 2025-03-15 15:02:43 [0.3ms] */
update `transaction` set `current_workflow_state_id` = 8, `updated_by` = 154, `transaction`.`updated_at` = '2025-03-15 15:02:43' where `id` = 510920;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 52 - 2025-03-15 15:02:43 [0.19ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 53 - 2025-03-15 15:02:43 [0.27ms] */
select * from `invoice` where `invoice`.`id` = 486595 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 15:02:51 [6.2ms] */
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 1 - 2025-03-15 15:02:51 [1.05ms] */
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-03-15 15:02: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/login
   Query 3 - 2025-03-15 15:02:51 [0.96ms] */
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 2 - 2025-03-15 15:02: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/login
   Query 3 - 2025-03-15 15:02:51 [0.32ms] */
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-03-15 15:02:51 [5.31ms] */
update `userprofiles` set `login_count` = 1085, `last_login` = '2025-03-15 15:02:51', `userprofiles`.`updated_at` = '2025-03-15 15:02:51' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 15:02:51 [0.15ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 15:02:51 [13.16ms] */
update `userprofiles` set `login_count` = 1085, `last_login` = '2025-03-15 15:02:51', `userprofiles`.`updated_at` = '2025-03-15 15:02:51' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 15:02:51 [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-03-15 15:02:51 [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 5 - 2025-03-15 15:02: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-03-15 15:02:51 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 15:02: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-03-15 15:02: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 7 - 2025-03-15 15:02:51 [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 10 - 2025-03-15 15:02:51 [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-03-15 15:02:51 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:51 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 15:02:51 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 15:02:51 [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-03-15 15:02:51 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:51 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b', 154, 5, '[]', 0, '2025-03-15 15:02:51', '2025-03-15 15:02:51', '2026-03-15 15:02:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 15:02:51 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 15:02:51 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 15:02:51 [2.94ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8', 154, 5, '[]', 0, '2025-03-15 15:02:51', '2025-03-15 15:02:51', '2026-03-15 15:02:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:51 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 15:02:51 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:51 [3.02ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 15:02:51 [5.51ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 15:02:51 [2.3ms] */
select * from `oauth_access_tokens` where `id` = '4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-03-15 15:02:51 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-03-15 15:02:51 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 15:02:51 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-03-15 15:02:51 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 15:02:51 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-03-15 15:02:51 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-03-15 15:02:51 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2494a1ebec572402b5cb6dfd31fb4e21e8acaf28a04ee4e52c72e75224aed14bfc4488a85b417b9b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-03-15 15:02:51 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 15:02:51 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-03-15 15:02:51 [0.95ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 64949 and `vehicle`.`license_plate` = 'VH002' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-15 15:02:51 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4a5fd013c8d0cd2f63bb5f29f186d45acf513946821c2bdada3ff83c3493cf8d26373828ff535fc8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 15:02:51 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-03-15 15:02:51 [0.43ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177659 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-03-15 15:02:51 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177649 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 15:02:51 [0.77ms] */
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` = 64949 and `license_plate` = 'VH002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:58:34 [2.81ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:58:34 [0.3ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:58:34 [0.45ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:58:34 [6.12ms] */
update `userprofiles` set `last_ip` = '152.58.251.101', `login_count` = 6093, `last_login` = '2025-03-15 18:58:34', `userprofiles`.`updated_at` = '2025-03-15 18:58:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:58:34 [0.53ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:58:34 [0.9ms] */
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-03-15 18:58:34 [0.55ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:58:34 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:58:34 [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-03-15 18:58:34 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:58:34 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:58:34 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:58:34 [3.77ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9fc52d8034a6eb2f4a63170b5000dc637d8499ebf79fde3ed5c093943fe4a77d47853977dfc1bfe3', 149, 5, '[]', 0, '2025-03-15 18:58:34', '2025-03-15 18:58:34', '2026-03-15 18:58:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:58:34 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '9fc52d8034a6eb2f4a63170b5000dc637d8499ebf79fde3ed5c093943fe4a77d47853977dfc1bfe3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:58:34 [3.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9fc52d8034a6eb2f4a63170b5000dc637d8499ebf79fde3ed5c093943fe4a77d47853977dfc1bfe3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:58:53 [1.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:58:53 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:58:53 [0.52ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:58:53 [12.27ms] */
update `userprofiles` set `login_count` = 6094, `last_login` = '2025-03-15 18:58:53', `userprofiles`.`updated_at` = '2025-03-15 18:58:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:58:53 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:58:53 [0.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 18:58:53 [0.34ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:58:53 [0.15ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:58:53 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 18:58:53 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:58:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:58:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:58:53 [3.39ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7eb14ac2064427d8d98898d79a851b3a1681849b4b42b325981e8ec9c51086a8465575cb65078570', 149, 5, '[]', 0, '2025-03-15 18:58:53', '2025-03-15 18:58:53', '2026-03-15 18:58:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:58:53 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '7eb14ac2064427d8d98898d79a851b3a1681849b4b42b325981e8ec9c51086a8465575cb65078570' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:58:53 [6.82ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7eb14ac2064427d8d98898d79a851b3a1681849b4b42b325981e8ec9c51086a8465575cb65078570';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:59:06 [1.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:59:06 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:59:06 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:59:06 [11.14ms] */
update `userprofiles` set `login_count` = 6095, `last_login` = '2025-03-15 18:59:06', `userprofiles`.`updated_at` = '2025-03-15 18:59:06' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:59:06 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:59:06 [0.72ms] */
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-03-15 18:59:06 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:59:06 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:59:06 [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-03-15 18:59:06 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:59:06 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:59:06 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:59:06 [4.98ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ff012b08eda3c76fd39e7a31e46e28132a4ca1e90f7fb38f67421c36abf0dc9fe9dc7e41dd5ba892', 149, 5, '[]', 0, '2025-03-15 18:59:06', '2025-03-15 18:59:06', '2026-03-15 18:59:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:59:06 [0.4ms] */
select * from `oauth_access_tokens` where `id` = 'ff012b08eda3c76fd39e7a31e46e28132a4ca1e90f7fb38f67421c36abf0dc9fe9dc7e41dd5ba892' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:59:06 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ff012b08eda3c76fd39e7a31e46e28132a4ca1e90f7fb38f67421c36abf0dc9fe9dc7e41dd5ba892';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:59:12 [1.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:59:12 [0.15ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:59:12 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:59:12 [5.9ms] */
update `userprofiles` set `login_count` = 6096, `last_login` = '2025-03-15 18:59:12', `userprofiles`.`updated_at` = '2025-03-15 18:59:12' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:59:12 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:59:12 [0.49ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 18:59:12 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:59:12 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:59:12 [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-03-15 18:59:12 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:59:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:59:12 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:59:12 [3.34ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06', 149, 5, '[]', 0, '2025-03-15 18:59:12', '2025-03-15 18:59:12', '2026-03-15 18:59:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:59:12 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:59:12 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 18:59:13 [1.49ms] */
select * from `oauth_access_tokens` where `id` = 'ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 18:59:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 18:59:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 18:59:13 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-15 18:59:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ba3ee90dd5e4bbd7502212492e3b620e0dd6c79bdadf62f86372917662f8e1bc911e848a7a048c06' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 18:59:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 18:59:13 [1.1ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-15 18:59:13 [0.24ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 18:59:13 [0.26ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 18:59:13 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:59:23 [1.92ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:59:23 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:59:23 [0.57ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:59:23 [11.46ms] */
update `userprofiles` set `login_count` = 6097, `last_login` = '2025-03-15 18:59:23', `userprofiles`.`updated_at` = '2025-03-15 18:59:23' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:59:23 [0.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:59:23 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 18:59:23 [0.32ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:59:23 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:59:23 [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-03-15 18:59:23 [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-03-15 18:59:23 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:59:23 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:59:23 [3.68ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11', 149, 5, '[]', 0, '2025-03-15 18:59:23', '2025-03-15 18:59:23', '2026-03-15 18:59:23');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:59:23 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:59:23 [3.44ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 18:59:25 [1.47ms] */
select * from `oauth_access_tokens` where `id` = 'cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 18:59:25 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 18:59:25 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 18:59:25 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-15 18:59:25 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'cec394e6bdcc9af987bdb6b38d69396b37994b926d4f365b0eea01326314378b85989aa911657e11' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 18:59:25 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 18:59:25 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-15 18:59:25 [0.15ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 18:59:25 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 18:59:25 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:59:41 [2.09ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 18:59:41 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 18:59:41 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 18:59:41 [12.29ms] */
update `userprofiles` set `login_count` = 6098, `last_login` = '2025-03-15 18:59:41', `userprofiles`.`updated_at` = '2025-03-15 18:59:41' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:59:41 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 18:59:41 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 18:59:41 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 18:59:41 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:59:41 [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-03-15 18:59:41 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:59:41 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:59:41 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:59:41 [3.26ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd', 149, 5, '[]', 0, '2025-03-15 18:59:41', '2025-03-15 18:59:41', '2026-03-15 18:59:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:59:41 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:59:41 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 18:59:42 [1.45ms] */
select * from `oauth_access_tokens` where `id` = 'b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 18:59:42 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 18:59:42 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 18:59:42 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-15 18:59:42 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'b691c31bc203a2f07c7ad5dcc1ab73d654519a64450084b3933c2941d22f5f4d8f5f72b9891a91dd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 18:59:42 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 18:59:42 [1.36ms] */
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` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 18:59:47 [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-03-15 18:59:48 [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-03-15 18:59:48 [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-03-15 18:59:48 [11.07ms] */
update `userprofiles` set `login_count` = 1086, `last_login` = '2025-03-15 18:59:48', `userprofiles`.`updated_at` = '2025-03-15 18:59:48' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 18:59:48 [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-03-15 18:59:48 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 18:59:48 [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-03-15 18:59:48 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 18:59:48 [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-03-15 18:59:48 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 18:59:48 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 18:59:48 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 18:59:48 [3.41ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883', 154, 5, '[]', 0, '2025-03-15 18:59:48', '2025-03-15 18:59:48', '2026-03-15 18:59:48');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 18:59:48 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 18:59:48 [4.32ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 18:59:48 [1.47ms] */
select * from `oauth_access_tokens` where `id` = '12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 18:59:48 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 18:59:48 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 18:59:48 [0.17ms] */
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-03-15 18:59:48 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '12d4789e2b44c78c0c6baf14d7091a698269d7b5a123d0899d58ba4e170a410d83dfa51711759883' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 18:59:48 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 18:59:48 [0.83ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_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` = 'FU184' 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-03-15 18:59:48 [0.28ms] */
select * from `party` where `party`.`id` = 36598 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 18:59:48 [0.26ms] */
select * from `vehicle` where `id` = 75 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 18:59:48 [0.28ms] */
select * from `party_vehicle` where `vehicle_id` = 75 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-03-15 19:00:00 [1.6ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 19:00:00 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 19:00:00 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 19:00:00 [13.81ms] */
update `userprofiles` set `login_count` = 6099, `last_login` = '2025-03-15 19:00:00', `userprofiles`.`updated_at` = '2025-03-15 19:00:00' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 19:00:00 [0.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 19:00:00 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 19:00:00 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 19:00:00 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 19:00:00 [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-03-15 19:00:00 [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-03-15 19:00:00 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 19:00:00 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 19:00:00 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880', 149, 5, '[]', 0, '2025-03-15 19:00:00', '2025-03-15 19:00:00', '2026-03-15 19:00:00');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 19:00:00 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 19:00:00 [3.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-15 19:00:01 [2.27ms] */
select * from `oauth_access_tokens` where `id` = '3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-15 19:00:01 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-15 19:00:01 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-15 19:00:01 [0.24ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-15 19:00:01 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '3aa8c762189c1d731d99548e5780c00c92f8ef4216ba3b7e47eb599ccde79d93104c87473d573880' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-15 19:00:01 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-15 19:00:01 [81.55ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 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, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-15 19:00:01 [1.36ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 19:03:49 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 19:03:49 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 19:03:50 [0.63ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 19:03:50 [11.67ms] */
update `userprofiles` set `login_count` = 6100, `last_login` = '2025-03-15 19:03:50', `userprofiles`.`updated_at` = '2025-03-15 19:03:50' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 19:03:50 [0.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 19:03:50 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 19:03:50 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 19:03:50 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 19:03:50 [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-03-15 19:03:50 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 19:03:50 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 19:03:50 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 19:03:50 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('16f94970cccd4d4537fd6724e814e0381661e465b1e8730b5c07784612715b103d22878e096f11a1', 149, 5, '[]', 0, '2025-03-15 19:03:50', '2025-03-15 19:03:50', '2026-03-15 19:03:50');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 19:03:50 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '16f94970cccd4d4537fd6724e814e0381661e465b1e8730b5c07784612715b103d22878e096f11a1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 19:03:50 [3.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '16f94970cccd4d4537fd6724e814e0381661e465b1e8730b5c07784612715b103d22878e096f11a1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 19:03:55 [1.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 19:03:55 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 19:03:55 [0.45ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 19:03:55 [11.07ms] */
update `userprofiles` set `login_count` = 6101, `last_login` = '2025-03-15 19:03:55', `userprofiles`.`updated_at` = '2025-03-15 19:03:55' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 19:03:55 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 19:03:55 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 19:03:55 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 19:03:55 [0.28ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 19:03:55 [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-03-15 19:03:55 [0.27ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 19:03:55 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 19:03:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 19:03:55 [3.41ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346', 149, 5, '[]', 0, '2025-03-15 19:03:55', '2025-03-15 19:03:55', '2026-03-15 19:03:55');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 19:03:55 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 19:03:55 [3.38ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-15 19:03:56 [1.51ms] */
select * from `oauth_access_tokens` where `id` = '4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-15 19:03:56 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-15 19:03:56 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-15 19:03:56 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-15 19:03:56 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4ecb4dbc9ca388204741821671a0d09c367a2a4962cf41ad55ba921de4b7cd87ed2b70c21309f346' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-15 19:03:56 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-15 19:03:56 [0.37ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-15 19:03:56 [0.15ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-15 19:03:56 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-15 19:03:56 [0.31ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-15 19:04:01 [1.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-15 19:04:01 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-15 19:04:01 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-15 19:04:01 [6.28ms] */
update `userprofiles` set `login_count` = 6102, `last_login` = '2025-03-15 19:04:01', `userprofiles`.`updated_at` = '2025-03-15 19:04:01' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-15 19:04:01 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-15 19:04:01 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-15 19:04:01 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-15 19:04:01 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-15 19:04:01 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-15 19:04:01 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-15 19:04:01 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-15 19:04:01 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-15 19:04:01 [3.54ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf', 149, 5, '[]', 0, '2025-03-15 19:04:01', '2025-03-15 19:04:01', '2026-03-15 19:04:01');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-15 19:04:01 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-15 19:04:01 [2.79ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-15 19:04:02 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-15 19:04:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-15 19:04:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-15 19:04:02 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-15 19:04:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '069288e3791b98d4775de140460b3f5dcf8fc047a18889575f7541916b35796d7810049f074636cf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-15 19:04:02 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-15 19:04:02 [0.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` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
