/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 1 - 2025-05-20 08:26:32 [2.09ms] */
select * from `users` where `email` = 'admin@admin.com' and `status` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 2 - 2025-05-20 08:26:32 [0.42ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 3 - 2025-05-20 08:26:32 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 2 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 4 - 2025-05-20 08:26:32 [6.48ms] */
update `userprofiles` set `login_count` = 697, `last_login` = '2025-05-20 08:26:32', `userprofiles`.`updated_at` = '2025-05-20 08:26:32' where `id` = 2;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 5 - 2025-05-20 08:26:32 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 6 - 2025-05-20 08:26:32 [0.88ms] */
select * from `permissions`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 7 - 2025-05-20 08:26:32 [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/login
   Query 8 - 2025-05-20 08:26:32 [1.48ms] */
select `roles`.*, `role_has_permissions`.`permission_id` as `pivot_permission_id`, `role_has_permissions`.`role_id` as `pivot_role_id` from `roles` inner join `role_has_permissions` on `roles`.`id` = `role_has_permissions`.`role_id` where `role_has_permissions`.`permission_id` in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96);
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 9 - 2025-05-20 08:26:32 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 10 - 2025-05-20 08:26:32 [0.36ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 1 - 2025-05-20 08:26:32 [1.42ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 2 - 2025-05-20 08:26:32 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 3 - 2025-05-20 08:26:32 [0.35ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 4 - 2025-05-20 08:26:32 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 5 - 2025-05-20 08:26:33 [15.09ms] */
select count(*) as aggregate from `party` where `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 6 - 2025-05-20 08:26:33 [19.39ms] */
select count(*) as aggregate from `party` where `created_at` > '2025-05-20' and `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 7 - 2025-05-20 08:26:33 [27.28ms] */
select count(*) as aggregate from `vehicle` where `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 8 - 2025-05-20 08:26:33 [31.33ms] */
select count(*) as aggregate from `vehicle` where `created_at` > '2025-05-20' and `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-05-20 08:26:33 [93.91ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-19' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 10 - 2025-05-20 08:26:33 [45.82ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-19' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-05-20 08:26:33 [292.77ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-20' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-05-20 08:26:34 [1121.2ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-20' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 10:23:50 [1.68ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 10:23:57 [2.23ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 10:24:45 [2.17ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 10:25:51 [3.5ms] */
select * from `users` where `email` = 'admin@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 10:26:03 [1.68ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:05 [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-05-20 11:00:05 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:05 [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-05-20 11:00:05 [3.97ms] */
update `userprofiles` set `login_count` = 2458, `last_login` = '2025-05-20 11:00:05', `userprofiles`.`updated_at` = '2025-05-20 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:05 [0.5ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:05 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:05 [0.44ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:05 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:05 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:05 [0.29ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:05 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:05 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7', 154, 5, '[]', 0, '2025-05-20 11:00:05', '2025-05-20 11:00:05', '2026-05-20 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:05 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:05 [2.81ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:06 [1.38ms] */
select * from `oauth_access_tokens` where `id` = 'f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:06 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:06 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:06 [0.35ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:06 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'f90e970c5a1bab437d0176650df87bf43bd2685ffe85eb900b8302865cbf83c9912ef34d8c4affc7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:06 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:06 [3.68ms] */
select count(*) as aggregate from `party` where `id` = 33125;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:06 [1.6ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'BS724';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:06 [15.35ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 33125 and `license_plate` = 'BS724' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:06 [1.56ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:06 [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-05-20 11:00:06 [0.31ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-20 11:00:06 [8.94ms] */
update `userprofiles` set `login_count` = 2459, `last_login` = '2025-05-20 11:00:06', `userprofiles`.`updated_at` = '2025-05-20 11:00:06' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:06 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:06 [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-05-20 11:00:06 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:06 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:06 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:06 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:06 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:06 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:06 [3.51ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1', 154, 5, '[]', 0, '2025-05-20 11:00:06', '2025-05-20 11:00:06', '2026-05-20 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:06 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:06 [2.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:06 [1.95ms] */
select * from `oauth_access_tokens` where `id` = '94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:06 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:06 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:06 [0.21ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:06 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '94e5ffced4e04ddcf6d792287beff6052fe2922fd45246d452efd2fa69f06aa87cc220d7b7e814d1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:06 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:06 [14.06ms] */
select count(*) as aggregate from `party` where `id` = 64940;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:06 [0.39ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '5656SXYVCYHC';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:06 [1.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:07 [1.39ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:07 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:07 [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-05-20 11:00:07 [10.84ms] */
update `userprofiles` set `login_count` = 2460, `last_login` = '2025-05-20 11:00:07', `userprofiles`.`updated_at` = '2025-05-20 11:00:07' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:07 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:07 [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-05-20 11:00:07 [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-05-20 11:00:07 [0.12ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:07 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:07 [0.13ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:07 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:07 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:07 [2.91ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea', 154, 5, '[]', 0, '2025-05-20 11:00:07', '2025-05-20 11:00:07', '2026-05-20 11:00:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:07 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:07 [3.54ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:07 [1.76ms] */
select * from `oauth_access_tokens` where `id` = 'a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:07 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:07 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:07 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'a3587496c17e3e81a9dafaef3437c79077cc076a348d23d4d03d9176b689441d50ad4f9516b9c3ea' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:07 [0.29ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:07 [0.27ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC003';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:07 [0.84ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC003' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:07 [2.21ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:08 [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-05-20 11:00:08 [0.62ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-20 11:00:08 [5.92ms] */
update `userprofiles` set `login_count` = 2461, `last_login` = '2025-05-20 11:00:08', `userprofiles`.`updated_at` = '2025-05-20 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:08 [0.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:08 [0.66ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:08 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:08 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:08 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:08 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:08 [3.8ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d', 154, 5, '[]', 0, '2025-05-20 11:00:08', '2025-05-20 11:00:08', '2026-05-20 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:08 [0.42ms] */
select * from `oauth_access_tokens` where `id` = 'efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:08 [3.65ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:08 [6.87ms] */
select * from `oauth_access_tokens` where `id` = 'efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:08 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:08 [0.36ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:08 [5.06ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:08 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'efccb16a13cb9e97cab44393e3bd662fb307e5a52bf15400db2a60fc61d9ee653e04c761cf70f20d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:08 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:08 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:08 [0.77ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC002';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:08 [5.76ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:09 [1.42ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:09 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:09 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-20 11:00:09 [6.76ms] */
update `userprofiles` set `login_count` = 2462, `last_login` = '2025-05-20 11:00:09', `userprofiles`.`updated_at` = '2025-05-20 11:00:09' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:09 [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-05-20 11:00:09 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:09 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:09 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:09 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:09 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:09 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:09 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:09 [3.66ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682', 154, 5, '[]', 0, '2025-05-20 11:00:09', '2025-05-20 11:00:09', '2026-05-20 11:00:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:09 [0.58ms] */
select * from `oauth_access_tokens` where `id` = 'cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:09 [3.12ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:09 [2ms] */
select * from `oauth_access_tokens` where `id` = 'cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:09 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:09 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:09 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:09 [0.19ms] */
select * from `oauth_access_tokens` where `id` = 'cbdb66267a4020a722824ee3a342e32437292be5abd671e4543b768113e743c6cf49e6c69577a682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:09 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:09 [1.12ms] */
select count(*) as aggregate from `party` where `id` = 639;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:09 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'RTA009';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:09 [3.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` = 639 and `license_plate` = 'RTA009' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:10 [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-05-20 11:00:10 [0.34ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:10 [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-05-20 11:00:10 [10.37ms] */
update `userprofiles` set `login_count` = 2463, `last_login` = '2025-05-20 11:00:10', `userprofiles`.`updated_at` = '2025-05-20 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:10 [0.27ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:10 [0.63ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:10 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:10 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:10 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:10 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:10 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790', 154, 5, '[]', 0, '2025-05-20 11:00:10', '2025-05-20 11:00:10', '2026-05-20 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:10 [0.58ms] */
select * from `oauth_access_tokens` where `id` = '6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:10 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:10 [1.66ms] */
select * from `oauth_access_tokens` where `id` = '6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:10 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:10 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:10 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6466bd15fff646842dfac8317b4930a997ba1b900e4e2b285b43f6f4129193540fc5a67fec76f790' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:10 [0.15ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:10 [0.3ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC005';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:11 [4.22ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:11 [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-05-20 11:00:11 [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-05-20 11:00:11 [5.76ms] */
update `userprofiles` set `login_count` = 2464, `last_login` = '2025-05-20 11:00:11', `userprofiles`.`updated_at` = '2025-05-20 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:11 [0.27ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:11 [0.63ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:11 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:11 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:11 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:11 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:11 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:11 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:11 [3.1ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5', 154, 5, '[]', 0, '2025-05-20 11:00:11', '2025-05-20 11:00:11', '2026-05-20 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:11 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:11 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:11 [1.51ms] */
select * from `oauth_access_tokens` where `id` = '310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:11 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:11 [0.21ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:11 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '310cb90ff9f1922702cff91e41339c4746d4ad32a73916cff8b1bd1b6d8f6f52218f02bbc098c2c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:11 [0.3ms] */
select count(*) as aggregate from `party` where `id` = 36578;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:11 [0.23ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'AA584';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:11 [1.11ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 36578 and `license_plate` = 'AA584' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:12 [1.63ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:12 [0.35ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:12 [0.59ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-20 11:00:12 [3.34ms] */
update `userprofiles` set `login_count` = 2465, `last_login` = '2025-05-20 11:00:12', `userprofiles`.`updated_at` = '2025-05-20 11:00:12' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:12 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:12 [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-05-20 11:00:12 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:12 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:12 [0.14ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:12 [0.17ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:12 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:12 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:12 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96', 154, 5, '[]', 0, '2025-05-20 11:00:12', '2025-05-20 11:00:12', '2026-05-20 11:00:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:12 [0.87ms] */
select * from `oauth_access_tokens` where `id` = '9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:12 [2.89ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:12 [1.38ms] */
select * from `oauth_access_tokens` where `id` = '9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:12 [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-05-20 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9ffd91692d0f9436ec46a2d5d23380eba1cb2893f3fc0414dfe071267714be1966aaf4ad37694c96' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:12 [0.15ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:12 [0.27ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC1253RTA001';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:12 [0.82ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC1253RTA001' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:13 [1.44ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00: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/login
   Query 3 - 2025-05-20 11:00:13 [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-05-20 11:00:13 [5.69ms] */
update `userprofiles` set `login_count` = 2466, `last_login` = '2025-05-20 11:00:13', `userprofiles`.`updated_at` = '2025-05-20 11:00:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:13 [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-05-20 11:00:13 [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-05-20 11:00:13 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00: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-05-20 11:00:13 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:13 [0.25ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:13 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:13 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:13 [2.9ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf', 154, 5, '[]', 0, '2025-05-20 11:00:13', '2025-05-20 11:00:13', '2026-05-20 11:00:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:13 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:13 [2.72ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:13 [2.27ms] */
select * from `oauth_access_tokens` where `id` = '1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:13 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:13 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:13 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-20 11:00:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '1d3a6acf77cdeba1bc98d6c5117af30378732d79de1fe4a5579d76e193cfb513bf807f5978c6b6bf' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:13 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 54700;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:13 [0.27ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YP073';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:13 [1.29ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 54700 and `license_plate` = 'YP073' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:13 [1.41ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 11:00:14 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00:14 [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-05-20 11:00:14 [14.12ms] */
update `userprofiles` set `login_count` = 2467, `last_login` = '2025-05-20 11:00:14', `userprofiles`.`updated_at` = '2025-05-20 11:00:14' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:14 [1.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:14 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 11:00:14 [6.92ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:14 [4.4ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:14 [3.89ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:14 [3.54ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 11:00:14 [3.06ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:14 [7.81ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:14 [11.43ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9', 154, 5, '[]', 0, '2025-05-20 11:00:14', '2025-05-20 11:00:14', '2026-05-20 11:00:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:14 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:14 [2.77ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:14 [1.47ms] */
select * from `oauth_access_tokens` where `id` = '559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:14 [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-05-20 11:00:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '559987cb076140f1014d318b304110882c734d822d65e998f0ac9f2ae71b9b8fc975d46b4a0234e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:14 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 99460;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 11:00:14 [3.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-05-20 11:00:14 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 11:00: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-05-20 11:00:14 [3.54ms] */
update `userprofiles` set `login_count` = 2468, `userprofiles`.`updated_at` = '2025-05-20 11:00:14' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 11:00:14 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 11:00:14 [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-05-20 11:00:14 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 11:00:14 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 11:00:14 [0.16ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 11:00:14 [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-05-20 11:00:14 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 11:00:14 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 11:00:14 [3.59ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c', 154, 5, '[]', 0, '2025-05-20 11:00:14', '2025-05-20 11:00:14', '2026-05-20 11:00:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 11:00:14 [0.91ms] */
select * from `oauth_access_tokens` where `id` = '4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 11:00:14 [2.77ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-20 11:00:14 [1.53ms] */
select * from `oauth_access_tokens` where `id` = '4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-20 11:00:14 [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-05-20 11:00:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4c2f5c493ed1e7d027ba0e9d87390b843465f9dca4a544429dd9076e76ed5dc06c767616992e7f7c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-20 11:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-20 11:00:14 [0.53ms] */
select count(*) as aggregate from `party` where `id` = 59307;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-20 11:00:14 [0.57ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'IF124';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-20 11:00:14 [5.63ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 59307 and `license_plate` = 'IF124' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 14:08:29 [2.81ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08:29 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 14:08:29 [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-05-20 14:08:29 [6.09ms] */
update `userprofiles` set `login_count` = 2469, `last_login` = '2025-05-20 14:08:29', `userprofiles`.`updated_at` = '2025-05-20 14:08:29' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:29 [0.44ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:29 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 14:08:29 [0.51ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:29 [0.62ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:29 [0.78ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08:29 [0.67ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 14:08:29 [0.61ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:29 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:29 [3.81ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875', 154, 5, '[]', 0, '2025-05-20 14:08:29', '2025-05-20 14:08:29', '2026-05-20 14:08:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:29 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:29 [3.29ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:29 [1.68ms] */
select * from `oauth_access_tokens` where `id` = '0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:29 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:29 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08:29 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-20 14:08:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0c4125a394ed0a62d29708c8e01ffc2656de8e9e98dfc76d29b9a4326d62c5041b1e613917ec8875' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:29 [2.03ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:29 [0.26ms] */
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-05-20 14:08:29 [0.25ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-20 14:08:29 [0.27ms] */
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-05-20 14:08:29 [1.49ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08:30 [0.35ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [6.35ms] */
update `userprofiles` set `login_count` = 2470, `last_login` = '2025-05-20 14:08:30', `userprofiles`.`updated_at` = '2025-05-20 14:08:30' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:30 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:30 [0.62ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 14:08:30 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:30 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:30 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08:30 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 14:08:30 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:30 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:30 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996', 154, 5, '[]', 0, '2025-05-20 14:08:30', '2025-05-20 14:08:30', '2026-05-20 14:08:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:30 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:30 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:30 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2907e7f2f2d4fa7259d3146d26025fabdb5939714f7767df2ccade5e7006fc9300dd14f12c7f2996' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:30 [0.8ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:30 [0.26ms] */
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-05-20 14:08:30 [0.24ms] */
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-05-20 14:08:30 [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-05-20 14:08:30 [1.44ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08:30 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [5.9ms] */
update `userprofiles` set `login_count` = 2471, `userprofiles`.`updated_at` = '2025-05-20 14:08:30' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:30 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:30 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:30 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08:30 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:30 [3.97ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb', 154, 5, '[]', 0, '2025-05-20 14:08:30', '2025-05-20 14:08:30', '2026-05-20 14:08:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:30 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:30 [3.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:30 [1.58ms] */
select * from `oauth_access_tokens` where `id` = '811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '811f3525dcaaa8f19ef3a15ac36af25d40bdd1c862097ba90e22f0cb3879b507765042c50c1b29fb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:30 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:30 [0.95ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:30 [0.72ms] */
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-05-20 14:08:30 [0.65ms] */
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-05-20 14:08:30 [0.69ms] */
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-05-20 14:08:30 [2.21ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08:30 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-20 14:08:30 [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-05-20 14:08:30 [5.86ms] */
update `userprofiles` set `login_count` = 2472, `userprofiles`.`updated_at` = '2025-05-20 14:08:30' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:30 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:30 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 14:08:30 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:30 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:30 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08:30 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-20 14:08:30 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:30 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5', 154, 5, '[]', 0, '2025-05-20 14:08:30', '2025-05-20 14:08:30', '2026-05-20 14:08:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:30 [0.51ms] */
select * from `oauth_access_tokens` where `id` = '1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:30 [3.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:31 [2.35ms] */
select * from `oauth_access_tokens` where `id` = '1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:31 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:31 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08:31 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-20 14:08:31 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '1999831ede36c0d52d4054c73c50f6b35283e9fb0fc3067d8179a5354595da8dfad6d84c592897a5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:31 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:31 [0.77ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:31 [0.28ms] */
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-05-20 14:08:31 [0.26ms] */
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-05-20 14:08:31 [0.3ms] */
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-05-20 14:08:31 [1.59ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08:31 [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-05-20 14:08:31 [0.59ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-20 14:08:31 [6.28ms] */
update `userprofiles` set `login_count` = 2473, `last_login` = '2025-05-20 14:08:31', `userprofiles`.`updated_at` = '2025-05-20 14:08:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:31 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:31 [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-05-20 14:08:31 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08: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-05-20 14:08:31 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08:31 [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-05-20 14:08:31 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:31 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:31 [3.53ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93', 154, 5, '[]', 0, '2025-05-20 14:08:31', '2025-05-20 14:08:31', '2026-05-20 14:08:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:31 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:31 [3.07ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:31 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08: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/vehicle
   Query 5 - 2025-05-20 14:08:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '873331a58bc810c5a631c2bcc7a8da004b3f634844e815df66e4af9dae1663486867cc4e3c239c93' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:31 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:31 [0.88ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 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-05-20 14:08:31 [0.63ms] */
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-05-20 14:08:31 [0.7ms] */
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-05-20 14:08:31 [0.86ms] */
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-05-20 14:08:31 [1.47ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08: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-05-20 14:08:31 [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-05-20 14:08:31 [5.84ms] */
update `userprofiles` set `login_count` = 2474, `userprofiles`.`updated_at` = '2025-05-20 14:08:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08: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 6 - 2025-05-20 14:08: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-05-20 14:08:31 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:31 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:31 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08: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-05-20 14:08:31 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:31 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:31 [3.38ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693', 154, 5, '[]', 0, '2025-05-20 14:08:31', '2025-05-20 14:08:31', '2026-05-20 14:08:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:31 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:31 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:31 [1.45ms] */
select * from `oauth_access_tokens` where `id` = '2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:31 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08: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/vehicle
   Query 5 - 2025-05-20 14:08:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2271b1c06d0e9c7ee32894b3392df7f3012df8a4c286d6f8a485ab74902b10a1e2e4376ed350d693' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:31 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:31 [0.86ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:31 [0.23ms] */
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-05-20 14:08:31 [0.24ms] */
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-05-20 14:08:31 [0.26ms] */
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-05-20 14:08:31 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-20 14:08: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-05-20 14:08:31 [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-05-20 14:08:31 [3.46ms] */
update `userprofiles` set `login_count` = 2475, `userprofiles`.`updated_at` = '2025-05-20 14:08:31' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-20 14:08:31 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-20 14:08:31 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-20 14:08:31 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-20 14:08:31 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-20 14:08:31 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-20 14:08: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-05-20 14:08:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-20 14:08:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-20 14:08:31 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f', 154, 5, '[]', 0, '2025-05-20 14:08:31', '2025-05-20 14:08:31', '2026-05-20 14:08:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-20 14:08:31 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-20 14:08:31 [2.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-20 14:08:32 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-20 14:08:32 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-20 14:08:32 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-20 14:08:32 [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-05-20 14:08:32 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '46d83d730397cceb52baddc5999aae17fb445ad9b7346546c9a75b06ec2c38562e76c6d0f2c6d65f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-20 14:08:32 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-20 14:08:32 [0.74ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '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-05-20 14:08:32 [0.28ms] */
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-05-20 14:08:32 [0.23ms] */
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-05-20 14:08:32 [0.27ms] */
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-05-20 17:27:59 [2.72ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:28:12 [2.45ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:28:23 [2.46ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:29:29 [2.81ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:29:44 [2.46ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:36:19 [2.87ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:36:48 [1.46ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:37:38 [2.27ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:38:08 [1.83ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:38:37 [2.37ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-20 17:40:08 [2.18ms] */
select * from `users` where `email` = 'cabdiqadir.maxamed@putlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
