select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:48:54 [0.27ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:48:54 [0.63ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:48:54 [6.3ms] */
update `userprofiles` set `login_count` = 357, `last_login` = '2025-04-13 09:48:54', `userprofiles`.`updated_at` = '2025-04-13 09:48:54' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:48:54 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:48:54 [0.48ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 09:48:54 [0.23ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:48:54 [1.3ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:48:54 [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-04-13 09:48:54 [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-04-13 09:48:54 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:48:54 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:48:54 [3.45ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902', 1, 5, '[]', 0, '2025-04-13 09:48:54', '2025-04-13 09:48:54', '2026-04-13 09:48:54');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:48:54 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:48:54 [3.06ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:48:54 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:48:54 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:48:54 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:48:54 [0.22ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:48:54 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '453de3c52cad792ee9ec06a3cbcff1953e8aebfcc80634506b8c98c3b09d327014396728ec900902' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:48:54 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:48:54 [7.64ms] */
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 `license_plate` = 'ho785' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 09:52:02 [1.34ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:52:02 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:52:02 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:52:02 [6.24ms] */
update `userprofiles` set `login_count` = 358, `last_login` = '2025-04-13 09:52:02', `userprofiles`.`updated_at` = '2025-04-13 09:52:02' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:52:02 [0.24ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:52:02 [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-04-13 09:52:02 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:52:02 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:52:02 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 09:52:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 09:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:52:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:52:02 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040', 1, 5, '[]', 0, '2025-04-13 09:52:02', '2025-04-13 09:52:02', '2026-04-13 09:52:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:52:02 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:52:02 [3.04ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:52:02 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:52:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:52:02 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:52:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8d18da9cc0fe3956645ac54b023accf0e31ee026402a91223dd76297ce60ac69118bd79f768e9040' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:52:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:52:02 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'ho785' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 09:53:17 [1.36ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:53:17 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:53:17 [0.92ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:53:17 [12.29ms] */
update `userprofiles` set `login_count` = 359, `last_login` = '2025-04-13 09:53:17', `userprofiles`.`updated_at` = '2025-04-13 09:53:17' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:53:17 [0.34ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:53:17 [0.68ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 09:53:17 [0.32ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:53:17 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:53:17 [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-04-13 09:53:17 [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-04-13 09:53:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:53:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:53:17 [5.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b', 1, 5, '[]', 0, '2025-04-13 09:53:17', '2025-04-13 09:53:17', '2026-04-13 09:53:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:53:17 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:53:17 [3.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:53:17 [1.5ms] */
select * from `oauth_access_tokens` where `id` = '5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:53:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:53:17 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:53:17 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:53:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5c623f8a886ad0abb11ba7becc778b35094db98cddfc3638f18a3f80067bd826c3d855f90c0f823b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:53:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:53:17 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'ho785' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 09:53:28 [1.52ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:53:28 [0.19ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:53:28 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:53:28 [10.4ms] */
update `userprofiles` set `login_count` = 360, `last_login` = '2025-04-13 09:53:28', `userprofiles`.`updated_at` = '2025-04-13 09:53:28' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:53:28 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:53:28 [0.76ms] */
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-04-13 09:53:28 [0.37ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:53:28 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:53:28 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 09:53:28 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 09:53:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:53:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:53:28 [3.36ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7', 1, 5, '[]', 0, '2025-04-13 09:53:28', '2025-04-13 09:53:28', '2026-04-13 09:53:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:53:28 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:53:28 [3.54ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:53:28 [2.04ms] */
select * from `oauth_access_tokens` where `id` = '86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:53:28 [0.17ms] */
select * from `oauth_access_tokens` where `id` = '86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:53:28 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:53:28 [0.21ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:53:28 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '86b0674115fe6844c8e953935c6f76a6fdb669809da961560366e439051a083f9982652fce5b09f7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:53:28 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:53:28 [0.45ms] */
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 `license_plate` = 'ho785' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 09:57:43 [1.44ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:57:43 [0.22ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:57:43 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:57:43 [8.5ms] */
update `userprofiles` set `login_count` = 361, `last_login` = '2025-04-13 09:57:43', `userprofiles`.`updated_at` = '2025-04-13 09:57:43' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:57:43 [0.28ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:57:43 [0.65ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 09:57:43 [0.22ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:57:43 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:57:43 [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-04-13 09:57:43 [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-04-13 09:57:43 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:57:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:57:43 [3.74ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd', 1, 5, '[]', 0, '2025-04-13 09:57:43', '2025-04-13 09:57:43', '2026-04-13 09:57:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:57:43 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:57:43 [3.28ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:57:43 [2.19ms] */
select * from `oauth_access_tokens` where `id` = '687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:57:43 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:57:43 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:57:43 [0.3ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:57:43 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '687250db6a9463e3ebdf607bf5e97ba93aeedb07f14f72effc035190513c95270b523c381b85bebd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:57:43 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:57:43 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'ho785' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 09:59:09 [1.43ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 09:59:09 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 09:59:09 [1.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 09:59:09 [20.36ms] */
update `userprofiles` set `login_count` = 362, `last_login` = '2025-04-13 09:59:09', `userprofiles`.`updated_at` = '2025-04-13 09:59:09' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 09:59:09 [0.45ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 09:59:09 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 09:59:09 [0.38ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 09:59:09 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 09:59: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-04-13 09:59:09 [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-04-13 09:59:09 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 09:59:09 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 09:59:09 [4.9ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9', 1, 5, '[]', 0, '2025-04-13 09:59:09', '2025-04-13 09:59:09', '2026-04-13 09:59:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 09:59:09 [0.49ms] */
select * from `oauth_access_tokens` where `id` = '16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 09:59:09 [3.38ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 09:59:09 [2.4ms] */
select * from `oauth_access_tokens` where `id` = '16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 09:59:09 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 09:59:09 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 09:59:09 [0.33ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 09:59:09 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '16439fbd4e87ccdd97f30f501673bf4ad9ab26e1183add465d690ec9dde9790cc94d7fc2744ccdd9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 09:59:09 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 09:59:09 [2.37ms] */
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 `license_plate` = 'Sf258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:00:14 [1.37ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:00:14 [0.18ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:00:14 [0.56ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:00:14 [11.68ms] */
update `userprofiles` set `login_count` = 363, `last_login` = '2025-04-13 10:00:14', `userprofiles`.`updated_at` = '2025-04-13 10:00:14' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:00:14 [0.3ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:00:14 [0.62ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:00:14 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:00:14 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:00:14 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 10:00:14 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 10:00:14 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:00:14 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:00:14 [4.44ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d', 1, 5, '[]', 0, '2025-04-13 10:00:14', '2025-04-13 10:00:14', '2026-04-13 10:00:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:00:14 [0.63ms] */
select * from `oauth_access_tokens` where `id` = '43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:00:14 [4.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:00:14 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:00:14 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:00:14 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:00:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '43a69f4a29c182db67ed0b58d2ff531752d997f2698f2e28b06824dcbd0e207895407ad90cfe924d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:00:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:00:14 [13.08ms] */
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 `license_plate` = 'SF258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:33:41 [1.96ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:33:41 [0.23ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:33:41 [0.29ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:33:41 [11.31ms] */
update `userprofiles` set `login_count` = 364, `last_login` = '2025-04-13 10:33:41', `userprofiles`.`updated_at` = '2025-04-13 10:33:41' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:33:41 [0.48ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:33:41 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:33:41 [2.09ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:33:41 [0.37ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:33:41 [0.25ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 10:33:41 [0.84ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 10:33:41 [0.37ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:33:41 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:33:41 [3.73ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147', 1, 5, '[]', 0, '2025-04-13 10:33:41', '2025-04-13 10:33:41', '2026-04-13 10:33:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:33:41 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:33:41 [2.94ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:33:41 [2.15ms] */
select * from `oauth_access_tokens` where `id` = '5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:33:41 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:33:41 [0.43ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:33:41 [0.49ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:33:41 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5dcaf71f731379f2d5562a89d115fb3ea4fd4280fa07eee9a5cd604e36fc0e06602ceb6404404147' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:33:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:33:41 [6.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Sf258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:34:44 [1.36ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:34:44 [0.29ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:34:44 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:34:44 [11.72ms] */
update `userprofiles` set `login_count` = 365, `last_login` = '2025-04-13 10:34:44', `userprofiles`.`updated_at` = '2025-04-13 10:34:44' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:34:44 [0.32ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:34:44 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:34:44 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:34:44 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:34:44 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 10:34:44 [0.24ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 10:34:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:34:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:34:44 [7.68ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e', 1, 5, '[]', 0, '2025-04-13 10:34:44', '2025-04-13 10:34:44', '2026-04-13 10:34:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:34:44 [0.38ms] */
select * from `oauth_access_tokens` where `id` = 'b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:34:44 [6.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:34:44 [1.4ms] */
select * from `oauth_access_tokens` where `id` = 'b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:34:44 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:34:44 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:34:44 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:34:44 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b897c6a8598b3013da7921511da6633bb9953eb67af0ea96dfed10ffa1b06668bbf23b580df3a35e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:34:44 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:34:44 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Sf258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:35:16 [1.37ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:35:16 [0.33ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:35:16 [0.81ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:35:16 [10.99ms] */
update `userprofiles` set `login_count` = 366, `last_login` = '2025-04-13 10:35:16', `userprofiles`.`updated_at` = '2025-04-13 10:35:16' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:35:16 [0.33ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:35:16 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:35:16 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:35:16 [0.68ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:35:16 [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-04-13 10:35:16 [0.17ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 10:35:16 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:35:16 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:35:16 [4.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966', 1, 5, '[]', 0, '2025-04-13 10:35:16', '2025-04-13 10:35:16', '2026-04-13 10:35:16');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:35:16 [0.69ms] */
select * from `oauth_access_tokens` where `id` = 'f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:35:16 [3.31ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:35:16 [1.44ms] */
select * from `oauth_access_tokens` where `id` = 'f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:35:16 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:35:16 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:35:16 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:35:16 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'f0873909c4035161cdb4c83a8a6bf18795b7e7b590382f2abd196990dc4e9a512d96ac22f76a0966' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:35:16 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:35:16 [9.26ms] */
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 `license_plate` = 'Lg563' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:36:41 [1.8ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:36:41 [0.28ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:36:41 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:36:41 [3.38ms] */
update `userprofiles` set `login_count` = 367, `last_login` = '2025-04-13 10:36:41', `userprofiles`.`updated_at` = '2025-04-13 10:36:41' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:36:41 [0.17ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:36:41 [0.5ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:36:41 [0.33ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:36:41 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:36:41 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 10:36:41 [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-04-13 10:36:41 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:36:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:36:41 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348', 1, 5, '[]', 0, '2025-04-13 10:36:41', '2025-04-13 10:36:41', '2026-04-13 10:36:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:36:41 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:36:41 [2.65ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:36:41 [1.44ms] */
select * from `oauth_access_tokens` where `id` = '0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:36:41 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:36:41 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:36:41 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:36:41 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '0426f0528989c3cc6530cbe18bd2820145c5917f03ecabc2e3efed5eadcf175824b81c6bd5d36348' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:36:41 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:36:41 [3.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Bw187' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 10:37:18 [1.37ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 10:37:18 [0.29ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 10:37:18 [0.71ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 10:37:18 [7ms] */
update `userprofiles` set `login_count` = 368, `last_login` = '2025-04-13 10:37:18', `userprofiles`.`updated_at` = '2025-04-13 10:37:18' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 10:37:18 [0.2ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 10:37:18 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 10:37:18 [0.21ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 10:37:18 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 10:37:18 [0.1ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 10:37:18 [0.13ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 10:37:18 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 10:37:18 [0.11ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 10:37:18 [4.55ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b', 1, 5, '[]', 0, '2025-04-13 10:37:18', '2025-04-13 10:37:18', '2026-04-13 10:37:18');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 10:37:18 [0.45ms] */
select * from `oauth_access_tokens` where `id` = 'c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 10:37:18 [3.61ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 10:37:18 [1.62ms] */
select * from `oauth_access_tokens` where `id` = 'c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 10:37:18 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 10:37:18 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 10:37:18 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 10:37:18 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'c4157179afa8440e275e36ec058a5e8c667aac39dc83b00968889e0e4e01054090ca36b63e908a1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 10:37:18 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 10:37:18 [4.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'SF258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:00:08 [2.14ms] */
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-04-13 11:00:08 [0.38ms] */
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-04-13 11:00:08 [0.87ms] */
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-04-13 11:00:08 [6.54ms] */
update `userprofiles` set `login_count` = 1871, `last_login` = '2025-04-13 11:00:08', `userprofiles`.`updated_at` = '2025-04-13 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:00:08 [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-04-13 11:00:08 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:00:08 [0.88ms] */
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-04-13 11:00:08 [0.84ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:00:08 [0.31ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:00:08 [0.34ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:00:08 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:00:08 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:00:08 [3.79ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd', 154, 5, '[]', 0, '2025-04-13 11:00:08', '2025-04-13 11:00:08', '2026-04-13 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:00:08 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:00:08 [3.48ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:00:08 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:00:08 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:00:08 [0.32ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:00:08 [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-04-13 11:00:08 [0.17ms] */
select * from `oauth_access_tokens` where `id` = '9412cc2a7737a33d0b405ea71a0c80884a5badc556fd354f6d5d5dbe5df9cb21c2101d6673c40afd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:00:08 [8.7ms] */
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-04-13 11:00:08 [1.5ms] */
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-04-13 11:00:08 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:00:08 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-04-13 11:00:08 [6.12ms] */
update `userprofiles` set `login_count` = 1872, `userprofiles`.`updated_at` = '2025-04-13 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:00:08 [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-04-13 11:00:08 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:00:08 [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-04-13 11:00:08 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:00:08 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:00:08 [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-04-13 11:00:08 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:00:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:00:08 [3.7ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857', 154, 5, '[]', 0, '2025-04-13 11:00:08', '2025-04-13 11:00:08', '2026-04-13 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:00:08 [0.45ms] */
select * from `oauth_access_tokens` where `id` = '53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:00:08 [3.52ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:00:08 [2.13ms] */
select * from `oauth_access_tokens` where `id` = '53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:00:08 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 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-04-13 11:00:08 [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-04-13 11:00:08 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '53e80d9f3adfa7406485a2e9a7a4bb4c331fa10b3b2c6e2dc887318152974d88db9d1d6b18a79857' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:00:08 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:00:08 [3.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:08:28 [2.13ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:08:28 [0.47ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:08:28 [0.32ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:08:28 [12.14ms] */
update `userprofiles` set `login_count` = 369, `last_login` = '2025-04-13 11:08:28', `userprofiles`.`updated_at` = '2025-04-13 11:08:28' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:08:28 [0.38ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:08:28 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:08:28 [0.79ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:08:28 [1.29ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:08:28 [0.24ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:08:28 [0.98ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:08:28 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:08:28 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:08:28 [4.53ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af', 1, 5, '[]', 0, '2025-04-13 11:08:28', '2025-04-13 11:08:28', '2026-04-13 11:08:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:08:28 [0.41ms] */
select * from `oauth_access_tokens` where `id` = '0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:08:28 [3.8ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:08:28 [1.68ms] */
select * from `oauth_access_tokens` where `id` = '0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:08:28 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:08:28 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:08:28 [0.32ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:08:28 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '0e08a18ee55a97469dfc9199760b52881fda26783187edfffe6dfd6af93d1a430618ee4845fef8af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:08:28 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:08:28 [11.54ms] */
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 `license_plate` = 'Sf258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:08:39 [1.22ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:08:39 [0.26ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:08:39 [0.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:08:39 [12.02ms] */
update `userprofiles` set `login_count` = 370, `last_login` = '2025-04-13 11:08:39', `userprofiles`.`updated_at` = '2025-04-13 11:08:39' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:08:39 [0.25ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:08:39 [0.47ms] */
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-04-13 11:08:39 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:08:39 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:08:39 [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-04-13 11:08:39 [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-04-13 11:08:39 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:08:39 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:08:39 [4.97ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2', 1, 5, '[]', 0, '2025-04-13 11:08:39', '2025-04-13 11:08:39', '2026-04-13 11:08:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:08:39 [0.47ms] */
select * from `oauth_access_tokens` where `id` = 'bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:08:39 [3.6ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:08:39 [1.55ms] */
select * from `oauth_access_tokens` where `id` = 'bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:08:39 [0.2ms] */
select * from `oauth_access_tokens` where `id` = 'bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:08:39 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:08:39 [0.21ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:08:39 [0.18ms] */
select * from `oauth_access_tokens` where `id` = 'bae1367058643b48b20f00b24ec8fded53d724f3aff094be0f6f1e56a492446dc12376a373433ce2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:08:39 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:08:39 [9.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 `license_plate` = 'Lg563' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:08:50 [1.33ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:08:50 [0.2ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:08:50 [0.97ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:08:50 [6.41ms] */
update `userprofiles` set `login_count` = 371, `last_login` = '2025-04-13 11:08:50', `userprofiles`.`updated_at` = '2025-04-13 11:08:50' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:08:50 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:08:50 [0.48ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:08:50 [1.02ms] */
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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:08:50 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:08:50 [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-04-13 11:08:50 [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-04-13 11:08:50 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:08:50 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:08:50 [6.2ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161', 1, 5, '[]', 0, '2025-04-13 11:08:50', '2025-04-13 11:08:50', '2026-04-13 11:08:50');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:08:50 [0.85ms] */
select * from `oauth_access_tokens` where `id` = '69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:08:50 [2.96ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:08:50 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:08:50 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:08:50 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:08:50 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:08:50 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '69a77d9b710c86dcf470d5b52d3c140f7a85fdf11d6a865e8a5414444a6a0a323982c6f6e4a0f161' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:08:50 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:08:50 [4.63ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Bw187' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:09:14 [1.39ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:09:14 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:09:14 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:09:14 [11.53ms] */
update `userprofiles` set `login_count` = 372, `last_login` = '2025-04-13 11:09:14', `userprofiles`.`updated_at` = '2025-04-13 11:09:14' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:09:14 [0.35ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:09:14 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:09:14 [0.33ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:09:14 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:09:14 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:09:14 [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-04-13 11:09:14 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:09:14 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:09:14 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c', 1, 5, '[]', 0, '2025-04-13 11:09:14', '2025-04-13 11:09:14', '2026-04-13 11:09:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:09:14 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:09:14 [3.33ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:09:14 [2.21ms] */
select * from `oauth_access_tokens` where `id` = '71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:09:14 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:09:14 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:09:14 [0.24ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:09:14 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '71a2bf3cf646b95f18000b17d4a59f0aefa538d37e29cf762ba0c11ae079380aa0d30ee7f71a187c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:09:14 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:09:14 [2.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 `license_plate` = 'BW187' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:13:18 [1.76ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:13:18 [0.3ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:13:18 [1.7ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:13:18 [7.16ms] */
update `userprofiles` set `login_count` = 373, `last_login` = '2025-04-13 11:13:18', `userprofiles`.`updated_at` = '2025-04-13 11:13:18' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:13:18 [0.3ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:13:18 [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-04-13 11:13:18 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:13:18 [0.28ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:13:18 [0.26ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:13:18 [0.29ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:13:18 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:13:18 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:13:18 [5.45ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd', 1, 5, '[]', 0, '2025-04-13 11:13:18', '2025-04-13 11:13:18', '2026-04-13 11:13:18');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:13:18 [0.6ms] */
select * from `oauth_access_tokens` where `id` = '50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:13:18 [4.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:13:18 [1.61ms] */
select * from `oauth_access_tokens` where `id` = '50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:13:18 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:13:18 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:13:18 [0.21ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:13:18 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '50533cfb196c2c272e2b2575bb7fb140f80d1bcf9c8afd1e89a7067c3e5433f964d020ba2521bbcd' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:13:18 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:13:18 [6.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 `license_plate` = 'LG563' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:13:32 [1.37ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:13:32 [0.27ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:13:32 [0.74ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:13:32 [10.99ms] */
update `userprofiles` set `login_count` = 374, `last_login` = '2025-04-13 11:13:32', `userprofiles`.`updated_at` = '2025-04-13 11:13:32' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:13:32 [7.37ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:13:32 [0.51ms] */
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-04-13 11:13:32 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:13:32 [0.15ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:13:32 [4.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:13:32 [0.17ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:13:32 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:13:32 [0.11ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:13:32 [4.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307', 1, 5, '[]', 0, '2025-04-13 11:13:32', '2025-04-13 11:13:32', '2026-04-13 11:13:32');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:13:32 [2.79ms] */
select * from `oauth_access_tokens` where `id` = '8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:13:32 [3.19ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:13:32 [1.53ms] */
select * from `oauth_access_tokens` where `id` = '8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:13:32 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:13:32 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:13:32 [0.18ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:13:32 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8186b336e5b9616f44dc4e8dc8fe55420c18151b68926bf213c03a524fb112fba74dd9cada962307' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:13:32 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:13:32 [10.65ms] */
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 `license_plate` = 'SF258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:15:56 [1.38ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:15:56 [0.18ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:15:56 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:15:56 [5.59ms] */
update `userprofiles` set `login_count` = 375, `last_login` = '2025-04-13 11:15:56', `userprofiles`.`updated_at` = '2025-04-13 11:15:56' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:15:56 [0.16ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:15:56 [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-04-13 11:15:56 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:15:56 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:15:56 [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-04-13 11:15:56 [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-04-13 11:15:56 [0.35ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:15:56 [0.33ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:15:56 [4.51ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62', 1, 5, '[]', 0, '2025-04-13 11:15:56', '2025-04-13 11:15:56', '2026-04-13 11:15:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:15:56 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:15:56 [3.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:15:56 [1.46ms] */
select * from `oauth_access_tokens` where `id` = '5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:15:56 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:15:56 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:15:56 [0.25ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:15:56 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '5bd3348cf674a3901d3dac6334ff7aaeee316a96f92fdf2989f8a0c58e8c2a50e4d9e4bfb6c41b62' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:15:56 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:15:56 [2.11ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Bw187' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:16:21 [1.34ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:16:21 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:16:21 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:16:21 [6.07ms] */
update `userprofiles` set `login_count` = 376, `last_login` = '2025-04-13 11:16:21', `userprofiles`.`updated_at` = '2025-04-13 11:16:21' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:16:21 [0.16ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:16:21 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:16:21 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:16:21 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:16:21 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:16:21 [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-04-13 11:16:21 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:16:21 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:16:21 [3.26ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b', 1, 5, '[]', 0, '2025-04-13 11:16:21', '2025-04-13 11:16:21', '2026-04-13 11:16:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:16:21 [0.38ms] */
select * from `oauth_access_tokens` where `id` = 'a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:16:21 [3.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:16:21 [2.19ms] */
select * from `oauth_access_tokens` where `id` = 'a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:16:21 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:16:21 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:16:21 [0.3ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:16:21 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'a172a397ff606b641dcc13244d10bfdf8559df9ff26a38680dca757ec64353260820fd096d9d114b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:16:21 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:16:21 [1.46ms] */
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 `license_plate` = 'BW187' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:19:11 [1.4ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:19:11 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:19:11 [2.98ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:19:11 [9.28ms] */
update `userprofiles` set `login_count` = 377, `last_login` = '2025-04-13 11:19:11', `userprofiles`.`updated_at` = '2025-04-13 11:19:11' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:19:11 [0.32ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:19:11 [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-04-13 11:19:11 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:19:11 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:19:11 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:19: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-04-13 11:19:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:19:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:19:11 [5.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4', 1, 5, '[]', 0, '2025-04-13 11:19:11', '2025-04-13 11:19:11', '2026-04-13 11:19:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:19:11 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:19:11 [7.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:19:11 [1.46ms] */
select * from `oauth_access_tokens` where `id` = '71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:19:11 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:19:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:19:11 [0.18ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:19:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '71af9634899518f548774f1a068c6bb8f29f6de40e05e50d50a6232ca8e8115f2057dbcd201b23d4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:19:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:19:11 [0.71ms] */
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 `license_plate` = 'ywyw' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:26:25 [1.32ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:26:25 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:26:25 [1.53ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:26:25 [13.41ms] */
update `userprofiles` set `login_count` = 378, `last_login` = '2025-04-13 11:26:25', `userprofiles`.`updated_at` = '2025-04-13 11:26:25' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:26:25 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:26:25 [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-04-13 11:26:25 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:26:25 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:26:25 [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-04-13 11:26:25 [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-04-13 11:26:25 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:26:25 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:26:25 [6.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04', 1, 5, '[]', 0, '2025-04-13 11:26:25', '2025-04-13 11:26:25', '2026-04-13 11:26:25');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:26:25 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:26:25 [3.45ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:26:26 [1.4ms] */
select * from `oauth_access_tokens` where `id` = '7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:26:26 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:26:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:26:26 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:26:26 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7680e8b2d1313368fc83f2227c8018a600410853e4dc6327f65554510d19afa85b9eff6283ed4b04' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:26:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:26:26 [1.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 `license_plate` = 'BW187d' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:32:03 [2.65ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:32:03 [0.19ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:32:03 [0.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:32:03 [9ms] */
update `userprofiles` set `login_count` = 379, `last_login` = '2025-04-13 11:32:03', `userprofiles`.`updated_at` = '2025-04-13 11:32:03' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:32:03 [0.26ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:32:03 [0.65ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:32:03 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:32: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-04-13 11:32: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-04-13 11:32:03 [0.13ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:32:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:32:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:32:03 [3.13ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43', 1, 5, '[]', 0, '2025-04-13 11:32:03', '2025-04-13 11:32:03', '2026-04-13 11:32:03');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:32:03 [0.34ms] */
select * from `oauth_access_tokens` where `id` = '168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:32:03 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:32:03 [1.32ms] */
select * from `oauth_access_tokens` where `id` = '168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:32:03 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:32:03 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:32:03 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:32:03 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '168096f1917d0bfd89faa9200f779d899515a63fa9d5ccd10dfd5b34a231548785d79d388a858e43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:32:03 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:32:03 [1.62ms] */
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 `license_plate` = 'Sf258' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:43:02 [2.08ms] */
select * from `users` where `email` = 'admin@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:43:02 [0.43ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:43:02 [0.29ms] */
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/api/login
   Query 4 - 2025-04-13 11:43:02 [14.76ms] */
update `userprofiles` set `last_ip` = '152.59.243.111', `login_count` = 560, `last_login` = '2025-04-13 11:43:02', `userprofiles`.`updated_at` = '2025-04-13 11:43:02' where `id` = 2;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:43:02 [10.14ms] */
select * from `users` where `email` = 'admin@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:43:02 [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-04-13 11:43:02 [0.6ms] */
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 (2) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:43:02 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:43:02 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:43:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 11:43:02 [2.59ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:43:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:43:02 [3.32ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97', 2, 5, '[]', 0, '2025-04-13 11:43:02', '2025-04-13 11:43:02', '2026-04-13 11:43:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:43:02 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:43:02 [2.77ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:44:33 [2.35ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:44:33 [0.21ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:44:33 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:44:33 [0.56ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:44:33 [0.22ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:44:33 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:44:33 [2.76ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Awq423' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:58:08 [1.34ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:58:08 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:58:08 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:58:08 [3.91ms] */
update `userprofiles` set `last_ip` = '101.190.182.230', `login_count` = 380, `last_login` = '2025-04-13 11:58:08', `userprofiles`.`updated_at` = '2025-04-13 11:58:08' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:58:08 [0.16ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:58:08 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 11:58:08 [0.34ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:58: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-04-13 11:58:08 [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-04-13 11:58: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-04-13 11:58:08 [0.32ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:58:08 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:58:08 [3.67ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac', 1, 5, '[]', 0, '2025-04-13 11:58:08', '2025-04-13 11:58:08', '2026-04-13 11:58:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:58:08 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:58:08 [3.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:58:09 [2.42ms] */
select * from `oauth_access_tokens` where `id` = '649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:58:09 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:58:09 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:58:09 [0.2ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:58:09 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '649d5942115e65cd25ce241d235165e93b0ac893d874707f502ac945bcc02c2824f9beb3e0ab9eac' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:58:09 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:58:09 [0.67ms] */
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 `license_plate` = 1232132 and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 11:59:34 [2.11ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 11:59:34 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 11:59:34 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 11:59:34 [9.36ms] */
update `userprofiles` set `login_count` = 381, `last_login` = '2025-04-13 11:59:34', `userprofiles`.`updated_at` = '2025-04-13 11:59:34' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 11:59:34 [0.26ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 11:59:34 [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-04-13 11:59:34 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 11:59:34 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 11:59:34 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 11:59:34 [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-04-13 11:59:34 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 11:59:34 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 11:59:34 [3.66ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d', 1, 5, '[]', 0, '2025-04-13 11:59:34', '2025-04-13 11:59:34', '2026-04-13 11:59:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 11:59:34 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 11:59:34 [3.26ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 11:59:35 [1.75ms] */
select * from `oauth_access_tokens` where `id` = 'b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 11:59:35 [0.18ms] */
select * from `oauth_access_tokens` where `id` = 'b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 11:59:35 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 11:59:35 [0.22ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 11:59:35 [0.19ms] */
select * from `oauth_access_tokens` where `id` = 'b11f8e7e205a6d17de3c730d41ccc9c8113e8722a2e49f7b5240f22288766541bc4bfebd0014932d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 11:59:35 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 11:59:35 [0.56ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 1232132 and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:00:04 [2.38ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:00:04 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:00:04 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:00:04 [6.12ms] */
update `userprofiles` set `login_count` = 382, `last_login` = '2025-04-13 12:00:04', `userprofiles`.`updated_at` = '2025-04-13 12:00:04' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:00:04 [0.24ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:00:04 [0.63ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:00:04 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:00:04 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:00:04 [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-04-13 12:00:04 [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-04-13 12:00:04 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:00:04 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:00:04 [3.35ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8', 1, 5, '[]', 0, '2025-04-13 12:00:04', '2025-04-13 12:00:04', '2026-04-13 12:00:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:00:04 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:00:04 [3.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:00:05 [1.67ms] */
select * from `oauth_access_tokens` where `id` = '01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:00:05 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:00:05 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:00:05 [0.21ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:00:05 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '01588228294caa1c9a11d7daf845bf9822a9eabbcb4b88aa0e0ba90056be5c6157c41ccae20d94f8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:00:05 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:00:05 [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 `license_plate` = 'LIC001' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:00:22 [2.36ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:00:22 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:00:22 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:00:22 [9.95ms] */
update `userprofiles` set `login_count` = 383, `last_login` = '2025-04-13 12:00:22', `userprofiles`.`updated_at` = '2025-04-13 12:00:22' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:00:22 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:00:22 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:00:22 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:00:22 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:00:22 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:00:22 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 12:00:22 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:00:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:00:22 [3.06ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f', 1, 5, '[]', 0, '2025-04-13 12:00:22', '2025-04-13 12:00:22', '2026-04-13 12:00:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:00:22 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:00:22 [2.8ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:00:22 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:00:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:00:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:00:22 [0.25ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:00:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5ac8c4bad2d29f352ac2d34fc0888b9d2778ad59ad9065bfb328a1d46b4bfbb7018312bdb180107f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:00:22 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:00:22 [0.88ms] */
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 `license_plate` = 28726 and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:00:36 [1.46ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:00:36 [0.26ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:00:36 [0.78ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:00:36 [7.79ms] */
update `userprofiles` set `login_count` = 384, `last_login` = '2025-04-13 12:00:36', `userprofiles`.`updated_at` = '2025-04-13 12:00:36' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:00:36 [0.23ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:00:36 [0.45ms] */
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-04-13 12:00:36 [0.2ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:00:36 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:00:36 [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-04-13 12:00:36 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 12:00:36 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:00:36 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:00:36 [4.27ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee', 1, 5, '[]', 0, '2025-04-13 12:00:36', '2025-04-13 12:00:36', '2026-04-13 12:00:36');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:00:36 [0.46ms] */
select * from `oauth_access_tokens` where `id` = '4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:00:36 [4.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:00:36 [1.92ms] */
select * from `oauth_access_tokens` where `id` = '4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:00:36 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:00:36 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:00:36 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:00:36 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4a520df6b7e18eb491bf51f58f9e312e2364930110ecf5422b04da4c2aed1b80354b16541106f2ee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:00:36 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:00:36 [3.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'RO218' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:04:18 [2.28ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:04:18 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:04:18 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:04:18 [0.2ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:04:18 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:04:18 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:05:12 [1.32ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:05:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:05:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:05:12 [0.17ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:05:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:05:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:05:12 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'Awq423' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:06:17 [1.87ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:06:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:06:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:06:17 [0.16ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:06:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bdc42f811cc2630f0db6261c64be0f07c7825ed3dad09c53f79ef0d69e85d89fd28ea8cd8bb58e97' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:06:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:06:17 [8.97ms] */
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 `license_plate` = 'SF258' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:10:15 [1.69ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:10:15 [0.17ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:10:15 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:10:15 [9.47ms] */
update `userprofiles` set `login_count` = 385, `last_login` = '2025-04-13 12:10:15', `userprofiles`.`updated_at` = '2025-04-13 12:10:15' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:10:15 [0.25ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:10:15 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:10:15 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:10:15 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:10:15 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:10:15 [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-04-13 12:10:15 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:10:15 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:10:15 [3.3ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6', 1, 5, '[]', 0, '2025-04-13 12:10:15', '2025-04-13 12:10:15', '2026-04-13 12:10:15');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:10:15 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:10:15 [2.91ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:10:16 [1.71ms] */
select * from `oauth_access_tokens` where `id` = '2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:10:16 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:10:16 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:10:16 [0.27ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:10:16 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '2c6fe3349c7486fd318b09982416c5d2504153e910077db2b0a9b530e10b92eb67250d3f902f41e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:10:16 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:10:16 [0.5ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'RO218' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:11:40 [2.1ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:11:40 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:11:40 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:11:40 [11.15ms] */
update `userprofiles` set `login_count` = 386, `last_login` = '2025-04-13 12:11:40', `userprofiles`.`updated_at` = '2025-04-13 12:11:40' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:11:40 [0.32ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:11:40 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:11:40 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:11:40 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:11:40 [0.23ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:11:40 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 12:11:40 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:11:40 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:11:40 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8', 1, 5, '[]', 0, '2025-04-13 12:11:40', '2025-04-13 12:11:40', '2026-04-13 12:11:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:11:40 [0.44ms] */
select * from `oauth_access_tokens` where `id` = 'd77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:11:40 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:11:41 [1.68ms] */
select * from `oauth_access_tokens` where `id` = 'd77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:11:41 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'd77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:11:41 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:11:41 [0.26ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:11:41 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'd77a277a124e53890b2633c4de9f36e9ce3c18f7bd6f38057bd24a60757d8fec20d0dec0097482c8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:11:41 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:11:41 [1.04ms] */
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 `license_plate` = 2323213 and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:11:51 [2.36ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:11:51 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:11:51 [0.31ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:11:51 [11.02ms] */
update `userprofiles` set `login_count` = 387, `last_login` = '2025-04-13 12:11:51', `userprofiles`.`updated_at` = '2025-04-13 12:11:51' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:11:51 [0.31ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:11:51 [0.74ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:11:51 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:11:51 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:11:51 [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-04-13 12:11:51 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 12:11:51 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:11:51 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:11:51 [3.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178', 1, 5, '[]', 0, '2025-04-13 12:11:51', '2025-04-13 12:11:51', '2026-04-13 12:11:51');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:11:51 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'd9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:11:51 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:11:52 [1.45ms] */
select * from `oauth_access_tokens` where `id` = 'd9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:11:52 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:11:52 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:11:52 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:11:52 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd9e9bf6d27ca939c4b57ed2f785c23ab55d0329af4db4165139104b7ef02d6538fab4ab55edfe178' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:11:52 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:11:52 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 28726 and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 1 - 2025-04-13 12:12:09 [1.51ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `status` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 2 - 2025-04-13 12:12:09 [0.25ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 3 - 2025-04-13 12:12:09 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:12:09 [2.91ms] */
update `userprofiles` set `login_count` = 388, `last_login` = '2025-04-13 12:12:09', `userprofiles`.`updated_at` = '2025-04-13 12:12:09' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 5 - 2025-04-13 12:12:09 [0.45ms] */
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-04-13 12:12:09 [0.42ms] */
select * from `permissions`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 7 - 2025-04-13 12:12:09 [0.34ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 8 - 2025-04-13 12:12:09 [1ms] */
select `roles`.*, `role_has_permissions`.`permission_id` as `pivot_permission_id`, `role_has_permissions`.`role_id` as `pivot_role_id` from `roles` inner join `role_has_permissions` on `roles`.`id` = `role_has_permissions`.`role_id` where `role_has_permissions`.`permission_id` in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94);
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 9 - 2025-04-13 12:12:09 [0.46ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 10 - 2025-04-13 12:12:09 [0.35ms] */
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-04-13 12:12:10 [29.02ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 2 - 2025-04-13 12:12:10 [4.94ms] */
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-04-13 12:12:10 [0.54ms] */
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-04-13 12:12:10 [5.31ms] */
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-04-13 12:12:10 [29.41ms] */
select count(*) as aggregate from `party` where `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 6 - 2025-04-13 12:12:10 [31.87ms] */
select count(*) as aggregate from `party` where `created_at` > '2025-04-13' and `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 7 - 2025-04-13 12:12:10 [160.62ms] */
select count(*) as aggregate from `vehicle` where `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 8 - 2025-04-13 12:12:10 [35.02ms] */
select count(*) as aggregate from `vehicle` where `created_at` > '2025-04-13' and `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-04-13 12:12:10 [205.79ms] */
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-04-12' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 10 - 2025-04-13 12:12:10 [49.23ms] */
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-04-12' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-04-13 12:12:11 [410.56ms] */
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-04-13' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-04-13 12:12:12 [1150.94ms] */
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-04-13' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 13 - 2025-04-13 12:12:12 [0.69ms] */
select * from `district` where `district`.`id` = 37 and `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 14 - 2025-04-13 12:12:12 [1.12ms] */
select * from `region` where `region`.`id` = 7 and `region`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 1 - 2025-04-13 12:12:15 [1.44ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 2 - 2025-04-13 12:12:15 [0.76ms] */
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/service/tax/list
   Query 3 - 2025-04-13 12:12:15 [0.46ms] */
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/service/tax/list
   Query 4 - 2025-04-13 12:12:15 [0.38ms] */
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/service/tax/list
   Query 5 - 2025-04-13 12:12:16 [1014.57ms] */
select count(*) as aggregate from `vehicle` inner join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` where `vehicle`.`id` in (select `vehicle_tax`.`vehicle_id` from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`status` = 'OPEN' and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:15') and `ban_status` = 'GOOD_STANDING' and `party_vehicle`.`is_owner` = 'Y' and `party_vehicle`.`provisional` = 'N' and `vehicle`.`provisional` = 'N' and `party_vehicle`.`status` = 'REGISTERED' and `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 6 - 2025-04-13 12:12:17 [735.47ms] */
select `vehicle`.* from `vehicle` inner join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` where `vehicle`.`id` in (select `vehicle_tax`.`vehicle_id` from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`status` = 'OPEN' and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:15') and `ban_status` = 'GOOD_STANDING' and `party_vehicle`.`is_owner` = 'Y' and `party_vehicle`.`provisional` = 'N' and `vehicle`.`provisional` = 'N' and `party_vehicle`.`status` = 'REGISTERED' and `vehicle`.`deleted_at` is null order by `updated_at` desc limit 10 offset 0;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 7 - 2025-04-13 12:12:17 [0.37ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 10 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 8 - 2025-04-13 12:12:17 [0.3ms] */
select * from `party_vehicle` where `vehicle_id` = 10 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 9 - 2025-04-13 12:12:17 [0.39ms] */
select * from `party` where `party`.`id` = 36537 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 10 - 2025-04-13 12:12:17 [0.52ms] */
select * from `person` where `person`.`id` = 36537 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 11 - 2025-04-13 12:12:17 [0.32ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 12 - 2025-04-13 12:12:17 [0.3ms] */
select * from `sub_category` where `sub_category`.`id` = 4 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 13 - 2025-04-13 12:12:17 [0.36ms] */
select * from `model` where `model`.`id` = 1 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 14 - 2025-04-13 12:12:17 [0.33ms] */
select * from `make` where `make`.`id` = 1 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 15 - 2025-04-13 12:12:17 [0.51ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 1 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 16 - 2025-04-13 12:12:17 [0.74ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 10 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 17 - 2025-04-13 12:12:17 [0.27ms] */
select * from `term` where `term`.`id` = 93 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 18 - 2025-04-13 12:12:17 [0.24ms] */
select * from `term` where `term`.`id` = 94 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 19 - 2025-04-13 12:12:17 [0.28ms] */
select * from `term` where `term`.`id` = 95 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 20 - 2025-04-13 12:12:17 [0.25ms] */
select * from `term` where `term`.`id` = 96 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 21 - 2025-04-13 12:12:17 [0.25ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 22 - 2025-04-13 12:12:17 [0.26ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 23 - 2025-04-13 12:12:17 [0.28ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 24 - 2025-04-13 12:12:17 [0.3ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 25 - 2025-04-13 12:12:17 [0.29ms] */
select * from `term` where `term`.`id` = 103 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 26 - 2025-04-13 12:12:17 [0.29ms] */
select * from `term` where `term`.`id` = 104 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 27 - 2025-04-13 12:12:17 [0.39ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 89136 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 28 - 2025-04-13 12:12:17 [0.38ms] */
select * from `party_vehicle` where `vehicle_id` = 89136 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 29 - 2025-04-13 12:12:17 [0.36ms] */
select * from `party` where `party`.`id` = 31526 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 30 - 2025-04-13 12:12:17 [0.36ms] */
select * from `person` where `person`.`id` = 31526 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 31 - 2025-04-13 12:12:17 [0.2ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 32 - 2025-04-13 12:12:17 [0.2ms] */
select * from `sub_category` where `sub_category`.`id` = 4 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 33 - 2025-04-13 12:12:17 [0.31ms] */
select * from `model` where `model`.`id` = 1396 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 34 - 2025-04-13 12:12:17 [7.82ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 35 - 2025-04-13 12:12:17 [0.34ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 20 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 36 - 2025-04-13 12:12:17 [1.13ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 89136 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 37 - 2025-04-13 12:12:17 [0.24ms] */
select * from `term` where `term`.`id` = 95 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 38 - 2025-04-13 12:12:17 [0.22ms] */
select * from `term` where `term`.`id` = 96 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 39 - 2025-04-13 12:12:17 [0.2ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 40 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 41 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 42 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 43 - 2025-04-13 12:12:17 [0.45ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 49090 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 44 - 2025-04-13 12:12:17 [0.49ms] */
select * from `party_vehicle` where `vehicle_id` = 49090 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 45 - 2025-04-13 12:12:17 [0.48ms] */
select * from `party` where `party`.`id` = 60268 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 46 - 2025-04-13 12:12:17 [0.49ms] */
select * from `person` where `person`.`id` = 57787 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 47 - 2025-04-13 12:12:17 [0.18ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 48 - 2025-04-13 12:12:17 [0.42ms] */
select * from `sub_category` where `sub_category`.`id` = 6 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 49 - 2025-04-13 12:12:17 [0.41ms] */
select * from `model` where `model`.`id` = 1300 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 50 - 2025-04-13 12:12:17 [0.17ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 51 - 2025-04-13 12:12:17 [0.15ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 20 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 52 - 2025-04-13 12:12:17 [0.77ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 49090 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 53 - 2025-04-13 12:12:17 [12.37ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 70036 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 54 - 2025-04-13 12:12:17 [0.38ms] */
select * from `party_vehicle` where `vehicle_id` = 70036 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 55 - 2025-04-13 12:12:17 [0.51ms] */
select * from `party` where `party`.`id` = 18303 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 56 - 2025-04-13 12:12:17 [0.32ms] */
select * from `person` where `person`.`id` = 18303 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 57 - 2025-04-13 12:12:17 [0.18ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 58 - 2025-04-13 12:12:17 [0.21ms] */
select * from `sub_category` where `sub_category`.`id` = 5 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 59 - 2025-04-13 12:12:17 [0.24ms] */
select * from `model` where `model`.`id` = 1353 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 60 - 2025-04-13 12:12:17 [0.16ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 61 - 2025-04-13 12:12:17 [0.48ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 24 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 62 - 2025-04-13 12:12:17 [1.69ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 70036 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 63 - 2025-04-13 12:12:17 [0.2ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 64 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 65 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 66 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 67 - 2025-04-13 12:12:17 [0.27ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 73401 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 68 - 2025-04-13 12:12:17 [0.31ms] */
select * from `party_vehicle` where `vehicle_id` = 73401 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 69 - 2025-04-13 12:12:17 [0.3ms] */
select * from `party` where `party`.`id` = 56882 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 70 - 2025-04-13 12:12:17 [0.59ms] */
select * from `company` where `company`.`id` = 1169 and `company`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 71 - 2025-04-13 12:12:17 [0.19ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 72 - 2025-04-13 12:12:17 [0.17ms] */
select * from `sub_category` where `sub_category`.`id` = 5 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 73 - 2025-04-13 12:12:17 [0.16ms] */
select * from `model` where `model`.`id` = 1353 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 74 - 2025-04-13 12:12:17 [0.16ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 75 - 2025-04-13 12:12:17 [0.15ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 24 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 76 - 2025-04-13 12:12:17 [2.78ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 73401 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 77 - 2025-04-13 12:12:17 [0.2ms] */
select * from `term` where `term`.`id` = 96 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 78 - 2025-04-13 12:12:17 [0.17ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 79 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 80 - 2025-04-13 12:12:17 [0.14ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 81 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 82 - 2025-04-13 12:12:17 [0.27ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 77046 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 83 - 2025-04-13 12:12:17 [0.28ms] */
select * from `party_vehicle` where `vehicle_id` = 77046 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 84 - 2025-04-13 12:12:17 [0.36ms] */
select * from `party` where `party`.`id` = 55752 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 85 - 2025-04-13 12:12:17 [0.56ms] */
select * from `company` where `company`.`id` = 39 and `company`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 86 - 2025-04-13 12:12:17 [0.18ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 87 - 2025-04-13 12:12:17 [0.17ms] */
select * from `sub_category` where `sub_category`.`id` = 5 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 88 - 2025-04-13 12:12:17 [0.16ms] */
select * from `model` where `model`.`id` = 1353 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 89 - 2025-04-13 12:12:17 [0.16ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 90 - 2025-04-13 12:12:17 [0.22ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 26 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 91 - 2025-04-13 12:12:17 [1.6ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 77046 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 92 - 2025-04-13 12:12:17 [0.19ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 93 - 2025-04-13 12:12:17 [0.3ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 7 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 94 - 2025-04-13 12:12:17 [0.32ms] */
select * from `party_vehicle` where `vehicle_id` = 7 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 95 - 2025-04-13 12:12:17 [0.26ms] */
select * from `party` where `party`.`id` = 36534 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 96 - 2025-04-13 12:12:17 [0.32ms] */
select * from `person` where `person`.`id` = 36534 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 97 - 2025-04-13 12:12:17 [0.18ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 98 - 2025-04-13 12:12:17 [0.23ms] */
select * from `sub_category` where `sub_category`.`id` = 12 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 99 - 2025-04-13 12:12:17 [0.18ms] */
select * from `model` where `model`.`id` = 1 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 100 - 2025-04-13 12:12:17 [0.16ms] */
select * from `make` where `make`.`id` = 1 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 101 - 2025-04-13 12:12:17 [0.15ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 1 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 102 - 2025-04-13 12:12:17 [0.51ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 7 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 103 - 2025-04-13 12:12:17 [0.19ms] */
select * from `term` where `term`.`id` = 93 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 104 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 94 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 105 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 95 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 106 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 96 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 107 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 108 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 109 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 110 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 111 - 2025-04-13 12:12:17 [0.27ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 51265 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 112 - 2025-04-13 12:12:17 [0.28ms] */
select * from `party_vehicle` where `vehicle_id` = 51265 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 113 - 2025-04-13 12:12:17 [0.59ms] */
select * from `party` where `party`.`id` = 38368 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 114 - 2025-04-13 12:12:17 [0.29ms] */
select * from `person` where `person`.`id` = 38368 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 115 - 2025-04-13 12:12:17 [0.15ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 116 - 2025-04-13 12:12:17 [0.14ms] */
select * from `sub_category` where `sub_category`.`id` = 5 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 117 - 2025-04-13 12:12:17 [0.28ms] */
select * from `model` where `model`.`id` = 1371 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 118 - 2025-04-13 12:12:17 [0.14ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 119 - 2025-04-13 12:12:17 [0.13ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 26 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 120 - 2025-04-13 12:12:17 [1.97ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 51265 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 121 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 122 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 123 - 2025-04-13 12:12:17 [0.25ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 52373 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 124 - 2025-04-13 12:12:17 [0.28ms] */
select * from `party_vehicle` where `vehicle_id` = 52373 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 125 - 2025-04-13 12:12:17 [0.32ms] */
select * from `party` where `party`.`id` = 38053 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 126 - 2025-04-13 12:12:17 [0.64ms] */
select * from `person` where `person`.`id` = 38053 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 127 - 2025-04-13 12:12:17 [0.18ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 128 - 2025-04-13 12:12:17 [0.17ms] */
select * from `sub_category` where `sub_category`.`id` = 4 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 129 - 2025-04-13 12:12:17 [0.26ms] */
select * from `model` where `model`.`id` = 1294 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 130 - 2025-04-13 12:12:17 [0.17ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 131 - 2025-04-13 12:12:17 [0.21ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 8 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 132 - 2025-04-13 12:12:17 [0.85ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 52373 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 133 - 2025-04-13 12:12:17 [0.19ms] */
select * from `term` where `term`.`id` = 93 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 134 - 2025-04-13 12:12:17 [0.18ms] */
select * from `term` where `term`.`id` = 94 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 135 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 95 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 136 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 96 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 137 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 138 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 139 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 140 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 141 - 2025-04-13 12:12:17 [0.26ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 60431 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 142 - 2025-04-13 12:12:17 [0.3ms] */
select * from `party_vehicle` where `vehicle_id` = 60431 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 143 - 2025-04-13 12:12:17 [0.58ms] */
select * from `party` where `party`.`id` = 54682 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 144 - 2025-04-13 12:12:17 [0.61ms] */
select * from `person` where `person`.`id` = 54682 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 145 - 2025-04-13 12:12:17 [0.14ms] */
select * from `classification_type` where `classification_type`.`id` = 2 and `classification_type`.`id` is not null and `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 146 - 2025-04-13 12:12:17 [0.14ms] */
select * from `sub_category` where `sub_category`.`id` = 4 and `sub_category`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 147 - 2025-04-13 12:12:17 [0.13ms] */
select * from `model` where `model`.`id` = 1396 and `model`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 148 - 2025-04-13 12:12:17 [0.13ms] */
select * from `make` where `make`.`id` = 74 and `make`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 149 - 2025-04-13 12:12:17 [0.13ms] */
select * from `vehicle_type` where `vehicle_type`.`id` = 24 and `vehicle_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 150 - 2025-04-13 12:12:17 [1.88ms] */
select `vehicle_tax`.* from `vehicle_tax` inner join `term` on `term`.`id` = `vehicle_tax`.`term_id` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`vehicle_id` = 60431 and `term`.`first_date_of_quarter` <= '2025-04-13 12:12:17' and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 151 - 2025-04-13 12:12:17 [0.18ms] */
select * from `term` where `term`.`id` = 97 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 152 - 2025-04-13 12:12:17 [0.16ms] */
select * from `term` where `term`.`id` = 98 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 153 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 99 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 154 - 2025-04-13 12:12:17 [0.15ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 155 - 2025-04-13 12:12:17 [0.24ms] */
select * from `district` where `district`.`id` = 37 and `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/m/service/tax/list
   Query 156 - 2025-04-13 12:12:17 [0.15ms] */
select * from `region` where `region`.`id` = 7 and `region`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:12:29 [1.63ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:12:29 [0.29ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:12:29 [0.54ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:12:29 [11.56ms] */
update `userprofiles` set `login_count` = 389, `last_login` = '2025-04-13 12:12:29', `userprofiles`.`updated_at` = '2025-04-13 12:12:29' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:12:29 [0.36ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:12:29 [0.68ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:12:29 [0.33ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:12:29 [0.27ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:12:29 [0.26ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:12:29 [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-04-13 12:12:29 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:12:29 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:12:29 [3.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60', 1, 5, '[]', 0, '2025-04-13 12:12:29', '2025-04-13 12:12:29', '2026-04-13 12:12:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:12:29 [0.36ms] */
select * from `oauth_access_tokens` where `id` = 'bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:12:29 [3.31ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:12:29 [1.44ms] */
select * from `oauth_access_tokens` where `id` = 'bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:12:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:12:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:12:29 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:12:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bc9e392302f6e56e751e0597cb0bc54560aa352a39b34bb22c5bd58667530875b89fa99bc0cdad60' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:12:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:12:29 [1.2ms] */
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 `license_plate` = 'HT182' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:15:21 [1.4ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:15:21 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:15:21 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:15:21 [8.17ms] */
update `userprofiles` set `last_ip` = '162.55.94.3', `login_count` = 390, `last_login` = '2025-04-13 12:15:21', `userprofiles`.`updated_at` = '2025-04-13 12:15:21' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:15:21 [0.16ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:15:21 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:15:21 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:15:21 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:15:21 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:15:21 [0.24ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-04-13 12:15:21 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:15:21 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:15:21 [3.27ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916', 1, 5, '[]', 0, '2025-04-13 12:15:21', '2025-04-13 12:15:21', '2026-04-13 12:15:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:15:21 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:15:21 [3.18ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:15:21 [2.53ms] */
select * from `oauth_access_tokens` where `id` = 'bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:15:21 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:15:21 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:15:21 [0.3ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:15:21 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'bdbd67992fd0b907a52fa305157818489332fb7aeec9f75a3f468e80ab30d75896ee5c763afb7916' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:15:21 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:15:21 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'HT182' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:15:47 [2.06ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:15:47 [0.19ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:15:47 [0.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:15:47 [13.2ms] */
update `userprofiles` set `login_count` = 391, `last_login` = '2025-04-13 12:15:47', `userprofiles`.`updated_at` = '2025-04-13 12:15:47' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:15:47 [0.29ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:15:47 [0.62ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:15:47 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:15:47 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:15:47 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:15:47 [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-04-13 12:15:47 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:15:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:15:47 [3.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682', 1, 5, '[]', 0, '2025-04-13 12:15:47', '2025-04-13 12:15:47', '2026-04-13 12:15:47');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:15:47 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:15:47 [2.89ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:15:47 [2.17ms] */
select * from `oauth_access_tokens` where `id` = '5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:15:47 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:15:47 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:15:47 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:15:47 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '5411cd4d63cf28c2c5f2d04c5b8e0173b3480ab7dbd19750a0507f2f5ca213662ff9b1d0d24ce682' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:15:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:15:47 [0.71ms] */
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 `license_plate` = '3432432fsdfd' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:49:41 [1.35ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:49:41 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:49:41 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:49:41 [11.24ms] */
update `userprofiles` set `login_count` = 392, `last_login` = '2025-04-13 12:49:41', `userprofiles`.`updated_at` = '2025-04-13 12:49:41' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:49:41 [0.32ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:49:41 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:49:41 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:49:41 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:49:41 [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-04-13 12:49:41 [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-04-13 12:49:41 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:49:41 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:49:41 [3.43ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a', 1, 5, '[]', 0, '2025-04-13 12:49:41', '2025-04-13 12:49:41', '2026-04-13 12:49:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:49:41 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:49:41 [3.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:49:41 [1.77ms] */
select * from `oauth_access_tokens` where `id` = '7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:49:41 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:49:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:49:41 [0.15ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:49:41 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '7b143c0c9ee94377565be1eec14dda81bc68112abe92bd0f2d1d270aeeda9ef64109078755677d6a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:49:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:49:41 [0.3ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '3432432fsdfd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:53:10 [2.05ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:53:10 [0.18ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:53:10 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:53:11 [11.56ms] */
update `userprofiles` set `login_count` = 393, `last_login` = '2025-04-13 12:53:10', `userprofiles`.`updated_at` = '2025-04-13 12:53:10' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:53:11 [0.16ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:53:11 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-04-13 12:53:11 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:53:11 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:53:11 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:53:11 [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-04-13 12:53:11 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:53:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:53:11 [3.73ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a', 1, 5, '[]', 0, '2025-04-13 12:53:11', '2025-04-13 12:53:11', '2026-04-13 12:53:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:53:11 [0.42ms] */
select * from `oauth_access_tokens` where `id` = '75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:53:11 [3.11ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:53:11 [1.42ms] */
select * from `oauth_access_tokens` where `id` = '75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:53:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:53:11 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:53:11 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:53:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '75fa31c6bedbfde1d7ed8133388130e51b8a185f0d276d70185710efdb83539c0e14bcb8dac6fc9a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:53:11 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:53:11 [0.14ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '3432432fsdfd';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:53:14 [1.38ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-04-13 12:53:14 [0.16ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-04-13 12:53:14 [0.31ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 1 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-04-13 12:53:14 [11.78ms] */
update `userprofiles` set `login_count` = 394, `last_login` = '2025-04-13 12:53:14', `userprofiles`.`updated_at` = '2025-04-13 12:53:14' where `id` = 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-04-13 12:53:14 [0.17ms] */
select * from `users` where `email` = 'superadmin@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-04-13 12:53:14 [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-04-13 12:53:14 [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 (1) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-04-13 12:53:14 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-04-13 12:53:14 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-04-13 12:53:14 [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-04-13 12:53:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-04-13 12:53:14 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-04-13 12:53:14 [3.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5', 1, 5, '[]', 0, '2025-04-13 12:53:14', '2025-04-13 12:53:14', '2026-04-13 12:53:14');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-04-13 12:53:14 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-04-13 12:53:14 [3.19ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-04-13 12:53:14 [2.32ms] */
select * from `oauth_access_tokens` where `id` = '6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-04-13 12:53:14 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-04-13 12:53:14 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-04-13 12:53:14 [0.34ms] */
select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-04-13 12:53:14 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '6118a18826e163603830335d31271ed3eb01df05e022b4ac3fadaa8fceaa8902b652bfb35912fdd5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-04-13 12:53:14 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-04-13 12:53:14 [0.68ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'HT182';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-04-13 12:53:14 [0.32ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `license_plate` = 'HT182' and `invoice`.`status` in ('OPEN', 'PARTIAL_PAID') and `term`.`year` <= 2025 and `term`.`quarter` <= 2 and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-04-13 12:53:52 [2.41ms] */
