select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:40:26 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:40:26 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:40:26 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:40:26 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:40:26 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:40:26 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:40:26 [3.67ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5', 149, 5, '[]', 0, '2025-03-17 14:40:26', '2025-03-17 14:40:26', '2026-03-17 14:40:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:40:26 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:40:26 [3.4ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:40:27 [2.3ms] */
select * from `oauth_access_tokens` where `id` = '793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:40:27 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:40:27 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:40:27 [0.28ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:40:27 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '793a29b36ce2d2ae7b185c87d959c09073c4b418f32deb60d3b62f119025e971dc57ea47a901d6d5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:40:27 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:40:27 [0.52ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:41:35 [2.44ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:41:35 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:41:35 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:41:35 [3.14ms] */
update `userprofiles` set `login_count` = 6270, `last_login` = '2025-03-17 14:41:35', `userprofiles`.`updated_at` = '2025-03-17 14:41:35' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:41:35 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:41:35 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:41:35 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:41:35 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:41:35 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:41:35 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:41:35 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:41:35 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:41:35 [3.79ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('efe02625973e58a33dc30d8562c21ec385dceec9dab0b677f3296e3b7b6a6c61a25f429db48b546a', 149, 5, '[]', 0, '2025-03-17 14:41:35', '2025-03-17 14:41:35', '2026-03-17 14:41:35');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:41:35 [0.39ms] */
select * from `oauth_access_tokens` where `id` = 'efe02625973e58a33dc30d8562c21ec385dceec9dab0b677f3296e3b7b6a6c61a25f429db48b546a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:41:35 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'efe02625973e58a33dc30d8562c21ec385dceec9dab0b677f3296e3b7b6a6c61a25f429db48b546a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:41:44 [1.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:41:44 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:41:44 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:41:44 [6.51ms] */
update `userprofiles` set `login_count` = 6271, `last_login` = '2025-03-17 14:41:44', `userprofiles`.`updated_at` = '2025-03-17 14:41:44' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:41:44 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:41:44 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:41:44 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:41:44 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:41:44 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:41:44 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:41:44 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:41:44 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:41:44 [3.87ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a397bca942da5666fcb3ee310a6ed9b3c7b3e09fe525e56c953b8a50c735ac64db3057e4eb5dab17', 149, 5, '[]', 0, '2025-03-17 14:41:44', '2025-03-17 14:41:44', '2026-03-17 14:41:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:41:44 [0.54ms] */
select * from `oauth_access_tokens` where `id` = 'a397bca942da5666fcb3ee310a6ed9b3c7b3e09fe525e56c953b8a50c735ac64db3057e4eb5dab17' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:41:44 [3.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a397bca942da5666fcb3ee310a6ed9b3c7b3e09fe525e56c953b8a50c735ac64db3057e4eb5dab17';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:41:57 [1.37ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:41:57 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:41:57 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:41:57 [15.2ms] */
update `userprofiles` set `login_count` = 6272, `last_login` = '2025-03-17 14:41:57', `userprofiles`.`updated_at` = '2025-03-17 14:41:57' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:41:57 [0.37ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:41:57 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:41:57 [0.31ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:41:57 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:41:57 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:41:57 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:41:57 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:41:57 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:41:57 [5.63ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a4c44aa9cacd61ed946f2f9382e357424d763faab466fbe04f99c139c65c121543529e0abc77ee1d', 149, 5, '[]', 0, '2025-03-17 14:41:57', '2025-03-17 14:41:57', '2026-03-17 14:41:57');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:41:57 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'a4c44aa9cacd61ed946f2f9382e357424d763faab466fbe04f99c139c65c121543529e0abc77ee1d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:41:57 [3.29ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a4c44aa9cacd61ed946f2f9382e357424d763faab466fbe04f99c139c65c121543529e0abc77ee1d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:42:04 [1.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:42:04 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:42:04 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:42:04 [11.85ms] */
update `userprofiles` set `login_count` = 6273, `last_login` = '2025-03-17 14:42:04', `userprofiles`.`updated_at` = '2025-03-17 14:42:04' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:42:04 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:42:04 [0.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:42:04 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:42:04 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:42:04 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:42:04 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:42:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:42:04 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:42:04 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1517fa9219890461c2f76818be8555fb93c1b4f3eff6666648564d25346fac576f92d71971ebe727', 149, 5, '[]', 0, '2025-03-17 14:42:04', '2025-03-17 14:42:04', '2026-03-17 14:42:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:42:04 [0.45ms] */
select * from `oauth_access_tokens` where `id` = '1517fa9219890461c2f76818be8555fb93c1b4f3eff6666648564d25346fac576f92d71971ebe727' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:42:04 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1517fa9219890461c2f76818be8555fb93c1b4f3eff6666648564d25346fac576f92d71971ebe727';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:42:28 [2.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:42:28 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:42:28 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:42:28 [5.71ms] */
update `userprofiles` set `login_count` = 6274, `last_login` = '2025-03-17 14:42:28', `userprofiles`.`updated_at` = '2025-03-17 14:42:28' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:42:28 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:42:28 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:42:28 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:42:28 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:42:28 [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-03-17 14:42:28 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:42:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:42:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:42:28 [3.15ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a8c8d3cd160cd25e30f54f38ce0777ce4ab761692a6f080527b112cd36d75165d61314bc211d9319', 149, 5, '[]', 0, '2025-03-17 14:42:28', '2025-03-17 14:42:28', '2026-03-17 14:42:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:42:28 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'a8c8d3cd160cd25e30f54f38ce0777ce4ab761692a6f080527b112cd36d75165d61314bc211d9319' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:42:28 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a8c8d3cd160cd25e30f54f38ce0777ce4ab761692a6f080527b112cd36d75165d61314bc211d9319';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:42:46 [2.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:42:46 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:42:46 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:42:46 [13.97ms] */
update `userprofiles` set `login_count` = 6275, `last_login` = '2025-03-17 14:42:46', `userprofiles`.`updated_at` = '2025-03-17 14:42:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:42:46 [0.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:42:46 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:42:46 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:42:46 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:42:46 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:42:46 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:42:46 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:42:46 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:42:46 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4679e406e9fd250cbf3e7ea67683832547f7fc32cd05ce1214937faaa1af4c3266f437c5421b3650', 149, 5, '[]', 0, '2025-03-17 14:42:46', '2025-03-17 14:42:46', '2026-03-17 14:42:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:42:46 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '4679e406e9fd250cbf3e7ea67683832547f7fc32cd05ce1214937faaa1af4c3266f437c5421b3650' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:42:46 [3.25ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4679e406e9fd250cbf3e7ea67683832547f7fc32cd05ce1214937faaa1af4c3266f437c5421b3650';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:43:03 [2.28ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:43:03 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:43:03 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:43:03 [11.41ms] */
update `userprofiles` set `login_count` = 6276, `last_login` = '2025-03-17 14:43:03', `userprofiles`.`updated_at` = '2025-03-17 14:43:03' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:43:03 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:43:03 [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-03-17 14:43:03 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:43:03 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:43:03 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:43:03 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:43:03 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:43:03 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:43:03 [5.01ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5d1ef09653337fcdb3392732df66e9f7ae5e125503ccd8292ec10db8bb326d8044dfe8bfb00e1315', 149, 5, '[]', 0, '2025-03-17 14:43:03', '2025-03-17 14:43:03', '2026-03-17 14:43:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:43:03 [0.54ms] */
select * from `oauth_access_tokens` where `id` = '5d1ef09653337fcdb3392732df66e9f7ae5e125503ccd8292ec10db8bb326d8044dfe8bfb00e1315' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:43:03 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5d1ef09653337fcdb3392732df66e9f7ae5e125503ccd8292ec10db8bb326d8044dfe8bfb00e1315';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:43:10 [1.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:43:11 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:43:11 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:43:11 [6.17ms] */
update `userprofiles` set `login_count` = 6277, `last_login` = '2025-03-17 14:43:11', `userprofiles`.`updated_at` = '2025-03-17 14:43:11' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:43:11 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:43:11 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:43:11 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:43:11 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:43:11 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:43:11 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:43:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:43:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:43:11 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7d81b78b37a7550090f95b1ad2f1b383014020c09387ed783747b62586deb2226794fc0972ddd3cb', 149, 5, '[]', 0, '2025-03-17 14:43:11', '2025-03-17 14:43:11', '2026-03-17 14:43:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:43:11 [0.58ms] */
select * from `oauth_access_tokens` where `id` = '7d81b78b37a7550090f95b1ad2f1b383014020c09387ed783747b62586deb2226794fc0972ddd3cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:43:11 [3.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7d81b78b37a7550090f95b1ad2f1b383014020c09387ed783747b62586deb2226794fc0972ddd3cb';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:48:40 [1.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:48:40 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:48:40 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:48:40 [6.15ms] */
update `userprofiles` set `login_count` = 6278, `last_login` = '2025-03-17 14:48:40', `userprofiles`.`updated_at` = '2025-03-17 14:48:40' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:48:40 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:48:40 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:48:40 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:48:40 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:48:40 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:48:40 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:48:40 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:48:40 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:48:40 [3.43ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('50c8eaea55dbc84b0d28566f8e53feb55b9f5e2216130b15c9157d0a571c4d72f7cd37b673fc9183', 149, 5, '[]', 0, '2025-03-17 14:48:40', '2025-03-17 14:48:40', '2026-03-17 14:48:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:48:40 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '50c8eaea55dbc84b0d28566f8e53feb55b9f5e2216130b15c9157d0a571c4d72f7cd37b673fc9183' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:48:40 [2.86ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '50c8eaea55dbc84b0d28566f8e53feb55b9f5e2216130b15c9157d0a571c4d72f7cd37b673fc9183';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:49:50 [2.37ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:49:50 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:49:50 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:49:50 [3.54ms] */
update `userprofiles` set `login_count` = 6279, `last_login` = '2025-03-17 14:49:50', `userprofiles`.`updated_at` = '2025-03-17 14:49:50' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:49:50 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:49:50 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:49:50 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:49:50 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:49:50 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:49:50 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:49:50 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:49:50 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:49:50 [3.7ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4c2a4ad5ebf439237daaf46035bfd47254c25073967a995628c4395f27fbdc2c432177dadb2d0d5a', 149, 5, '[]', 0, '2025-03-17 14:49:50', '2025-03-17 14:49:50', '2026-03-17 14:49:50');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:49:50 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '4c2a4ad5ebf439237daaf46035bfd47254c25073967a995628c4395f27fbdc2c432177dadb2d0d5a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:49:50 [3.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4c2a4ad5ebf439237daaf46035bfd47254c25073967a995628c4395f27fbdc2c432177dadb2d0d5a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:53:07 [2.37ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:53:07 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:53:07 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:53:07 [6.02ms] */
update `userprofiles` set `login_count` = 6280, `last_login` = '2025-03-17 14:53:07', `userprofiles`.`updated_at` = '2025-03-17 14:53:07' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:53:07 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:53: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-03-17 14:53:07 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:53:07 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:53:07 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:53:07 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:53:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:53:07 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:53:07 [3.35ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('de10c9cc16e36b2af5e08b96416f30e92e417d92ad7bf9aaad65f39dc0697f4558bf1efe7d179a1d', 149, 5, '[]', 0, '2025-03-17 14:53:07', '2025-03-17 14:53:07', '2026-03-17 14:53:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:53:07 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'de10c9cc16e36b2af5e08b96416f30e92e417d92ad7bf9aaad65f39dc0697f4558bf1efe7d179a1d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:53:07 [5.46ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'de10c9cc16e36b2af5e08b96416f30e92e417d92ad7bf9aaad65f39dc0697f4558bf1efe7d179a1d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:53:45 [2.19ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:53:45 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:53:45 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:53:45 [5.88ms] */
update `userprofiles` set `login_count` = 6281, `last_login` = '2025-03-17 14:53:45', `userprofiles`.`updated_at` = '2025-03-17 14:53:45' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:53:45 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:53:45 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:53:45 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:53:45 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:53:45 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:53:45 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:53:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:53:45 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:53:45 [3ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('af4e661245647c0d252231b6004a6dfce953e79210840a96482df9390efc97ad66513a661b58178a', 149, 5, '[]', 0, '2025-03-17 14:53:45', '2025-03-17 14:53:45', '2026-03-17 14:53:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:53:45 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'af4e661245647c0d252231b6004a6dfce953e79210840a96482df9390efc97ad66513a661b58178a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:53:45 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'af4e661245647c0d252231b6004a6dfce953e79210840a96482df9390efc97ad66513a661b58178a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:55:18 [2.1ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:55:18 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:55:18 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:55:18 [12.59ms] */
update `userprofiles` set `login_count` = 6282, `last_login` = '2025-03-17 14:55:18', `userprofiles`.`updated_at` = '2025-03-17 14:55:18' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:55:18 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:55:18 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:55:18 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:55:18 [0.33ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:55:18 [0.29ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:55:18 [0.28ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:55:18 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:55:18 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:55:18 [4.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1', 149, 5, '[]', 0, '2025-03-17 14:55:18', '2025-03-17 14:55:18', '2026-03-17 14:55:18');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:55:18 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'd9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:55:18 [3.07ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:55:19 [1.54ms] */
select * from `oauth_access_tokens` where `id` = 'd9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:55:19 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:55:19 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:55:19 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:55:19 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd9081c447c7a1ff64272b2a2053206d86d9087bea05de73ab034ea31fcda848c140ae0f7d32df8b1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:55:19 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:55:19 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:55:52 [2.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:55:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:55:53 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:55:53 [11.05ms] */
update `userprofiles` set `login_count` = 6283, `last_login` = '2025-03-17 14:55:53', `userprofiles`.`updated_at` = '2025-03-17 14:55:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:55:53 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:55:53 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:55:53 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:55:53 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:55:53 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:55:53 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:55:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:55:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:55:53 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74', 149, 5, '[]', 0, '2025-03-17 14:55:53', '2025-03-17 14:55:53', '2026-03-17 14:55:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:55:53 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:55:53 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 14:55:53 [2.33ms] */
select * from `oauth_access_tokens` where `id` = '6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 14:55:53 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 14:55:53 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 14:55:53 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 14:55:53 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6b8b5aacf1df97c15bac711b4f12f7e96db1614ea9c931a3f94a801badd24601bf22e89b84c26d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 14:55:53 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 14:55:53 [0.58ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 14:55:53 [0.28ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 14:55:53 [0.14ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 14:55:53 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:56:28 [2.23ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:56:28 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:56:28 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:56:28 [3.1ms] */
update `userprofiles` set `login_count` = 6284, `last_login` = '2025-03-17 14:56:28', `userprofiles`.`updated_at` = '2025-03-17 14:56:28' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:56:28 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:56:28 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:56:28 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:56:28 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:56:28 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:56:28 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:56:28 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:56:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:56:28 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a', 149, 5, '[]', 0, '2025-03-17 14:56:28', '2025-03-17 14:56:28', '2026-03-17 14:56:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:56:28 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:56:28 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 14:56:29 [2.3ms] */
select * from `oauth_access_tokens` where `id` = '45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 14:56:29 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 14:56:29 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 14:56:29 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 14:56:29 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '45cf8e57773f975cfea713a74230eb1eb0edfbe5f4f4df001b7e2de4651b20ee7e5341908598737a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 14:56:29 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 14:56:29 [0.5ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 14:56:29 [0.23ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 14:56:29 [0.23ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 14:56:29 [0.24ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:56:52 [2.29ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:56:52 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:56:52 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:56:52 [11.87ms] */
update `userprofiles` set `login_count` = 6285, `last_login` = '2025-03-17 14:56:52', `userprofiles`.`updated_at` = '2025-03-17 14:56:52' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:56:52 [0.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:56:52 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:56:52 [0.33ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:56:52 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:56:52 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:56:52 [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-03-17 14:56:53 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:56:53 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:56:53 [3.15ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7', 149, 5, '[]', 0, '2025-03-17 14:56:53', '2025-03-17 14:56:53', '2026-03-17 14:56:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:56:53 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'd44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:56:53 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 14:56:54 [2.6ms] */
select * from `oauth_access_tokens` where `id` = 'd44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 14:56:54 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'd44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 14:56:54 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 14:56:54 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 14:56:54 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd44c96ddefa3ec7b1126053fde0b0a73c7b6ee071f3162cb71bca5ed1b7e0686a839425a0c7b69f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 14:56:54 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 14:56:54 [0.32ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 14:56:54 [0.15ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 14:56:54 [0.15ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 14:56:54 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:58:01 [2.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:58:01 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:58:01 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:58:01 [6.07ms] */
update `userprofiles` set `login_count` = 6286, `last_login` = '2025-03-17 14:58:01', `userprofiles`.`updated_at` = '2025-03-17 14:58:01' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:58:01 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:58:01 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:58:01 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:58:01 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:58:01 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:58:01 [0.24ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:58:01 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:58:01 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:58:01 [3.27ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b', 149, 5, '[]', 0, '2025-03-17 14:58:01', '2025-03-17 14:58:01', '2026-03-17 14:58:01');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:58:01 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:58:01 [2.78ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:58:02 [2.56ms] */
select * from `oauth_access_tokens` where `id` = '92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:58:02 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:58:02 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:58:02 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:58:02 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '92661aabc7b6aa17424351c98ab7bab9ac58170f7fa19c91c28c45686db7c5ef6b0f732eb013e91b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:58:02 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:58:02 [0.48ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:58:26 [2.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:58:26 [0.29ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:58:26 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:58:26 [2.99ms] */
update `userprofiles` set `login_count` = 6287, `last_login` = '2025-03-17 14:58:26', `userprofiles`.`updated_at` = '2025-03-17 14:58:26' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:58:26 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:58:26 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:58:26 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:58:26 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:58:26 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:58:26 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:58:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:58:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:58:26 [3.08ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f', 149, 5, '[]', 0, '2025-03-17 14:58:26', '2025-03-17 14:58:26', '2026-03-17 14:58:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:58:26 [0.42ms] */
select * from `oauth_access_tokens` where `id` = 'aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:58:26 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:58:27 [2.61ms] */
select * from `oauth_access_tokens` where `id` = 'aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:58:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:58:27 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:58:27 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:58:27 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'aba13ac7b92d3201255d1d18cd05ef2b355837ffc5f4391140865af65a397bb5edf541a4cc90396f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:58:27 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:58:27 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:58:38 [2.03ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:58:38 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:58:38 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:58:39 [5.92ms] */
update `userprofiles` set `login_count` = 6288, `last_login` = '2025-03-17 14:58:38', `userprofiles`.`updated_at` = '2025-03-17 14:58:38' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:58:39 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:58:39 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:58:39 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:58:39 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:58:39 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:58:39 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:58:39 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:58:39 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:58:39 [3.13ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e', 149, 5, '[]', 0, '2025-03-17 14:58:39', '2025-03-17 14:58:39', '2026-03-17 14:58:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:58:39 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:58:39 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:58:39 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:58:39 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:58:39 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:58:39 [0.36ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:58:39 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '17f8f4dc302dde61d79d9920f57d000359e0a09f413c7797f4a5bcbded65f07826f3db2cc8a4039e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:58:39 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:58:39 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:58:55 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:58:56 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:58:56 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:58:56 [3.24ms] */
update `userprofiles` set `login_count` = 6289, `last_login` = '2025-03-17 14:58:56', `userprofiles`.`updated_at` = '2025-03-17 14:58:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:58:56 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:58:56 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:58:56 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:58:56 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:58:56 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:58:56 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:58:56 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:58:56 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:58:56 [3.41ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7', 149, 5, '[]', 0, '2025-03-17 14:58:56', '2025-03-17 14:58:56', '2026-03-17 14:58:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:58:56 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:58:56 [6.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:58:56 [2.33ms] */
select * from `oauth_access_tokens` where `id` = '282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:58:56 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:58:56 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:58:56 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:58:56 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '282a6b1a5998abb5abff1d4191864420b8c2c5dd54dc685e792a82d1b055e65b3ae6b0cb8422a0c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:58:56 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:58:56 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:59:11 [2.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:59:11 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:59:11 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:59:11 [3.14ms] */
update `userprofiles` set `login_count` = 6290, `last_login` = '2025-03-17 14:59:11', `userprofiles`.`updated_at` = '2025-03-17 14:59:11' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:59:11 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:59:11 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:59:11 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:59:11 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:59:11 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:59:11 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:59:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:59:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:59:11 [3.46ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608', 149, 5, '[]', 0, '2025-03-17 14:59:11', '2025-03-17 14:59:11', '2026-03-17 14:59:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:59:11 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:59:11 [3ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:59:11 [2.18ms] */
select * from `oauth_access_tokens` where `id` = '30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:59:11 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:59:11 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:59:11 [0.28ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:59:11 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '30348c810508b5d34c0e3ac86b41cd9b012b387d9204c216bd3c5313bb61f58fcbdec397091f8608' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:59:11 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:59:11 [0.5ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:59:20 [2.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:59:20 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:59:20 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:59:20 [6.06ms] */
update `userprofiles` set `login_count` = 6291, `last_login` = '2025-03-17 14:59:20', `userprofiles`.`updated_at` = '2025-03-17 14:59:20' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:59:20 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:59:20 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:59:20 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:59:20 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:59:20 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:59:20 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:59:20 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:59:20 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:59:20 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d', 149, 5, '[]', 0, '2025-03-17 14:59:20', '2025-03-17 14:59:20', '2026-03-17 14:59:20');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:59:20 [0.39ms] */
select * from `oauth_access_tokens` where `id` = 'becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:59:20 [3.05ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:59:21 [2.48ms] */
select * from `oauth_access_tokens` where `id` = 'becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:59:21 [0.22ms] */
select * from `oauth_access_tokens` where `id` = 'becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:59:21 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:59:21 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:59:21 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'becec35fd6f3931079fa801ffdb934775e1baf1d8cdb722bc18b10a6a4016023794aafe80038404d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:59:21 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:59:21 [0.49ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 14:59:36 [2.01ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 14:59:36 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 14:59:36 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 14:59:36 [6.14ms] */
update `userprofiles` set `login_count` = 6292, `last_login` = '2025-03-17 14:59:36', `userprofiles`.`updated_at` = '2025-03-17 14:59:36' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 14:59:36 [0.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 14:59:36 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 14:59:36 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 14:59:36 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 14:59:36 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 14:59:36 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 14:59:36 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 14:59:36 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 14:59:36 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9', 149, 5, '[]', 0, '2025-03-17 14:59:36', '2025-03-17 14:59:36', '2026-03-17 14:59:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 14:59:36 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 14:59:36 [3.36ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 14:59:37 [2.55ms] */
select * from `oauth_access_tokens` where `id` = '93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 14:59:37 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 14:59:37 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 14:59:37 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 14:59:37 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '93590da671b4adc697a200ae798022e9fa69aa1772e07c64f1c1a2a6d5276ee90d8aeac393a6b9c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 14:59:37 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 14:59:37 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:00:03 [1.54ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:00:03 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:00:03 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:00:03 [2.61ms] */
update `userprofiles` set `login_count` = 6293, `last_login` = '2025-03-17 15:00:03', `userprofiles`.`updated_at` = '2025-03-17 15:00:03' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:00:03 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:00:03 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:00:03 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:00:03 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:00:03 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:00:03 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:00:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:00:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:00:03 [2.89ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993', 149, 5, '[]', 0, '2025-03-17 15:00:03', '2025-03-17 15:00:03', '2026-03-17 15:00:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:00:03 [0.36ms] */
select * from `oauth_access_tokens` where `id` = 'c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:00:03 [2.69ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:00:04 [1.83ms] */
select * from `oauth_access_tokens` where `id` = 'c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:00:04 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:00:04 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:00:04 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:00:04 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'c424e31b4f464e640058f630de54da84128236af725ff60896290fa6307e9308c676529f1094b993' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:00:04 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:00:04 [0.41ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:00:10 [2.01ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:00:10 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:00:10 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:00:10 [11.26ms] */
update `userprofiles` set `login_count` = 6294, `last_login` = '2025-03-17 15:00:10', `userprofiles`.`updated_at` = '2025-03-17 15:00:10' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:00:10 [0.27ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:00:10 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:00:10 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:00:10 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:00:10 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:00:10 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:00:10 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:00:10 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:00:10 [3.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468', 149, 5, '[]', 0, '2025-03-17 15:00:10', '2025-03-17 15:00:10', '2026-03-17 15:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:00:10 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:00:10 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:00:11 [2.11ms] */
select * from `oauth_access_tokens` where `id` = '5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:00:11 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:00:11 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:00:11 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:00:11 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '5cea2bac262a68cefa859634734370df61fa99032dddd9f1b78a587bf35cfb50ddad3072ee1ba468' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:00:11 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:00:11 [0.51ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:00:36 [1.62ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:00:36 [0.27ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:00:36 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:00:36 [6.64ms] */
update `userprofiles` set `login_count` = 6295, `last_login` = '2025-03-17 15:00:36', `userprofiles`.`updated_at` = '2025-03-17 15:00:36' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:00:36 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:00:36 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:00:36 [0.36ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:00:36 [0.42ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:00:36 [0.31ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:00:36 [0.44ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:00:36 [0.34ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:00:36 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:00:36 [3.36ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337', 149, 5, '[]', 0, '2025-03-17 15:00:36', '2025-03-17 15:00:36', '2026-03-17 15:00:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:00:36 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:00:36 [3.08ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:00:36 [2.19ms] */
select * from `oauth_access_tokens` where `id` = '11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:00:36 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:00:36 [0.35ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:00:36 [0.45ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:00:36 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '11d8afd9a5759c1fa7c78b2fe8f0a4c30ea4cd0abdfbaf573a475aed55257bd2d9f1fbc9577a7337' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:00:36 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:00:36 [1.41ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:00:46 [1.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:00:46 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:00:46 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:00:46 [19.18ms] */
update `userprofiles` set `login_count` = 6296, `last_login` = '2025-03-17 15:00:46', `userprofiles`.`updated_at` = '2025-03-17 15:00:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:00:46 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:00:46 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:00:46 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:00:46 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:00:46 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:00:46 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:00:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:00:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:00:46 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52', 149, 5, '[]', 0, '2025-03-17 15:00:46', '2025-03-17 15:00:46', '2026-03-17 15:00:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:00:46 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:00:46 [2.86ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:00:47 [2.43ms] */
select * from `oauth_access_tokens` where `id` = '02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:00:47 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:00:47 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:00:47 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:00:47 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '02de84dac96597ab8bc9103c346f020029cb2a797e12b034845c310e9d49173d276dcae5750f6a52' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:00:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:00:47 [0.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` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:01:23 [1.44ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:01:23 [0.3ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:01:23 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:01:23 [6.01ms] */
update `userprofiles` set `login_count` = 6297, `last_login` = '2025-03-17 15:01:23', `userprofiles`.`updated_at` = '2025-03-17 15:01:23' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:01:23 [0.29ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:01:23 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:01:23 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:01:23 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:01:23 [0.14ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:01:23 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:01:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:01:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:01:23 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46', 149, 5, '[]', 0, '2025-03-17 15:01:23', '2025-03-17 15:01:23', '2026-03-17 15:01:23');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:01:23 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:01:23 [3.12ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:01:24 [2.36ms] */
select * from `oauth_access_tokens` where `id` = '967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:01:24 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:01:24 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:01:24 [0.39ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:01:24 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '967ca6657306116fe45cbe490298b361d4ceef1a889967d7ee21ccdd51e1063b4e8fa5f9de905e46' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:01:24 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:01:24 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:01:26 [1.54ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:01:26 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:01:26 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:01:26 [3.02ms] */
update `userprofiles` set `login_count` = 6298, `last_login` = '2025-03-17 15:01:26', `userprofiles`.`updated_at` = '2025-03-17 15:01:26' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:01:26 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:01:26 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:01:26 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:01:26 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:01:26 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:01:26 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:01:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:01:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:01:26 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('79e088abc56459346825dae8088830d58024c1d9bdcda931790572480106bbff5d9615d8e18921e6', 149, 5, '[]', 0, '2025-03-17 15:01:26', '2025-03-17 15:01:26', '2026-03-17 15:01:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:01:26 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '79e088abc56459346825dae8088830d58024c1d9bdcda931790572480106bbff5d9615d8e18921e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:01:26 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '79e088abc56459346825dae8088830d58024c1d9bdcda931790572480106bbff5d9615d8e18921e6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:01:30 [1.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:01:30 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:01:30 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:01:30 [8.71ms] */
update `userprofiles` set `login_count` = 6299, `last_login` = '2025-03-17 15:01:30', `userprofiles`.`updated_at` = '2025-03-17 15:01:30' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:01:30 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:01:30 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:01:30 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:01: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-03-17 15:01:30 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:01:30 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:01:30 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:01:30 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:01:30 [3.54ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd', 149, 5, '[]', 0, '2025-03-17 15:01:30', '2025-03-17 15:01:30', '2026-03-17 15:01:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:01:30 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:01:30 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 15:01:31 [2.27ms] */
select * from `oauth_access_tokens` where `id` = '5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 15:01:31 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 15:01:31 [0.31ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 15:01:31 [0.36ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 15:01:31 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '5cf21ccf89f33e4cf04a03ac313cbce2814b7d9d0c72076127c5739b6bdecf47162820b9f875acdd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 15:01:31 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 15:01:31 [0.98ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 15:01:31 [0.25ms] */
select * from `party` where `party`.`id` = 39526 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 15:01:31 [0.34ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 15:01:31 [0.35ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:02:36 [1.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:02:36 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:02:36 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:02:36 [3.61ms] */
update `userprofiles` set `login_count` = 6300, `last_login` = '2025-03-17 15:02:36', `userprofiles`.`updated_at` = '2025-03-17 15:02:36' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:02:36 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:02:36 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:02:36 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:02:36 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:02:36 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:02:36 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:02:36 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:02:36 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:02:36 [3.23ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af', 149, 5, '[]', 0, '2025-03-17 15:02:36', '2025-03-17 15:02:36', '2026-03-17 15:02:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:02:36 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:02:36 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:02:37 [2.57ms] */
select * from `oauth_access_tokens` where `id` = '3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:02:37 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:02:37 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:02:37 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:02:37 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '3cb61e968adb943748e156be38a26a878eb59e03c50397f101231437a4af88daf747c8b8f850e6af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:02:37 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:02:37 [45.51ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:02:37 [0.33ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:02:47 [2.15ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:02:47 [0.28ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:02:47 [0.58ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:02:47 [7.02ms] */
update `userprofiles` set `login_count` = 6301, `last_login` = '2025-03-17 15:02:47', `userprofiles`.`updated_at` = '2025-03-17 15:02:47' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:02:47 [0.19ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:02:47 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:02:47 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:02:47 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:02:47 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:02:47 [0.26ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:02:47 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:02:47 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:02:47 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc', 149, 5, '[]', 0, '2025-03-17 15:02:47', '2025-03-17 15:02:47', '2026-03-17 15:02:47');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:02:47 [0.34ms] */
select * from `oauth_access_tokens` where `id` = '273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:02:47 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:02:47 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:02:47 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:02:47 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:02:47 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:02:47 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '273760905a9559f22ac042cd63054022c34faa33670d0525efcb09fc2c7674a672628289ee1feabc' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:02:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:02:47 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:02:47 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:04:22 [1.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:04:22 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:04:22 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:04:22 [18.63ms] */
update `userprofiles` set `login_count` = 6302, `last_login` = '2025-03-17 15:04:22', `userprofiles`.`updated_at` = '2025-03-17 15:04:22' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:04:22 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:04:22 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:04:22 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:04:22 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:04:22 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:04:22 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:04:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:04:22 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:04:22 [3.11ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e', 149, 5, '[]', 0, '2025-03-17 15:04:22', '2025-03-17 15:04:22', '2026-03-17 15:04:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:04:22 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:04:22 [2.75ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:04:23 [2.31ms] */
select * from `oauth_access_tokens` where `id` = 'bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:04:23 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:04:23 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:04:23 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:04:23 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'bf7e30a518259747cf86f68f98041e5b6a23a8944bce15fecc722c54cd7e9d04ba4e0e329dff938e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:04:23 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:04:23 [0.27ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:04:23 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:04:54 [2.77ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:04:54 [0.27ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:04:54 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:04:54 [20.94ms] */
update `userprofiles` set `login_count` = 6303, `last_login` = '2025-03-17 15:04:54', `userprofiles`.`updated_at` = '2025-03-17 15:04:54' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:04:54 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:04:54 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:04:54 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:04:54 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:04:54 [0.26ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:04:54 [0.27ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:04:54 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:04:54 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:04:54 [3.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5', 149, 5, '[]', 0, '2025-03-17 15:04:54', '2025-03-17 15:04:54', '2026-03-17 15:04:54');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:04:54 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:04:54 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:04:55 [1.62ms] */
select * from `oauth_access_tokens` where `id` = '61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:04:55 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:04:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:04:55 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:04:55 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '61f4de54663e5fec1503f4e5ec30e2961942c4046d7a38c76e7aeca30fc31fb035ae998f0bd62cb5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:04:55 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:04:55 [0.4ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:04:55 [0.22ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:04:59 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:04:59 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:04:59 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:04:59 [6.19ms] */
update `userprofiles` set `login_count` = 6304, `last_login` = '2025-03-17 15:04:59', `userprofiles`.`updated_at` = '2025-03-17 15:04:59' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:04:59 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:04:59 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:04:59 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:04:59 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:04:59 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:04:59 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:04:59 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:04:59 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:04:59 [5.11ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10', 149, 5, '[]', 0, '2025-03-17 15:04:59', '2025-03-17 15:04:59', '2026-03-17 15:04:59');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:04:59 [0.5ms] */
select * from `oauth_access_tokens` where `id` = '8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:04:59 [3.24ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:05:00 [2.6ms] */
select * from `oauth_access_tokens` where `id` = '8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:05:00 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:05:00 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:05:00 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:05:00 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '8ff12b73d2446798762b72a7a764ceb89bcd27083ef0ef66e1f5945d7e0d9f61312288cb2d774d10' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:05:00 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:05:00 [0.4ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:05:00 [0.21ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:05:14 [2.15ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:05:14 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:05:14 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:05:14 [6.1ms] */
update `userprofiles` set `login_count` = 6305, `last_login` = '2025-03-17 15:05:14', `userprofiles`.`updated_at` = '2025-03-17 15:05:14' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:05:14 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:05:14 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:05:14 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:05:14 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:05:14 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:05:14 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:05:14 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:05:14 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:05:14 [3.44ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9', 149, 5, '[]', 0, '2025-03-17 15:05:14', '2025-03-17 15:05:14', '2026-03-17 15:05:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:05:14 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:05:14 [2.87ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:05:15 [1.58ms] */
select * from `oauth_access_tokens` where `id` = 'bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:05:15 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:05:15 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:05:15 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:05:15 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'bb28e118714e3de15f5aeda45e5bec4022aae1cfa0a0da0da9b4afce1d2b975d5cc2304902cd84a9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:05:15 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:05:15 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:05:15 [0.16ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:05:45 [2.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:05:45 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:05:45 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:05:45 [21.32ms] */
update `userprofiles` set `login_count` = 6306, `last_login` = '2025-03-17 15:05:45', `userprofiles`.`updated_at` = '2025-03-17 15:05:45' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:05:45 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:05:45 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:05:45 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:05:45 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:05:45 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:05:45 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:05:45 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:05:45 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:05:45 [11.02ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca', 149, 5, '[]', 0, '2025-03-17 15:05:45', '2025-03-17 15:05:45', '2026-03-17 15:05:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:05:46 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:05:46 [12.45ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:05:46 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:05:46 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:05:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:05:46 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:05:46 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1d0ebcfe0f0b561fe1530d384e2b14de0daaac0b167b72fdc739b65268713aa3cd5864568918e3ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:05:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:05:46 [0.3ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:05:46 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:06:25 [2.07ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:06:25 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:06:25 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:06:25 [12.27ms] */
update `userprofiles` set `login_count` = 6307, `last_login` = '2025-03-17 15:06:25', `userprofiles`.`updated_at` = '2025-03-17 15:06:25' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:06:25 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:06:25 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:06:25 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:06:25 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:06:25 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:06:25 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:06:25 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:06:25 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:06:25 [3.3ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e', 149, 5, '[]', 0, '2025-03-17 15:06:25', '2025-03-17 15:06:25', '2026-03-17 15:06:25');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:06:25 [0.39ms] */
select * from `oauth_access_tokens` where `id` = 'ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:06:25 [2.96ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:06:26 [2.28ms] */
select * from `oauth_access_tokens` where `id` = 'ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:06:26 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:06:26 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:06:26 [0.27ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:06:26 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'ef8e852326fde5772ca04ee0641e74e19390c8d17aadfed6837ac1e0adcb0a8d931dc0b99f64051e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:06:26 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:06:26 [0.4ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:06:26 [0.24ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:06:46 [2.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:06:46 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:06:46 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:06:46 [3.99ms] */
update `userprofiles` set `login_count` = 6308, `last_login` = '2025-03-17 15:06:46', `userprofiles`.`updated_at` = '2025-03-17 15:06:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:06:46 [0.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:06:46 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:06:46 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:06:46 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:06:46 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:06:46 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:06:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:06:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:06:46 [3.24ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0', 149, 5, '[]', 0, '2025-03-17 15:06:46', '2025-03-17 15:06:46', '2026-03-17 15:06:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:06:46 [0.38ms] */
select * from `oauth_access_tokens` where `id` = 'eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:06:46 [3.08ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:06:47 [1.52ms] */
select * from `oauth_access_tokens` where `id` = 'eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:06:47 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:06:47 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:06:47 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:06:47 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eebdfb04c831edf682ca3e15628926474dac775414a565b670a15d38255ff72c841e50d96aa7e4f0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:06:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:06:47 [0.28ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:06:47 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:06:59 [2.53ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:06:59 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:06:59 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:06:59 [11.33ms] */
update `userprofiles` set `login_count` = 6309, `last_login` = '2025-03-17 15:06:59', `userprofiles`.`updated_at` = '2025-03-17 15:06:59' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:06:59 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:06:59 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:06:59 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:06:59 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:06:59 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:06:59 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:06:59 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:06:59 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:06:59 [3.65ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937', 149, 5, '[]', 0, '2025-03-17 15:06:59', '2025-03-17 15:06:59', '2026-03-17 15:06:59');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:06:59 [0.41ms] */
select * from `oauth_access_tokens` where `id` = 'bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:06:59 [2.89ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:06:59 [2.21ms] */
select * from `oauth_access_tokens` where `id` = 'bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:06:59 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:06:59 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:06:59 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:06:59 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'bf2b566f2d48979262a4333b4c8c019818dbd30c8846c868312d8139a158bcdf83170929aebaf937' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:06:59 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:06:59 [0.27ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:06:59 [0.14ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:07:21 [1.41ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:07:21 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:07:21 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:07:21 [6.39ms] */
update `userprofiles` set `login_count` = 6310, `last_login` = '2025-03-17 15:07:21', `userprofiles`.`updated_at` = '2025-03-17 15:07:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:07:21 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:07:21 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:07:21 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:07:21 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:07:21 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:07:21 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:07:21 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:07:21 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:07:21 [3.61ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22', 149, 5, '[]', 0, '2025-03-17 15:07:21', '2025-03-17 15:07:21', '2026-03-17 15:07:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:07:21 [0.44ms] */
select * from `oauth_access_tokens` where `id` = '2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:07:21 [3.55ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-03-17 15:07:22 [2.69ms] */
select * from `oauth_access_tokens` where `id` = '2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-03-17 15:07:22 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-03-17 15:07:22 [0.33ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-03-17 15:07:22 [0.34ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-03-17 15:07:22 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '2cef0121008ca79c4d568705af50e4eef94747ce4d501303dfdb8744dc862e08f7a981770462bc22' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-03-17 15:07:22 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-03-17 15:07:22 [0.49ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`status`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `roles`.`name` as `role`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`id` = 174954 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-03-17 15:07:22 [0.27ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 174954 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:09:11 [2.08ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:09:11 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:09:11 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:09:11 [6.34ms] */
update `userprofiles` set `login_count` = 6311, `last_login` = '2025-03-17 15:09:11', `userprofiles`.`updated_at` = '2025-03-17 15:09:11' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:09:11 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:09:11 [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-03-17 15:09:11 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:09:11 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:09:11 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:09:11 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:09:11 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:09:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:09:11 [4.08ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f', 149, 5, '[]', 0, '2025-03-17 15:09:11', '2025-03-17 15:09:11', '2026-03-17 15:09:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:09:11 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:09:11 [2.94ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:09:12 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:09:12 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:09:12 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:09:12 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:09:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '577efb2d616e756049340774c52e31365f01c5f56ecdfec3ca35227337a7dcd4d18b0dd0625c844f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:09:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:09:12 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:09:29 [2.15ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:09:29 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:09:29 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:09:29 [18.84ms] */
update `userprofiles` set `login_count` = 6312, `last_login` = '2025-03-17 15:09:29', `userprofiles`.`updated_at` = '2025-03-17 15:09:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:09:29 [0.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:09:29 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:09:29 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:09:29 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:09:29 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:09:29 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:09:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:09:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:09:29 [3.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df', 149, 5, '[]', 0, '2025-03-17 15:09:29', '2025-03-17 15:09:29', '2026-03-17 15:09:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:09:29 [0.45ms] */
select * from `oauth_access_tokens` where `id` = '847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:09:29 [5ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:09:30 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:09:30 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:09:30 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:09:30 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:09:30 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '847c1ff0cfc47a302c50bd5666360f20be92faf2c4d66a0caeebe4ba55e3dc23ffeb1ddcd2bfb6df' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:09:30 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:09:30 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:10:45 [2.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:10:45 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:10:45 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:10:45 [11.25ms] */
update `userprofiles` set `login_count` = 6313, `last_login` = '2025-03-17 15:10:45', `userprofiles`.`updated_at` = '2025-03-17 15:10:45' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:10:45 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:10:45 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:10:45 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:10:45 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:10:45 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:10:45 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:10:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:10:45 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:10:45 [3.12ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048', 149, 5, '[]', 0, '2025-03-17 15:10:45', '2025-03-17 15:10:45', '2026-03-17 15:10:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:10:45 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:10:45 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:10:46 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:10:46 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:10:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:10:46 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:10:46 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '62e9c739c3e43503e94125c5df1cba6037b5b9118f037650a5bebc0c2d73ad83a09853b432c96048' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:10:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:10:46 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:11:17 [2.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:11:17 [0.28ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:11:17 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:11:17 [6.75ms] */
update `userprofiles` set `login_count` = 6314, `last_login` = '2025-03-17 15:11:17', `userprofiles`.`updated_at` = '2025-03-17 15:11:17' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:11:17 [0.39ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:11:17 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:11:17 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:11:17 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:11:17 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:11:17 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:11:17 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:11:17 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:11:17 [3.62ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1', 149, 5, '[]', 0, '2025-03-17 15:11:17', '2025-03-17 15:11:17', '2026-03-17 15:11:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:11:17 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:11:17 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:11:17 [2.41ms] */
select * from `oauth_access_tokens` where `id` = 'b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:11:17 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:11:17 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:11:17 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:11:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b0b0616f4a7c8ef43c461764d5557706ab8cd4f76296e1d06f6a75d04707d81af07caa14e3947ac1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:11:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:11:17 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:11:26 [2.03ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:11:26 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:11:26 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:11:26 [10.97ms] */
update `userprofiles` set `login_count` = 6315, `last_login` = '2025-03-17 15:11:26', `userprofiles`.`updated_at` = '2025-03-17 15:11:26' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:11:26 [0.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:11:26 [0.68ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:11:26 [0.35ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:11:26 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:11:26 [0.14ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:11:26 [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-03-17 15:11:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:11:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:11:26 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75', 149, 5, '[]', 0, '2025-03-17 15:11:26', '2025-03-17 15:11:26', '2026-03-17 15:11:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:11:26 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:11:26 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:11:27 [2.46ms] */
select * from `oauth_access_tokens` where `id` = '91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:11:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:11:27 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:11:27 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:11:27 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '91571c96abf348af56d1d8a2e171f66c4ee1509fa3fc660ef3d7eba31e1fc15e33a0b1b9bbdf1f75' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:11:27 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:11:27 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:11:40 [2.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:11:40 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:11:40 [0.6ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:11:40 [13.61ms] */
update `userprofiles` set `login_count` = 6316, `last_login` = '2025-03-17 15:11:40', `userprofiles`.`updated_at` = '2025-03-17 15:11:40' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:11:40 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:11:40 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:11:40 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:11:40 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:11:40 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:11:40 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:11:40 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:11:40 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:11:40 [3.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99', 149, 5, '[]', 0, '2025-03-17 15:11:40', '2025-03-17 15:11:40', '2026-03-17 15:11:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:11:40 [0.41ms] */
select * from `oauth_access_tokens` where `id` = 'd401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:11:40 [3.09ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:11:41 [2.5ms] */
select * from `oauth_access_tokens` where `id` = 'd401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:11:41 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'd401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:11:41 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:11:41 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:11:41 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'd401c9204a524d288c7eec2bd1ec95dbf9c3a3dc5851dba9764fddb7fd3522d05e4b3a07e0de7c99' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:11:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:11:41 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:11:59 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:11:59 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:11:59 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:11:59 [18.63ms] */
update `userprofiles` set `login_count` = 6317, `last_login` = '2025-03-17 15:11:59', `userprofiles`.`updated_at` = '2025-03-17 15:11:59' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:11:59 [0.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:11:59 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:11:59 [0.34ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:11:59 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:11:59 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:11:59 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:11:59 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:11:59 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:11:59 [2.97ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f', 149, 5, '[]', 0, '2025-03-17 15:11:59', '2025-03-17 15:11:59', '2026-03-17 15:11:59');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:11:59 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:11:59 [2.78ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:11:59 [2.92ms] */
select * from `oauth_access_tokens` where `id` = '4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:11:59 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:11:59 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:11:59 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:11:59 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '4d461c9e436ab0c2c17c0109058e2e032c1f91f2238dabc4ea072f8f97cca9e38c6ffaf8ee028a5f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:11:59 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:11:59 [0.47ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:12:21 [1.57ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:12:21 [0.23ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:12:21 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:12:21 [5.83ms] */
update `userprofiles` set `login_count` = 6318, `last_login` = '2025-03-17 15:12:21', `userprofiles`.`updated_at` = '2025-03-17 15:12:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:12:21 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:12:21 [0.48ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:12:21 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:12:21 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:12:21 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:12:21 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:12:21 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:12:21 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:12:21 [3.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b', 149, 5, '[]', 0, '2025-03-17 15:12:21', '2025-03-17 15:12:21', '2026-03-17 15:12:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:12:21 [0.3ms] */
select * from `oauth_access_tokens` where `id` = 'be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:12:21 [2.69ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:12:22 [1.51ms] */
select * from `oauth_access_tokens` where `id` = 'be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:12:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:12:22 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:12:22 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:12:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'be84eb50037bd5929aac7087b0ab012bfca064ba7d14b4fd07abb7af62d13e0b77d262fe798fa12b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:12:22 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:12:22 [1.48ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:12:37 [2.12ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:12:37 [0.24ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:12:37 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:12:37 [7.18ms] */
update `userprofiles` set `login_count` = 6319, `last_login` = '2025-03-17 15:12:37', `userprofiles`.`updated_at` = '2025-03-17 15:12:37' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:12:37 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:12:37 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:12:37 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:12:37 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:12:37 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:12:37 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:12:37 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:12:37 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:12:37 [3.42ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d', 149, 5, '[]', 0, '2025-03-17 15:12:37', '2025-03-17 15:12:37', '2026-03-17 15:12:37');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:12:37 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:12:37 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-03-17 15:12:37 [1.68ms] */
select * from `oauth_access_tokens` where `id` = '15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-03-17 15:12:37 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-03-17 15:12:37 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-03-17 15:12:37 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-03-17 15:12:37 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '15a1c37738caf10141b4c5d9dd152b827059e78ad1a061fce5f4ae70fd39825889971cc7bb25b05d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-03-17 15:12:37 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-03-17 15:12:37 [0.47ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:17:44 [1.68ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:17:44 [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-03-17 15:17:44 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:17:44 [9.12ms] */
update `userprofiles` set `login_count` = 1323, `last_login` = '2025-03-17 15:17:44', `userprofiles`.`updated_at` = '2025-03-17 15:17:44' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:17:44 [0.62ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:17:44 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:17:44 [0.57ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:17:44 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:17:44 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:17:44 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-03-17 15:17:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:17:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:17:44 [3.39ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8', 154, 5, '[]', 0, '2025-03-17 15:17:44', '2025-03-17 15:17:44', '2026-03-17 15:17:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:17:44 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:17:44 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 15:17:44 [2.18ms] */
select * from `oauth_access_tokens` where `id` = 'dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 15:17:44 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 15:17:44 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 15:17:44 [0.51ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 15:17:44 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'dae260bfefb4654971abae117d37fc28946b1b6ca436b0d158bb453f48eff99cc587804fc5cf75b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 15:17:44 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 15:17:44 [1.31ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = '5656SXYVCYHC' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 15:17:44 [0.57ms] */
select * from `party` where `party`.`id` = 64940 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 15:17:44 [0.47ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 15:17:44 [0.53ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:17:44 [1.88ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-03-17 15:17:44 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:17:44 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:17:45 [8.96ms] */
update `userprofiles` set `login_count` = 1324, `userprofiles`.`updated_at` = '2025-03-17 15:17:44' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:17:45 [0.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-03-17 15:17:45 [0.54ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:17:45 [0.2ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:17:45 [0.18ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:17:45 [0.14ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-03-17 15:17:45 [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-03-17 15:17:45 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-03-17 15:17:45 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-03-17 15:17:45 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80', 154, 5, '[]', 0, '2025-03-17 15:17:45', '2025-03-17 15:17:45', '2026-03-17 15:17:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-03-17 15:17:45 [0.48ms] */
select * from `oauth_access_tokens` where `id` = '661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-03-17 15:17:45 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-03-17 15:17:45 [2.36ms] */
select * from `oauth_access_tokens` where `id` = '661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-03-17 15:17:45 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-03-17 15:17:45 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-03-17 15:17:45 [0.25ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-03-17 15:17:45 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '661d6b867387208ac49de0c31cbe610f0feab2395eb5b04d1a30eb58e4f1a4837807cc2fe816ab80' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-03-17 15:17:45 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-03-17 15:17:45 [0.67ms] */
select `vehicle`.`id` as `vehicle_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'LIC1253RTA001' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-03-17 15:17:45 [0.27ms] */
select * from `party` where `party`.`id` = 64946 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-03-17 15:17:45 [0.22ms] */
select * from `vehicle` where `id` = 99468 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-03-17 15:17:45 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 99468 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-03-17 15:17:45 [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-03-17 15:17:45 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-03-17 15:17:45 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-03-17 15:17:45 [5.96ms] */
update `userprofiles` set `login_count` = 1325, `last_login` = '2025-03-17 15:17:45', `userprofiles`.`updated_at` = '2025-03-17 15:17:45' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-03-17 15:17:45 [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-03-17 15:17:45 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-03-17 15:17:45 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-03-17 15:17:45 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-03-17 15:17:45 [0.11ms] */
