select * from `person` where `person`.`deleted_at` is null order by `updated_at` desc limit 10 offset 0;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 12 - 2025-05-26 10:34:11 [0.34ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 13 - 2025-05-26 10:34:11 [0.18ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 14 - 2025-05-26 10:34:11 [0.17ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62322 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 15 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64946 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 16 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62353 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 17 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64979 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 18 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62357 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 19 - 2025-05-26 10:34:11 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64983 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 20 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62355 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 21 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64981 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 22 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62354 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 23 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64980 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 24 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62352 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 25 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64978 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 26 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62351 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 27 - 2025-05-26 10:34:11 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64977 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 28 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62350 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 29 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64976 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 30 - 2025-05-26 10:34:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62349 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 31 - 2025-05-26 10:34:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64975 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:03 [1.6ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:03 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:03 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:03 [7.42ms] */
update `userprofiles` set `login_count` = 2540, `last_login` = '2025-05-26 11:00:03', `userprofiles`.`updated_at` = '2025-05-26 11:00:03' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:03 [0.43ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:03 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:03 [0.51ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:03 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:03 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:03 [0.25ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:03 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:03 [3.48ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611', 154, 5, '[]', 0, '2025-05-26 11:00:03', '2025-05-26 11:00:03', '2026-05-26 11:00:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:03 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:03 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:03 [2.17ms] */
select * from `oauth_access_tokens` where `id` = '7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:03 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:03 [0.31ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:03 [0.34ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:03 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '7215b0b99777b6e822cedf6fc9b658f26c1bfa6a25b7d600f85cba55d04bdca618170bce60480611' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:03 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:03 [0.38ms] */
select count(*) as aggregate from `party` where `id` = 33125;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:03 [0.4ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'BS724';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:03 [1.83ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 33125 and `license_plate` = 'BS724' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:03 [2.08ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:03 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:03 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:03 [7.8ms] */
update `userprofiles` set `login_count` = 2541, `userprofiles`.`updated_at` = '2025-05-26 11:00:03' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:03 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:03 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:03 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:03 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:03 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:03 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:03 [3.58ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d', 154, 5, '[]', 0, '2025-05-26 11:00:03', '2025-05-26 11:00:03', '2026-05-26 11:00:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:03 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:03 [2.81ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:03 [1.76ms] */
select * from `oauth_access_tokens` where `id` = '481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:03 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:03 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:03 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:03 [0.17ms] */
select * from `oauth_access_tokens` where `id` = '481d26ddf9db26ec41a974c63a84413a2875a174e2fb7db848db0939400f5bbe7774f8f4ef7a547d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:03 [0.26ms] */
select count(*) as aggregate from `party` where `id` = 64940;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:03 [0.49ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '5656SXYVCYHC';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:03 [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` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:04 [1.36ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:04 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:04 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:04 [6.27ms] */
update `userprofiles` set `login_count` = 2542, `last_login` = '2025-05-26 11:00:04', `userprofiles`.`updated_at` = '2025-05-26 11:00:04' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:04 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:04 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:04 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:04 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:04 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:04 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:04 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:04 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668', 154, 5, '[]', 0, '2025-05-26 11:00:04', '2025-05-26 11:00:04', '2026-05-26 11:00:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:04 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:04 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:04 [1.62ms] */
select * from `oauth_access_tokens` where `id` = 'ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:04 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:04 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:04 [0.15ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:04 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ef607bf37404202ecdefd78cbc0f86ffb738a91337a45de7d793b2ea941cbea26fce9882885a5668' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:04 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:04 [0.21ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:04 [0.32ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC003';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:04 [1.18ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC003' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:05 [1.36ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 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/login
   Query 3 - 2025-05-26 11:00:05 [0.47ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:05 [7.78ms] */
update `userprofiles` set `login_count` = 2543, `last_login` = '2025-05-26 11:00:05', `userprofiles`.`updated_at` = '2025-05-26 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:05 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:05 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:05 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:05 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 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-05-26 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-05-26 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-05-26 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-05-26 11:00:05 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012', 154, 5, '[]', 0, '2025-05-26 11:00:05', '2025-05-26 11:00:05', '2026-05-26 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:05 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'd3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:05 [3.08ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:05 [2.14ms] */
select * from `oauth_access_tokens` where `id` = 'd3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:05 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'd3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:05 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:05 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:05 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'd3ff4f695608b712e945ee83c17c405bbdc87d819cf18bd71175ac0a7c55d827591b23a60defb012' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:05 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:05 [0.16ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:05 [0.27ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC002';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:05 [1.01ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:06 [1.36ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 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-05-26 11:00:06 [0.48ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:06 [6.16ms] */
update `userprofiles` set `login_count` = 2544, `last_login` = '2025-05-26 11:00:06', `userprofiles`.`updated_at` = '2025-05-26 11:00:06' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:06 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:06 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:06 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 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-05-26 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-05-26 11:00:06 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:06 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:06 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:06 [3.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac', 154, 5, '[]', 0, '2025-05-26 11:00:06', '2025-05-26 11:00:06', '2026-05-26 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:06 [0.45ms] */
select * from `oauth_access_tokens` where `id` = 'f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:06 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:06 [1.35ms] */
select * from `oauth_access_tokens` where `id` = 'f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:06 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 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-05-26 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/invoices
   Query 5 - 2025-05-26 11:00:06 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'f07380e67f8bad7efcce683c912cc5b0070482ba7a60f0eb264014b84b44f082b7e6794e935f34ac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:06 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:06 [0.24ms] */
select count(*) as aggregate from `party` where `id` = 639;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:06 [0.29ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'RTA009';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:06 [0.84ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 639 and `license_plate` = 'RTA009' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:07 [1.58ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:07 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:07 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:07 [5.76ms] */
update `userprofiles` set `login_count` = 2545, `last_login` = '2025-05-26 11:00:07', `userprofiles`.`updated_at` = '2025-05-26 11:00:07' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:07 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:07 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:07 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:07 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 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-05-26 11:00:07 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:07 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:07 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:07 [2.97ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18', 154, 5, '[]', 0, '2025-05-26 11:00:07', '2025-05-26 11:00:07', '2026-05-26 11:00:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:07 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:07 [2.79ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:07 [2.14ms] */
select * from `oauth_access_tokens` where `id` = '1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:07 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:07 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 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-05-26 11:00:07 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '1a8919cceec1b45a64a5f30f75095990904988703c35c327f98da204aab5b8e5d1179599a754ca18' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:07 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 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-05-26 11:00:07 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC005';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:08 [1.33ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:08 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:08 [0.45ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:08 [8.51ms] */
update `userprofiles` set `login_count` = 2546, `last_login` = '2025-05-26 11:00:08', `userprofiles`.`updated_at` = '2025-05-26 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:08 [0.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:08 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:08 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:08 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:08 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:08 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:08 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:08 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:08 [3.08ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e', 154, 5, '[]', 0, '2025-05-26 11:00:08', '2025-05-26 11:00:08', '2026-05-26 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:08 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'd25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:08 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:08 [2.32ms] */
select * from `oauth_access_tokens` where `id` = 'd25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:08 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'd25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:08 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:08 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:08 [0.33ms] */
select * from `oauth_access_tokens` where `id` = 'd25641faa22ca0a554a26f3d1f7f6dbb0972cde73459b4f1addc23473453a74792cfae486bd1170e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:08 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:08 [0.57ms] */
select count(*) as aggregate from `party` where `id` = 36578;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:08 [0.5ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'AA584';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:08 [2.13ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 36578 and `license_plate` = 'AA584' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:09 [1.34ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:09 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:09 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:09 [11.14ms] */
update `userprofiles` set `login_count` = 2547, `last_login` = '2025-05-26 11:00:09', `userprofiles`.`updated_at` = '2025-05-26 11:00:09' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:09 [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-05-26 11:00:09 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:09 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:09 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:09 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:09 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:09 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:09 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:09 [3.4ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c', 154, 5, '[]', 0, '2025-05-26 11:00:09', '2025-05-26 11:00:09', '2026-05-26 11:00:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:09 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:09 [3.31ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:09 [1.92ms] */
select * from `oauth_access_tokens` where `id` = '2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:09 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:09 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:09 [0.21ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:09 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '2692f7938c23181079d19107ec529b01778a69bc2113818a9ab0a6168e5f0947b95f59b73a26465c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:09 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:09 [0.17ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:09 [0.41ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC1253RTA001';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:09 [1.06ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC1253RTA001' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:10 [2.05ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:10 [0.23ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:10 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:10 [3.06ms] */
update `userprofiles` set `login_count` = 2548, `last_login` = '2025-05-26 11:00:10', `userprofiles`.`updated_at` = '2025-05-26 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:10 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:10 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:10 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:10 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:10 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:10 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:10 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:10 [4.59ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59', 154, 5, '[]', 0, '2025-05-26 11:00:10', '2025-05-26 11:00:10', '2026-05-26 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:10 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:10 [3.07ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:10 [1.68ms] */
select * from `oauth_access_tokens` where `id` = '603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:10 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:10 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:10 [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-05-26 11:00:10 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '603d4d7f56b9955b5fb25ec66baadeb3bd54a4155b61d6cf9d9545cd36641d58cdcd2282b60f3f59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:10 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:10 [0.38ms] */
select count(*) as aggregate from `party` where `id` = 54700;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:10 [0.4ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YP073';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:10 [1.59ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 54700 and `license_plate` = 'YP073' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:10 [1.48ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:10 [0.21ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:10 [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-05-26 11:00:10 [3.16ms] */
update `userprofiles` set `login_count` = 2549, `userprofiles`.`updated_at` = '2025-05-26 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:10 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:10 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:10 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 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-05-26 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-05-26 11:00:10 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:10 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:10 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:10 [3.41ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f', 154, 5, '[]', 0, '2025-05-26 11:00:10', '2025-05-26 11:00:10', '2026-05-26 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:11 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:11 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:11 [1.93ms] */
select * from `oauth_access_tokens` where `id` = '27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:11 [0.56ms] */
select * from `oauth_access_tokens` where `id` = '27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:11 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:11 [0.23ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:11 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '27223d4826064afd7e0c06deeaa2a887d80de3991647fcf921dc7ae24851354138ce6f087aec3e3f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:11 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:11 [0.32ms] */
select count(*) as aggregate from `party` where `id` = 99460;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 11:00:11 [2.09ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-26 11:00:11 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-26 11:00:11 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-26 11:00:11 [5.96ms] */
update `userprofiles` set `login_count` = 2550, `last_login` = '2025-05-26 11:00:11', `userprofiles`.`updated_at` = '2025-05-26 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-26 11:00:11 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-26 11:00:11 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-26 11:00:11 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-26 11:00:11 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-26 11:00:11 [0.15ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-26 11:00:11 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-26 11:00:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-26 11:00:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-26 11:00:11 [3.1ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f', 154, 5, '[]', 0, '2025-05-26 11:00:11', '2025-05-26 11:00:11', '2026-05-26 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-26 11:00:11 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-26 11:00:11 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-26 11:00:11 [2.05ms] */
select * from `oauth_access_tokens` where `id` = '8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-26 11:00:11 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-26 11:00:11 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-26 11:00:11 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-26 11:00:11 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '8de62beb00e497a199688fed48757b069f6cab9eefe6df85c414cd68dd43ba95115be5c9b6dd161f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-26 11:00:11 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-26 11:00:11 [0.23ms] */
select count(*) as aggregate from `party` where `id` = 59307;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-26 11:00:11 [0.28ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'IF124';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-26 11:00:11 [1.14ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 59307 and `license_plate` = 'IF124' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 1 - 2025-05-26 11:23:21 [2ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 2 - 2025-05-26 11:23:21 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 3 - 2025-05-26 11:23:21 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 4 - 2025-05-26 11:23:21 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 5 - 2025-05-26 11:23:21 [0.51ms] */
select * from `company_type` where `company_type`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 1 - 2025-05-26 11:32:07 [1.64ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 2 - 2025-05-26 11:32:07 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 3 - 2025-05-26 11:32:07 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 4 - 2025-05-26 11:32:07 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.create-party-company-component
   Query 5 - 2025-05-26 11:32:07 [0.25ms] */
select * from `company_type` where `company_type`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 1 - 2025-05-26 11:46:49 [2.34ms] */
select * from `users` where `email` = 'admin@admin.com' and `status` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 2 - 2025-05-26 11:46:49 [0.35ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 3 - 2025-05-26 11:46:49 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 2 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 4 - 2025-05-26 11:46:49 [7.87ms] */
update `userprofiles` set `login_count` = 699, `last_login` = '2025-05-26 11:46:49', `userprofiles`.`updated_at` = '2025-05-26 11:46:49' where `id` = 2;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 5 - 2025-05-26 11:46:49 [0.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 6 - 2025-05-26 11:46:49 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 7 - 2025-05-26 11:46:49 [0.54ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 1 - 2025-05-26 11:46:49 [1.36ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 2 - 2025-05-26 11:46:49 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 3 - 2025-05-26 11:46:49 [0.32ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 4 - 2025-05-26 11:46:49 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 5 - 2025-05-26 11:46:49 [14.27ms] */
select count(*) as aggregate from `party` where `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 6 - 2025-05-26 11:46:49 [18.39ms] */
select count(*) as aggregate from `party` where `created_at` > '2025-05-26' and `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 7 - 2025-05-26 11:46:50 [53.55ms] */
select count(*) as aggregate from `vehicle` where `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 8 - 2025-05-26 11:46:50 [30.14ms] */
select count(*) as aggregate from `vehicle` where `created_at` > '2025-05-26' and `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-05-26 11:46:50 [94.15ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-25' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 10 - 2025-05-26 11:46:50 [43.64ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-25' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-05-26 11:46:50 [316.41ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-26' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-05-26 11:46:51 [1092.31ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-26' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 1 - 2025-05-26 11:46:54 [1.37ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 2 - 2025-05-26 11:46:54 [0.45ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 3 - 2025-05-26 11:46:54 [0.35ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 4 - 2025-05-26 11:46:54 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 5 - 2025-05-26 11:46:54 [38.78ms] */
select count(*) as aggregate from `person` where `person`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 6 - 2025-05-26 11:46:54 [16.07ms] */
select * from `person` where `person`.`deleted_at` is null order by `updated_at` desc limit 10 offset 0;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 7 - 2025-05-26 11:46:54 [0.2ms] */
select * from `company_type` where `company_type`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 8 - 2025-05-26 11:46:54 [32.35ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 9 - 2025-05-26 11:46:54 [0.39ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 10 - 2025-05-26 11:46:54 [26.45ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62322 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 11 - 2025-05-26 11:46:54 [0.37ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64946 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 12 - 2025-05-26 11:46:54 [26.92ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62353 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 13 - 2025-05-26 11:46:54 [0.35ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64979 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 14 - 2025-05-26 11:46:54 [26.47ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62357 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 15 - 2025-05-26 11:46:54 [0.34ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64983 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 16 - 2025-05-26 11:46:54 [26.6ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62355 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 17 - 2025-05-26 11:46:54 [0.29ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64981 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 18 - 2025-05-26 11:46:54 [26.46ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62354 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 19 - 2025-05-26 11:46:54 [0.31ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64980 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 20 - 2025-05-26 11:46:54 [26.05ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62352 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 21 - 2025-05-26 11:46:54 [0.26ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64978 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 22 - 2025-05-26 11:46:54 [25.94ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62351 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 23 - 2025-05-26 11:46:54 [0.19ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64977 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 24 - 2025-05-26 11:46:54 [25.94ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62350 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 25 - 2025-05-26 11:46:54 [0.22ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64976 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 26 - 2025-05-26 11:46:54 [25.68ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62349 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 27 - 2025-05-26 11:46:54 [0.22ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64975 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 1 - 2025-05-26 11:47:02 [1.39ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 2 - 2025-05-26 11:47:02 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 3 - 2025-05-26 11:47:02 [0.32ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 4 - 2025-05-26 11:47:02 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 5 - 2025-05-26 11:47:02 [149.55ms] */
select count(*) as aggregate from `person` inner join `party` on `party`.`partyable_id` = `person`.`id` and `party`.`partyable_type` = 'Person' left join `customer_identity_documents` on `customer_identity_documents`.`party_id` = `party`.`id` where (((`first_name` like '%98556656%' or `second_name` like '%98556656%' or `third_name` like '%98556656%' or `fourth_name` like '%98556656%' or `phone_number_1` like '%98556656%' or `phone_number_2` like '%98556656%' or `customer_identity_documents`.`id_number` like '%98556656%')) and `provisional` = 'N') and `person`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 6 - 2025-05-26 11:47:03 [190.15ms] */
select `person`.* from `person` inner join `party` on `party`.`partyable_id` = `person`.`id` and `party`.`partyable_type` = 'Person' left join `customer_identity_documents` on `customer_identity_documents`.`party_id` = `party`.`id` where (((`first_name` like '%98556656%' or `second_name` like '%98556656%' or `third_name` like '%98556656%' or `fourth_name` like '%98556656%' or `phone_number_1` like '%98556656%' or `phone_number_2` like '%98556656%' or `customer_identity_documents`.`id_number` like '%98556656%')) and `provisional` = 'N') and `person`.`deleted_at` is null order by `first_name` asc, `second_name` asc, `third_name` asc, `fourth_name` asc limit 10 offset 0;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 7 - 2025-05-26 11:47:03 [0.25ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 8 - 2025-05-26 11:47:03 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 1 - 2025-05-26 11:47:05 [2.31ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 2 - 2025-05-26 11:47:05 [0.79ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 3 - 2025-05-26 11:47:05 [0.32ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 4 - 2025-05-26 11:47:05 [0.79ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 5 - 2025-05-26 11:47:05 [0.35ms] */
select * from `party` where `party`.`id` = 64982 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 6 - 2025-05-26 11:47:05 [0.28ms] */
select * from `person` where `person`.`id` = 62356 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 7 - 2025-05-26 11:47:05 [0.19ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 8 - 2025-05-26 11:47:05 [1.37ms] */
select * from `address` where `address`.`id` = 64982 and `address`.`id` is not null and `address`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 9 - 2025-05-26 11:47:05 [0.38ms] */
select * from `district` where `district`.`id` = 3 and `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 10 - 2025-05-26 11:47:05 [0.41ms] */
select * from `region` where `region`.`id` = 1 and `region`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 11 - 2025-05-26 11:47:05 [0.23ms] */
select * from `region` where `region`.`deleted_at` is null order by `name` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 12 - 2025-05-26 11:47:05 [0.18ms] */
select * from `tax_collection_points` where `region_id` is null order by `name` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 13 - 2025-05-26 11:47:05 [0.17ms] */
select * from `district` where `region_id` is null and `district`.`deleted_at` is null order by `name` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 14 - 2025-05-26 11:47:05 [0.17ms] */
select * from `branches` where `district_id` is null order by `name` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 15 - 2025-05-26 11:47:05 [0.52ms] */
select count(*) as aggregate from `party_vehicle` where `party_id` = 64982 and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 16 - 2025-05-26 11:47:05 [1.32ms] */
select count(*) as aggregate from `transaction` where `party_id` = 64982 and `status` = 'INPROGRESS' and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 17 - 2025-05-26 11:47:05 [0.47ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` where `party_id` = 64982 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 18 - 2025-05-26 11:47:05 [0.22ms] */
select count(*) as aggregate from `invoice` where `party_id` = 64982 and `outstanding_balance` > 0 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 19 - 2025-05-26 11:47:05 [0.27ms] */
select * from `party` where `party`.`id` = 64982 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 20 - 2025-05-26 11:47:05 [0.16ms] */
select * from `person` where `person`.`id` = 62356 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 21 - 2025-05-26 11:47:05 [3.46ms] */
select * from `activity_log` where `log_name` = 'party' and `subject_id` = 64982 and `description` = 'updated' order by `created_at` desc limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 22 - 2025-05-26 11:47:05 [2.18ms] */
select * from `activity_log` where `log_name` = 'person' and `subject_id` = 62356 and `description` = 'updated' order by `created_at` desc limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 23 - 2025-05-26 11:47:05 [0.31ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 24 - 2025-05-26 11:47:05 [0.71ms] */
select * from `person_bio_photo` where `party_id` = 64982 and `person_bio_photo`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 25 - 2025-05-26 11:47:05 [0.68ms] */
select * from `person_bio_iris` where `party_id` = 64982 and `person_bio_iris`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 26 - 2025-05-26 11:47:05 [0.39ms] */
select * from `party_vehicle` where `party_id` = 64982 and `party_vehicle`.`deleted_at` is null order by `updated_at` desc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 27 - 2025-05-26 11:47:05 [0.34ms] */
select count(*) as aggregate from `invoice` where `invoice`.`invoice_amount` <> 0.00 and `party_id` in (64982) and `status` <> 'CANCELED' and `status` <> 'CANCELED' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 28 - 2025-05-26 11:47:05 [0.43ms] */
select * from `service` where `service`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 29 - 2025-05-26 11:47:05 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 30 - 2025-05-26 11:47:05 [0.7ms] */
select `roles`.*, `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` = 2 and `model_has_roles`.`model_type` = 'App\Models\User' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 31 - 2025-05-26 11:47:05 [1.03ms] */
select count(*) as aggregate from `transaction` inner join `service` on `service`.`id` = `transaction`.`service_id` where `transaction`.`party_id` = 64982 and `transaction`.`one_time_tax` <> 'Y' and `transaction`.`parent_id` is null and `status` != 'CANCELED' and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 32 - 2025-05-26 11:47:05 [0.14ms] */
select * from `service` where `service`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 33 - 2025-05-26 11:47:05 [0.34ms] */
select * from `roles`;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 34 - 2025-05-26 11:47:05 [0.9ms] */
select count(*) as aggregate from `discount` where `party_id` = 64982 and `discount`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 35 - 2025-05-26 11:47:05 [0.62ms] */
select * from `customer_identity_types` where `customer_identity_types`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 36 - 2025-05-26 11:47:05 [0.73ms] */
select * from `countries` where `countries`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 37 - 2025-05-26 11:47:05 [0.4ms] */
select count(*) as aggregate from `customer_identity_documents` where `party_id` = 64982 and `customer_identity_documents`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 38 - 2025-05-26 11:47:05 [0.33ms] */
select * from `customer_identity_documents` where `party_id` = 64982 and `customer_identity_documents`.`deleted_at` is null limit 5 offset 0;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party/64982
   Query 39 - 2025-05-26 11:47:05 [0.33ms] */
select * from `customer_identity_types` where `customer_identity_types`.`id` = 3 and `customer_identity_types`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 1 - 2025-05-26 11:47:07 [2.42ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 2 - 2025-05-26 11:47:07 [0.64ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 3 - 2025-05-26 11:47:07 [0.49ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 4 - 2025-05-26 11:47:07 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 5 - 2025-05-26 11:47:07 [0.31ms] */
select * from `party` where `id` = 64982 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/audit-details?audit_ids=64982&model=Person
   Query 6 - 2025-05-26 11:47:07 [0.78ms] */
SELECT event,auditable_id,auditable_type, old_values, new_values,a.created_at,a.updated_at, ur.first_name,last_name 
            FROM audits a 
            left join users ur on a.user_id = ur.id 
            left join person p on a.auditable_id = p.id 
            where auditable_id = 62356 and a.auditable_type = 'Person' ORDER BY a.id DESC
            ;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 1 - 2025-05-26 11:47:11 [2.23ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 2 - 2025-05-26 11:47:11 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 3 - 2025-05-26 11:47:11 [0.32ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 4 - 2025-05-26 11:47:11 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 5 - 2025-05-26 11:47:11 [0.17ms] */
select count(*) as aggregate from `person` where `person`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 6 - 2025-05-26 11:47:11 [0.16ms] */
select * from `person` where `person`.`deleted_at` is null order by `updated_at` desc limit 10 offset 0;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 7 - 2025-05-26 11:47:11 [0.16ms] */
select * from `company_type` where `company_type`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 8 - 2025-05-26 11:47:11 [0.16ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 9 - 2025-05-26 11:47:11 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 10 - 2025-05-26 11:47:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62322 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 11 - 2025-05-26 11:47:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64946 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 12 - 2025-05-26 11:47:11 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62353 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 13 - 2025-05-26 11:47:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64979 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 14 - 2025-05-26 11:47:11 [0.16ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62357 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 15 - 2025-05-26 11:47:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64983 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 16 - 2025-05-26 11:47:11 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62355 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 17 - 2025-05-26 11:47:11 [0.13ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64981 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 18 - 2025-05-26 11:47:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62354 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 19 - 2025-05-26 11:47:11 [0.13ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64980 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 20 - 2025-05-26 11:47:11 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62352 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 21 - 2025-05-26 11:47:11 [0.13ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64978 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 22 - 2025-05-26 11:47:11 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62351 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 23 - 2025-05-26 11:47:11 [0.13ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64977 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 24 - 2025-05-26 11:47:11 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62350 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 25 - 2025-05-26 11:47:11 [0.13ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64976 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 26 - 2025-05-26 11:47:11 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62349 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/party
   Query 27 - 2025-05-26 11:47:11 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64975 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 1 - 2025-05-26 11:49:56 [2.35ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 2 - 2025-05-26 11:49:56 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 3 - 2025-05-26 11:49:56 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 4 - 2025-05-26 11:49:56 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 5 - 2025-05-26 11:49:56 [0.19ms] */
select count(*) as aggregate from `person` where `person`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 6 - 2025-05-26 11:49:56 [0.16ms] */
select * from `person` where `person`.`deleted_at` is null order by `updated_at` desc limit 10 offset 0;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 7 - 2025-05-26 11:49:56 [0.18ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 8 - 2025-05-26 11:49:56 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 9 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62322 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 10 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64946 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 11 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62353 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 12 - 2025-05-26 11:49:56 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64979 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 13 - 2025-05-26 11:49:56 [0.17ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62357 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 14 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64983 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 15 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62355 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 16 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64981 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 17 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62354 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 18 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64980 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 19 - 2025-05-26 11:49:56 [0.16ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62352 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 20 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64978 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 21 - 2025-05-26 11:49:56 [0.14ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62351 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 22 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64977 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 23 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62350 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 24 - 2025-05-26 11:49:56 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64976 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 25 - 2025-05-26 11:49:56 [0.15ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62349 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 26 - 2025-05-26 11:49:56 [0.14ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64975 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 1 - 2025-05-26 11:49:57 [2.01ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 2 - 2025-05-26 11:49:57 [0.85ms] */
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/livewire/message/party.list-party-component
   Query 3 - 2025-05-26 11:49:57 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 4 - 2025-05-26 11:49:57 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 5 - 2025-05-26 11:49:57 [0.26ms] */
select count(*) as aggregate from `person` inner join `party` on `party`.`partyable_id` = `person`.`id` and `party`.`partyable_type` = 'Person' left join `customer_identity_documents` on `customer_identity_documents`.`party_id` = `party`.`id` where (((`first_name` like '%98556656%' or `second_name` like '%98556656%' or `third_name` like '%98556656%' or `fourth_name` like '%98556656%' or `phone_number_1` like '%98556656%' or `phone_number_2` like '%98556656%' or `customer_identity_documents`.`id_number` like '%98556656%')) and `provisional` = 'N') and `person`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 6 - 2025-05-26 11:49:57 [0.2ms] */
select `person`.* from `person` inner join `party` on `party`.`partyable_id` = `person`.`id` and `party`.`partyable_type` = 'Person' left join `customer_identity_documents` on `customer_identity_documents`.`party_id` = `party`.`id` where (((`first_name` like '%98556656%' or `second_name` like '%98556656%' or `third_name` like '%98556656%' or `fourth_name` like '%98556656%' or `phone_number_1` like '%98556656%' or `phone_number_2` like '%98556656%' or `customer_identity_documents`.`id_number` like '%98556656%')) and `provisional` = 'N') and `person`.`deleted_at` is null order by `first_name` asc, `second_name` asc, `third_name` asc, `fourth_name` asc limit 10 offset 0;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 7 - 2025-05-26 11:49:57 [0.17ms] */
select * from `party` where `party`.`partyable_type` = 'Person' and `party`.`partyable_id` = 62356 and `party`.`partyable_id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/livewire/message/party.list-party-component
   Query 8 - 2025-05-26 11:49:57 [0.15ms] */
select * from `customer_identity_documents` where `customer_identity_documents`.`party_id` = 64982 and `customer_identity_documents`.`party_id` is not null and `customer_identity_documents`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 1 - 2025-05-26 13:26:28 [1.59ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 2 - 2025-05-26 13:26:28 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 3 - 2025-05-26 13:26:28 [0.32ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 4 - 2025-05-26 13:26:28 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 5 - 2025-05-26 13:26:28 [0.38ms] */
select `region`.`name` from `district` inner join `region` on `region`.`id` = `district`.`region_id` where `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 6 - 2025-05-26 13:26:28 [0.21ms] */
select `name` from `classification_type` where `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-26 14:37:34 [3.12ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
