/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:05 [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-06-19 11:00:05 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:05 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:05 [3.17ms] */
update `userprofiles` set `login_count` = 2811, `last_login` = '2025-06-19 11:00:05', `userprofiles`.`updated_at` = '2025-06-19 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:05 [0.31ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:05 [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-06-19 11:00:05 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:05 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:05 [0.22ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:05 [0.25ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:05 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:05 [3.11ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae', 154, 5, '[]', 0, '2025-06-19 11:00:05', '2025-06-19 11:00:05', '2026-06-19 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:05 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:05 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:05 [2.18ms] */
select * from `oauth_access_tokens` where `id` = '0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:05 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:05 [0.35ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:05 [0.49ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0fe482a8513074347c3510147dccede7952af41e3ac24856147bc3e07f9fb4c4e65ca1f7653b8cae' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:05 [0.32ms] */
select count(*) as aggregate from `party` where `id` = 33125;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:05 [0.26ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'BS724';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:05 [1.56ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 33125 and `license_plate` = 'BS724' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:05 [1.49ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:05 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:05 [0.48ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:05 [6.19ms] */
update `userprofiles` set `login_count` = 2812, `userprofiles`.`updated_at` = '2025-06-19 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:05 [0.29ms] */
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-06-19 11:00:05 [0.65ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-19 11:00:05 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:05 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:05 [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-06-19 11:00:05 [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-06-19 11:00:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:05 [2.91ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e', 154, 5, '[]', 0, '2025-06-19 11:00:05', '2025-06-19 11:00:05', '2026-06-19 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:05 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:05 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:05 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:05 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:05 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:05 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '5d382a1f1b8917c8f59b10447a5182ae80a14d62ee0416b20c078fbd05f5c996208958bfd1b6840e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:05 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 64940;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:05 [0.31ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '5656SXYVCYHC';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:05 [0.89ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:06 [1.53ms] */
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-06-19 11:00:06 [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-06-19 11:00:06 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:06 [11.24ms] */
update `userprofiles` set `login_count` = 2813, `last_login` = '2025-06-19 11:00:06', `userprofiles`.`updated_at` = '2025-06-19 11:00:06' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:06 [0.29ms] */
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-06-19 11:00:06 [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-06-19 11:00:06 [0.32ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:06 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:06 [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-06-19 11:00:06 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:06 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:06 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:06 [3.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d', 154, 5, '[]', 0, '2025-06-19 11:00:06', '2025-06-19 11:00:06', '2026-06-19 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:06 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:06 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:06 [1.36ms] */
select * from `oauth_access_tokens` where `id` = '9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:06 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:06 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:06 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:06 [0.17ms] */
select * from `oauth_access_tokens` where `id` = '9691b7dd96d570d94985a32dbfe27d94194708b043af5e56cb8af096a1fee5c7a1f906b0c594155d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:06 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:06 [0.23ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:06 [0.26ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC003';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:06 [0.81ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC003' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:07 [2.11ms] */
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-06-19 11:00:07 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:07 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:07 [6ms] */
update `userprofiles` set `login_count` = 2814, `last_login` = '2025-06-19 11:00:07', `userprofiles`.`updated_at` = '2025-06-19 11:00:07' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:07 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:07 [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-06-19 11:00:07 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:07 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00: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-06-19 11:00: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-06-19 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:07 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:07 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d', 154, 5, '[]', 0, '2025-06-19 11:00:07', '2025-06-19 11:00:07', '2026-06-19 11:00:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:07 [0.41ms] */
select * from `oauth_access_tokens` where `id` = 'a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:07 [3.31ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:07 [2.19ms] */
select * from `oauth_access_tokens` where `id` = 'a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:07 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:07 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:07 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:07 [0.3ms] */
select * from `oauth_access_tokens` where `id` = 'a33cc70145e3f2f4c00843dd54e5aac6a4a84baab99213cc6fea02c9dd90d782e8744705b525056d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:07 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:07 [0.13ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:07 [0.2ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC002';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:07 [0.79ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:08 [1.47ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:08 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:08 [0.59ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:08 [5.93ms] */
update `userprofiles` set `login_count` = 2815, `last_login` = '2025-06-19 11:00:08', `userprofiles`.`updated_at` = '2025-06-19 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:08 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:08 [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-06-19 11:00:08 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:08 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:08 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:08 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:08 [3.2ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339', 154, 5, '[]', 0, '2025-06-19 11:00:08', '2025-06-19 11:00:08', '2026-06-19 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:08 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:08 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:08 [1.59ms] */
select * from `oauth_access_tokens` where `id` = 'a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:08 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:08 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:08 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'a4f88d84b5e8732b5943fd96f1bb958c9f497d4f311609e5723ea1eacee6dceeeafaa21af3dc1339' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:08 [0.27ms] */
select count(*) as aggregate from `party` where `id` = 639;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:08 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'RTA009';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:08 [0.87ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 639 and `license_plate` = 'RTA009' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:09 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:09 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:09 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:09 [5.76ms] */
update `userprofiles` set `login_count` = 2816, `last_login` = '2025-06-19 11:00:09', `userprofiles`.`updated_at` = '2025-06-19 11:00:09' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:09 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:09 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-19 11:00:09 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:09 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:09 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:09 [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-06-19 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:09 [4.14ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255', 154, 5, '[]', 0, '2025-06-19 11:00:09', '2025-06-19 11:00:09', '2026-06-19 11:00:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:09 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:09 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:09 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:09 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:09 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:09 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '40a2feafaa99467f7b16b3b758ea0b3a04b89a0aea4ce9cfd5699d5519156155954efde2f6aa6255' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:09 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:09 [0.14ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:09 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC005';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:09 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:09 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:09 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:10 [37.89ms] */
update `userprofiles` set `login_count` = 2817, `userprofiles`.`updated_at` = '2025-06-19 11:00:09' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:10 [0.26ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:10 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-19 11:00:10 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:10 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:10 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:10 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:10 [7.86ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c', 154, 5, '[]', 0, '2025-06-19 11:00:10', '2025-06-19 11:00:10', '2026-06-19 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:10 [0.53ms] */
select * from `oauth_access_tokens` where `id` = 'c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:10 [3.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:10 [1.93ms] */
select * from `oauth_access_tokens` where `id` = 'c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:10 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:10 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:10 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'c527df5dafd91c13e15b248b7e2222c5dda1d96f17603a561191e8ecf8d8dd1d0265a1811c87374c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:10 [0.22ms] */
select count(*) as aggregate from `party` where `id` = 36578;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:10 [0.21ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'AA584';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:10 [0.98ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 36578 and `license_plate` = 'AA584' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:10 [1.42ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:10 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:10 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:10 [17.59ms] */
update `userprofiles` set `login_count` = 2818, `last_login` = '2025-06-19 11:00:10', `userprofiles`.`updated_at` = '2025-06-19 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:10 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:10 [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-06-19 11:00:10 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:10 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:10 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:10 [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-06-19 11:00:10 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:10 [2.91ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544', 154, 5, '[]', 0, '2025-06-19 11:00:10', '2025-06-19 11:00:10', '2026-06-19 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:10 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:10 [3.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:10 [1.42ms] */
select * from `oauth_access_tokens` where `id` = 'ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:10 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:11 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:11 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'ab72224f8a858e49e8ca742ea0174250bd547b7ab8c23d0310263bc9f3a751bbbe6a907a15fb3544' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:11 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:11 [0.19ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:11 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC1253RTA001';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:11 [0.8ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC1253RTA001' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:11 [1.4ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:11 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:11 [9.09ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:11 [3.2ms] */
update `userprofiles` set `login_count` = 2819, `last_login` = '2025-06-19 11:00:11', `userprofiles`.`updated_at` = '2025-06-19 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:11 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:11 [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-06-19 11:00: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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:11 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:11 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:11 [0.34ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:11 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb', 154, 5, '[]', 0, '2025-06-19 11:00:11', '2025-06-19 11:00:11', '2026-06-19 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:11 [0.47ms] */
select * from `oauth_access_tokens` where `id` = 'c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:11 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:11 [1.44ms] */
select * from `oauth_access_tokens` where `id` = 'c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:11 [0.2ms] */
select * from `oauth_access_tokens` where `id` = 'c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:11 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'c937d08b15face5da2cdbd7617eaafa47a1581b6b412ab464d5b95b203fe5b09919d9053cf40c3cb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:11 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 54700;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:11 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YP073';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:11 [1.23ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 54700 and `license_plate` = 'YP073' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:12 [1.31ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-19 11:00:12 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:12 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:12 [5.86ms] */
update `userprofiles` set `login_count` = 2820, `last_login` = '2025-06-19 11:00:12', `userprofiles`.`updated_at` = '2025-06-19 11:00:12' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:12 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:12 [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-06-19 11:00:12 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:12 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:12 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:00:12 [0.25ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:00:12 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:12 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:12 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63', 154, 5, '[]', 0, '2025-06-19 11:00:12', '2025-06-19 11:00:12', '2026-06-19 11:00:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:12 [0.46ms] */
select * from `oauth_access_tokens` where `id` = '2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:12 [2.93ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:12 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:12 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:12 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:12 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:12 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '2a0eeb8371c07db56c11f9cc52052d773bde2ff4cf106676e7a5372b3d77ffbdee1b4860de636a63' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:12 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:12 [0.34ms] */
select count(*) as aggregate from `party` where `id` = 99460;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:00:12 [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-06-19 11:00:12 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:00:12 [0.46ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:00:12 [5.98ms] */
update `userprofiles` set `login_count` = 2821, `userprofiles`.`updated_at` = '2025-06-19 11:00:12' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:00:12 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-19 11:00:12 [0.49ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-19 11:00:12 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-19 11:00:12 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:00:12 [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-06-19 11:00:12 [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-06-19 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:00:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:00:12 [3.06ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce', 154, 5, '[]', 0, '2025-06-19 11:00:12', '2025-06-19 11:00:12', '2026-06-19 11:00:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:00:12 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:00:12 [2.71ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:00:12 [1.47ms] */
select * from `oauth_access_tokens` where `id` = '4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:00:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:00:12 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:00:12 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:00:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4e65de3d4ced6d36202467d46bfc5915abd2fb4b05406c4d6f91ae1932298e954b6e8141fa57a7ce' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:00:12 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 59307;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-19 11:00:12 [0.31ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'IF124';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-19 11:00:12 [1.12ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 59307 and `license_plate` = 'IF124' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-19 11:42:50 [2.86ms] */
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-06-19 11:42:51 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-19 11:42:51 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-19 11:42:51 [12.9ms] */
update `userprofiles` set `login_count` = 2822, `last_login` = '2025-06-19 11:42:51', `userprofiles`.`updated_at` = '2025-06-19 11:42:51' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-19 11:42:51 [0.42ms] */
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-06-19 11:42:51 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-19 11:42:51 [0.56ms] */
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-06-19 11:42:51 [0.39ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-19 11:42:51 [0.34ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-19 11:42:51 [0.38ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-19 11:42:51 [0.37ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-19 11:42:51 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-19 11:42:51 [3.15ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202', 154, 5, '[]', 0, '2025-06-19 11:42:51', '2025-06-19 11:42:51', '2026-06-19 11:42:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-19 11:42:51 [0.51ms] */
select * from `oauth_access_tokens` where `id` = 'cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-19 11:42:51 [12.86ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-19 11:42:51 [1.49ms] */
select * from `oauth_access_tokens` where `id` = 'cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-19 11:42:51 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-19 11:42:51 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-19 11:42:51 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-19 11:42:51 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'cb5dda65ce4a5848a7adb8508558cff143ed50f2e6db09b1820991970ddbe2d81f3881b9b01f4202' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-19 11:42:51 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-19 11:42:51 [0.27ms] */
select count(*) as aggregate from `party` where `id` = 64990;
/*==================================================*/
