/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:05 [2.55ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:05 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:05 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:05 [15.46ms] */
update `userprofiles` set `login_count` = 2745, `last_login` = '2025-06-13 11:00:05', `userprofiles`.`updated_at` = '2025-06-13 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:05 [0.37ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:05 [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-06-13 11:00:05 [0.57ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:05 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:05 [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-06-13 11:00:05 [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-06-13 11:00:05 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:05 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:05 [3.09ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98', 154, 5, '[]', 0, '2025-06-13 11:00:05', '2025-06-13 11:00:05', '2026-06-13 11:00:05');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:05 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:05 [2.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:05 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:05 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:05 [0.36ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:05 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:05 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '64d3c4e08ef761863ce58f7cc35dc2d817bb32760a1b8afe7c7b3c8fc6da1b8ebc6ae61b90949b98' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:05 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:05 [0.39ms] */
select count(*) as aggregate from `party` where `id` = 33125;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:05 [0.3ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'BS724';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:05 [1.56ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 33125 and `license_plate` = 'BS724' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:05 [1.4ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:05 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:05 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:05 [5.8ms] */
update `userprofiles` set `login_count` = 2746, `userprofiles`.`updated_at` = '2025-06-13 11:00:05' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:05 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:06 [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-06-13 11:00:06 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:06 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:06 [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-06-13 11:00:06 [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-06-13 11:00:06 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:06 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:06 [3.1ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37', 154, 5, '[]', 0, '2025-06-13 11:00:06', '2025-06-13 11:00:06', '2026-06-13 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:06 [0.38ms] */
select * from `oauth_access_tokens` where `id` = 'de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:06 [2.75ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:06 [1.68ms] */
select * from `oauth_access_tokens` where `id` = 'de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:06 [0.18ms] */
select * from `oauth_access_tokens` where `id` = 'de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:06 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:06 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:06 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'de60dd25350a8d9b9181d9bc67b5e9e9dee0551f5456254f14e2e13785b58a8619db9baf24c9ba37' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:06 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:06 [0.29ms] */
select count(*) as aggregate from `party` where `id` = 64940;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:06 [0.36ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = '5656SXYVCYHC';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:06 [1.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64940 and `license_plate` = '5656SXYVCYHC' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:06 [2.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:06 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:06 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:06 [5.95ms] */
update `userprofiles` set `login_count` = 2747, `last_login` = '2025-06-13 11:00:06', `userprofiles`.`updated_at` = '2025-06-13 11:00:06' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:06 [0.39ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:06 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-13 11:00:06 [0.25ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:06 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:06 [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-06-13 11:00:06 [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-06-13 11:00:06 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:06 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:06 [3.07ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6', 154, 5, '[]', 0, '2025-06-13 11:00:06', '2025-06-13 11:00:06', '2026-06-13 11:00:06');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:06 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'd6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:06 [2.69ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:07 [1.41ms] */
select * from `oauth_access_tokens` where `id` = 'd6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:07 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:07 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:07 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd6d18e0967d67cde60dcc18289eb1e77494b21b9786b16be4bb1a5d81c2a40911352b946a43d70e6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:07 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:07 [0.22ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:07 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC003';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:07 [0.89ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC003' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:07 [1.49ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:07 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:07 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:07 [5.79ms] */
update `userprofiles` set `login_count` = 2748, `last_login` = '2025-06-13 11:00:07', `userprofiles`.`updated_at` = '2025-06-13 11:00:07' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:07 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:07 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-13 11:00:07 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:07 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:07 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-13 11:00:07 [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-06-13 11:00:07 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:07 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:07 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db', 154, 5, '[]', 0, '2025-06-13 11:00:07', '2025-06-13 11:00:07', '2026-06-13 11:00:07');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:07 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:07 [2.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:08 [2.22ms] */
select * from `oauth_access_tokens` where `id` = 'cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:08 [0.31ms] */
select * from `oauth_access_tokens` where `id` = 'cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-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-06-13 11:00:08 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:08 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'cea9a51f3c30f53ad8c66b90fc37b0e0e278cb6bd3e098d23c9cf74aadbaf9d61304638580ae27db' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:08 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:08 [0.13ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:08 [0.27ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC002';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:08 [0.77ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC002' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:08 [2.22ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:08 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:08 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:08 [5.74ms] */
update `userprofiles` set `login_count` = 2749, `last_login` = '2025-06-13 11:00:08', `userprofiles`.`updated_at` = '2025-06-13 11:00:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:08 [0.26ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:08 [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-06-13 11:00:08 [0.27ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:08 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-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-06-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-06-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-06-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-06-13 11:00:08 [3.14ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec', 154, 5, '[]', 0, '2025-06-13 11:00:08', '2025-06-13 11:00:08', '2026-06-13 11:00:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:08 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:08 [2.81ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:08 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:08 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-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 4 - 2025-06-13 11:00:08 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:08 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '781e0b903f4b94456dc0d95854ce6f98b6f47d78cd45cf81db0dd0f7e2fa0dbf4e14be08abe6c8ec' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-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-06-13 11:00:08 [0.25ms] */
select count(*) as aggregate from `party` where `id` = 639;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:08 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'RTA009';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:08 [0.89ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 639 and `license_plate` = 'RTA009' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:10 [1.56ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:10 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:10 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:10 [9.53ms] */
update `userprofiles` set `login_count` = 2750, `last_login` = '2025-06-13 11:00:10', `userprofiles`.`updated_at` = '2025-06-13 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:10 [0.34ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:10 [0.77ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-13 11:00:10 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:10 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:10 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-13 11:00:10 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:10 [5.46ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9', 154, 5, '[]', 0, '2025-06-13 11:00:10', '2025-06-13 11:00:10', '2026-06-13 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:10 [0.3ms] */
select * from `oauth_access_tokens` where `id` = 'e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:10 [3.09ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:10 [2.36ms] */
select * from `oauth_access_tokens` where `id` = 'e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:10 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:10 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:10 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:10 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'e92ecfd2341fdb944d2cb55b22bd3a2c835268856b00bfcd4e47d5f5216d52d7b2831e6a44cce2f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:10 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:10 [0.21ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:10 [0.33ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC005';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:10 [2.15ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:10 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:10 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:10 [2.76ms] */
update `userprofiles` set `login_count` = 2751, `userprofiles`.`updated_at` = '2025-06-13 11:00:10' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:10 [0.16ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:10 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-13 11:00:10 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:10 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:10 [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-06-13 11:00:10 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:00:10 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:10 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:10 [3.42ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6', 154, 5, '[]', 0, '2025-06-13 11:00:10', '2025-06-13 11:00:10', '2026-06-13 11:00:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:10 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:10 [2.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:10 [2.41ms] */
select * from `oauth_access_tokens` where `id` = '5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:10 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:10 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:10 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:10 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '5f775db902583f50ffb8442ae3e4dd63f45369a28fe38621584be9bf89e3bdab34d103d71f99adb6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:10 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:10 [0.54ms] */
select count(*) as aggregate from `party` where `id` = 36578;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:10 [0.58ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'AA584';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:10 [1.1ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 36578 and `license_plate` = 'AA584' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:11 [1.46ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:11 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:11 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:11 [5.83ms] */
update `userprofiles` set `login_count` = 2752, `last_login` = '2025-06-13 11:00:11', `userprofiles`.`updated_at` = '2025-06-13 11:00:11' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:11 [0.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:11 [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-06-13 11:00:11 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00: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-06-13 11:00: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-06-13 11:00:11 [0.24ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:00:11 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:11 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:11 [3.65ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59', 154, 5, '[]', 0, '2025-06-13 11:00:11', '2025-06-13 11:00:11', '2026-06-13 11:00:11');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:11 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'd706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:11 [2.78ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:12 [1.32ms] */
select * from `oauth_access_tokens` where `id` = 'd706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'd706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:12 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'd706fb49049e9ffcf20ec4bcb14e0a3a9960d3827a85321552e8fb207b59fc30e7d8aec022357d59' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:12 [0.14ms] */
select count(*) as aggregate from `party` where `id` = 64946;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:12 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'LIC1253RTA001';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:12 [0.76ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64946 and `license_plate` = 'LIC1253RTA001' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:12 [1.37ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:12 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:12 [0.36ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:12 [6.78ms] */
update `userprofiles` set `login_count` = 2753, `last_login` = '2025-06-13 11:00:12', `userprofiles`.`updated_at` = '2025-06-13 11:00:12' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:12 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:12 [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-06-13 11:00:12 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:12 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:12 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-13 11:00:12 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:00:12 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:12 [3.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9', 154, 5, '[]', 0, '2025-06-13 11:00:12', '2025-06-13 11:00:12', '2026-06-13 11:00:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:12 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:12 [2.94ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:12 [1.47ms] */
select * from `oauth_access_tokens` where `id` = '2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:12 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:12 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2344bf6fedb891ca04887095a9b4a6d3b3646bb52e83bfe394e33013d34f307339d4575276f6f8c9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:12 [0.29ms] */
select count(*) as aggregate from `party` where `id` = 54700;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:12 [0.24ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YP073';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:12 [1.23ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 54700 and `license_plate` = 'YP073' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:13 [1.31ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:13 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:13 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:13 [6.09ms] */
update `userprofiles` set `login_count` = 2754, `last_login` = '2025-06-13 11:00:13', `userprofiles`.`updated_at` = '2025-06-13 11:00:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:13 [0.27ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:13 [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-06-13 11:00:13 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:13 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:13 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:13 [3.54ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8', 154, 5, '[]', 0, '2025-06-13 11:00:13', '2025-06-13 11:00:13', '2026-06-13 11:00:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:13 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:13 [4.22ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:13 [1.49ms] */
select * from `oauth_access_tokens` where `id` = 'fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:13 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:13 [0.2ms] */
select * from `oauth_access_tokens` where `id` = 'fec69364860e0d4e3367f1190e633faabb93bfdacc24114c9f0bea7a71fd4838203e530790ee6cf8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:13 [0.25ms] */
select count(*) as aggregate from `party` where `id` = 99460;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:00:13 [1.42ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:00:13 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:00:13 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:00:13 [5.12ms] */
update `userprofiles` set `login_count` = 2755, `userprofiles`.`updated_at` = '2025-06-13 11:00:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:00:13 [0.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:00:13 [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-06-13 11:00:13 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:00:13 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:00:13 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-06-13 11:00:13 [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-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:00:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:00:13 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926', 154, 5, '[]', 0, '2025-06-13 11:00:13', '2025-06-13 11:00:13', '2026-06-13 11:00:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:00:13 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:00:13 [1.67ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-06-13 11:00:13 [1.64ms] */
select * from `oauth_access_tokens` where `id` = '1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-06-13 11:00:13 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-06-13 11:00:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '1327edb812ec48d6c8dfd2a54e2a094d42d1714e3f606a1462b5795b3f5491e646bdcdc83f217926' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-06-13 11:00:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-06-13 11:00:13 [0.39ms] */
select count(*) as aggregate from `party` where `id` = 59307;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-06-13 11:00:13 [0.38ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'IF124';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-06-13 11:00:13 [1.28ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 59307 and `license_plate` = 'IF124' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:42:34 [1.71ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:42:39 [1.41ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:42:41 [2.35ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:42:43 [2.24ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:42:44 [1.44ms] */
select * from `users` where `email` = 'teller@user.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:43:04 [2.12ms] */
select * from `users` where `email` = 'teller@field-officer.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:43:04 [0.25ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:43:04 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 161 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:43:04 [6.75ms] */
update `userprofiles` set `last_ip` = '223.237.185.99', `login_count` = 12, `last_login` = '2025-06-13 11:43:04', `userprofiles`.`updated_at` = '2025-06-13 11:43:04' where `id` = 161;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:43:04 [0.38ms] */
select * from `users` where `email` = 'teller@field-officer.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:43:04 [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-06-13 11:43:04 [0.51ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (161) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:43:04 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:43: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-06-13 11:43:04 [0.28ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-06-13 11:43:04 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:43:04 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:43:04 [3.34ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6', 161, 5, '[]', 0, '2025-06-13 11:43:04', '2025-06-13 11:43:04', '2026-06-13 11:43:04');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:43:04 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:43:04 [3.63ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-06-13 11:43:10 [1.7ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-06-13 11:43:10 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-06-13 11:43:10 [0.43ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-06-13 11:43:10 [0.31ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-06-13 11:43:10 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-06-13 11:43:10 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-06-13 11:43:10 [1.15ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'TR176' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-06-13 11:43:10 [0.24ms] */
select * from `party` where `party`.`id` = 33550 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-06-13 11:43:10 [0.4ms] */
select * from `vehicle` where `id` = 43393 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-06-13 11:43:10 [0.67ms] */
select * from `party_vehicle` where `vehicle_id` = 43393 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 1 - 2025-06-13 11:43:11 [1.31ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 2 - 2025-06-13 11:43:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 3 - 2025-06-13 11:43:11 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 4 - 2025-06-13 11:43:11 [0.16ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 5 - 2025-06-13 11:43:11 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 6 - 2025-06-13 11:43:11 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 7 - 2025-06-13 11:43:11 [0.35ms] */
select * from `vehicle` where `vehicle`.`id` = 43393 and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 8 - 2025-06-13 11:43:11 [0.25ms] */
select * from `vehicle` where `id` = 43393 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 9 - 2025-06-13 11:43:11 [0.28ms] */
select * from `party_vehicle` where `vehicle_id` = 43393 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 10 - 2025-06-13 11:43:11 [8.49ms] */
select `vehicle_tax`.`id`, `transaction`.`id` as `transaction_id`, `term`.`year`, `term`.`quarter`, `invoice`.`invoice_amount`, `invoice`.`outstanding_balance`, `vehicle_tax`.`exempt`, `invoice`.`status`, `tax_sticker`.`name` as `tax_sticker`, CASE
                WHEN term.quarter = 1 THEN DATE_FORMAT(CONCAT(term.year, "-03-31"), "%d-%m-%Y")
                WHEN term.quarter = 2 THEN DATE_FORMAT(CONCAT(term.year, "-06-30"), "%d-%m-%Y")
                WHEN term.quarter = 3 THEN DATE_FORMAT(CONCAT(term.year, "-09-30"), "%d-%m-%Y")
                WHEN term.quarter = 4 THEN DATE_FORMAT(CONCAT(term.year, "-12-31"), "%d-%m-%Y")
                ELSE NULL
                END as due_date from `vehicle_tax` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `transaction` on `vehicle_tax`.`transaction_id` = `transaction`.`id` left join `invoice` on `transaction`.`invoice_id` = `invoice`.`id` left join `tax_sticker` on `vehicle_tax`.`tax_sticker_id` = `tax_sticker`.`id` where `vehicle_tax`.`vehicle_id` = 43393 and `vehicle_tax`.`exempt` = 'N' and `vehicle_tax`.`deleted_at` is null and `transaction`.`deleted_at` is null and `invoice`.`deleted_at` is null order by `term`.`year` asc, `term`.`quarter` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 1 - 2025-06-13 11:43:12 [2.02ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 2 - 2025-06-13 11:43:12 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 3 - 2025-06-13 11:43:12 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 4 - 2025-06-13 11:43:12 [0.37ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 5 - 2025-06-13 11:43:12 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 6 - 2025-06-13 11:43:12 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 7 - 2025-06-13 11:43:12 [0.42ms] */
select `id`, `name` from `region` where `deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-06-13 11:43:12 [2.17ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-06-13 11:43:12 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-06-13 11:43:12 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-06-13 11:43:12 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-06-13 11:43:12 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-06-13 11:43:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-06-13 11:43:12 [0.48ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 1 - 2025-06-13 11:43:17 [1.37ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 2 - 2025-06-13 11:43:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 3 - 2025-06-13 11:43:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 4 - 2025-06-13 11:43:17 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 5 - 2025-06-13 11:43:17 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 6 - 2025-06-13 11:43:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 7 - 2025-06-13 11:43:17 [2.57ms] */
select `id`, `receipt_number` from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` asc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 8 - 2025-06-13 11:43:17 [1.46ms] */
select count(*) as aggregate from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-06-13 11:43:17 [2.07ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-06-13 11:43:17 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-06-13 11:43:17 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-06-13 11:43:17 [0.26ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-06-13 11:43:17 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-06-13 11:43:17 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-06-13 11:43:17 [2.86ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-06-13 11:43:17 [0.26ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-06-13 11:43:17 [0.31ms] */
select `parent_id` from `transaction` where `id` in (513850, 513851) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-06-13 11:43:17 [0.22ms] */
select `id` from `transaction` where 0 = 1 and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-06-13 11:43:17 [0.34ms] */
select * from `transaction` where 0 = 1 and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-06-13 11:43:17 [0.37ms] */
select * from `transaction` where `id` in (513850, 513851) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-06-13 11:43:17 [0.37ms] */
select * from `invoice` where `invoice`.`id` = 489518 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-06-13 11:43:17 [5.83ms] */
update `invoice` set `updated_by` = 161, `invoice`.`updated_at` = '2025-06-13 11:43:17' where `id` = 489518;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-06-13 11:43:17 [0.26ms] */
select * from `invoice` where `id` = 489518 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-06-13 11:43:17 [3.26ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":[],"old":[]}', 161, 'App\Models\User', 489518, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-06-13 11:43:17 [0.45ms] */
select * from `service_workflow` where `service_id` = 2 and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-06-13 11:43:17 [0.46ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 1 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-06-13 11:43:17 [4.33ms] */
update `transaction` set `updated_by` = 161, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513850;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-06-13 11:43:17 [0.37ms] */
select * from `invoice` where `invoice`.`id` = 489519 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-06-13 11:43:17 [2.98ms] */
update `invoice` set `updated_by` = 161, `invoice`.`updated_at` = '2025-06-13 11:43:17' where `id` = 489519;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-06-13 11:43:17 [0.35ms] */
select * from `invoice` where `id` = 489519 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 23 - 2025-06-13 11:43:17 [2.96ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":[],"old":[]}', 161, 'App\Models\User', 489519, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 24 - 2025-06-13 11:43:17 [0.35ms] */
select * from `service_workflow` where `service_id` = 2 and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 25 - 2025-06-13 11:43:17 [0.33ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 1 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 26 - 2025-06-13 11:43:17 [3.83ms] */
update `transaction` set `updated_by` = 161, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513851;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 27 - 2025-06-13 11:43:17 [3.72ms] */
update `vehicle_tax` set `status` = 'OPEN', `vehicle_tax`.`updated_at` = '2025-06-13 11:43:17' where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 28 - 2025-06-13 11:43:17 [0.56ms] */
select * from `vehicle` where `vehicle`.`id` = 43393 and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 29 - 2025-06-13 11:43:17 [0.48ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 30 - 2025-06-13 11:43:17 [0.24ms] */
select count(*) as aggregate from `party_vehicle` where `vehicle_id` = 43393 and `status` = 'TRANSFER_INPROGRESS' and `party_vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 31 - 2025-06-13 11:43:17 [0.23ms] */
select * from `party_vehicle` where `vehicle_id` = 43393 and `is_owner` = 'Y' and `status` = 'REGISTERED' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 32 - 2025-06-13 11:43:17 [0.21ms] */
select * from `party` where `party`.`id` = 33550 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 33 - 2025-06-13 11:43:17 [0.22ms] */
select * from `vehicle` where `vehicle`.`id` = 43393 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 34 - 2025-06-13 11:43:17 [0.2ms] */
select * from `service_workflow` where ((`service_id` = 2)) and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 35 - 2025-06-13 11:43:17 [0.23ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 1 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 36 - 2025-06-13 11:43:17 [0.38ms] */
select * from `branches` where `branches`.`id` = 16 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 37 - 2025-06-13 11:43:17 [0.92ms] */
insert into `transaction` (`party_id`, `service_id`, `vehicle_id`, `driver_license_id`, `service_workflow_id`, `current_workflow_state_id`, `branch_id`, `deliver_district_id`, `district_id`, `status`, `tax_collection_point_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (33550, 2, 43393, null, 2, 6, 16, 37, 37, 'OPEN', 26, null, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 38 - 2025-06-13 11:43:17 [0.5ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574673, 'INITIATED', '2025-06-13 11:43:17', 5, 161, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 39 - 2025-06-13 11:43:17 [0.21ms] */
update `transaction` set `grouped` = 'N', `parent` = 'Y', `party_vehicle_id` = 6338, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 574673;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 40 - 2025-06-13 11:43:17 [0.27ms] */
select sum(`invoice`.`outstanding_balance`) as aggregate from `vehicle_tax` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`id` in (403993, 403994) and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`exempt` = 'N' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 41 - 2025-06-13 11:43:17 [0.22ms] */
select sum(`invoice`.`outstanding_balance`) as aggregate from `vehicle_tax` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`id` in (403993, 403994) and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`exempt` = 'Y' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 42 - 2025-06-13 11:43:17 [0.4ms] */
insert into `invoice` (`transaction_id`, `party_id`, `invoice_date`, `due_date`, `invoice_amount`, `discounts`, `total_invoice_amount`, `outstanding_balance`, `taxes`, `status`, `grouped`, `parent`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574673, 33550, '2025-06-13 11:43:17', '2025-06-13 11:43:17', 95.00, 0, 95.00, 95.00, 0, 'OPEN', 'N', 'Y', 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 43 - 2025-06-13 11:43:17 [0.19ms] */
select * from `invoice` where `id` = 550327 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 44 - 2025-06-13 11:43:17 [0.31ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"transaction_id":574673,"party_id":33550,"invoice_amount":"95.00","invoice_date":"2025-06-13 11:43:17","due_date":"2025-06-13 11:43:17","outstanding_balance":"95.00","discounts":"0.00","taxes":"0.00","total_invoice_amount":"95.00","status":"OPEN","siinpay_invoice_number":null,"invoice_number":null,"invoice_group_id":null,"parent_id":null,"grouped":"N","migration_id":null}}', 161, 'App\Models\User', 550327, 'Modules\Transaction\Entities\Invoice', 'created', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 45 - 2025-06-13 11:43:17 [0.28ms] */
select `invoice`.* from `vehicle_tax` inner join `transaction` on `transaction`.`id` = `vehicle_tax`.`transaction_id` inner join `invoice` on `invoice`.`id` = `transaction`.`invoice_id` where `vehicle_tax`.`id` in (403993, 403994) and `vehicle_tax`.`status` = 'OPEN' and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 46 - 2025-06-13 11:43:17 [0.37ms] */
insert into `invoice_item` (`item`, `description`, `quantity`, `unit_price`, `total_price`, `invoice_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values ('Tax Service Fee', 'Combined Quarterly Tax Fees', 2, 64.00, 95, 550327, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 47 - 2025-06-13 11:43:17 [0.2ms] */
select * from `invoice_item` where `id` = 999680 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 48 - 2025-06-13 11:43:17 [0.39ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice_item', '{"attributes":{"item":"Tax Service Fee","description":"Combined Quarterly Tax Fees","unit_price":"64.00","quantity":2,"total_price":"95.00","invoice_id":550327}}', 161, 'App\Models\User', 999680, 'Modules\Transaction\Entities\InvoiceItem', 'created', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 49 - 2025-06-13 11:43:17 [0.23ms] */
update `invoice` set `invoice_number` = 'INV-294-550327549', `invoice`.`updated_at` = '2025-06-13 11:43:17' where `id` = 550327;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 50 - 2025-06-13 11:43:17 [0.19ms] */
select * from `invoice` where `id` = 550327 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 51 - 2025-06-13 11:43:17 [0.17ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"invoice_number":"INV-294-550327549"},"old":{"invoice_number":null}}', 161, 'App\Models\User', 550327, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 52 - 2025-06-13 11:43:17 [0.2ms] */
select * from `vehicle_tax` where `vehicle_tax`.`id` = 403993 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 53 - 2025-06-13 11:43:17 [0.16ms] */
update `vehicle_tax` set `status` = 'INPROGRESS', `updated_by` = 161, `vehicle_tax`.`updated_at` = '2025-06-13 11:43:17' where `id` = 403993;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 54 - 2025-06-13 11:43:17 [0.18ms] */
select * from `vehicle_tax` where `id` = 403993 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 55 - 2025-06-13 11:43:17 [0.26ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":{"status":"INPROGRESS"},"old":{"status":"OPEN"}}', 161, 'App\Models\User', 403993, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 56 - 2025-06-13 11:43:17 [0.23ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`id` is not null and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 57 - 2025-06-13 11:43:17 [0.45ms] */
update `transaction` set `tax_collection_point_id` = 26, `parent_id` = 574673, `child` = 'Y', `grouped` = 'Y', `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513850;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 58 - 2025-06-13 11:43:17 [0.2ms] */
select * from `invoice` where `invoice`.`id` = 489518 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 59 - 2025-06-13 11:43:17 [0.17ms] */
update `invoice` set `parent_id` = 550327, `grouped` = 'Y', `invoice`.`updated_at` = '2025-06-13 11:43:17' where `id` = 489518;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 60 - 2025-06-13 11:43:17 [0.19ms] */
select * from `invoice` where `id` = 489518 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 61 - 2025-06-13 11:43:17 [0.17ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"parent_id":550327,"grouped":"Y"},"old":{"parent_id":null,"grouped":"N"}}', 161, 'App\Models\User', 489518, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 62 - 2025-06-13 11:43:17 [0.22ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 63 - 2025-06-13 11:43:17 [0.18ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 64 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 65 - 2025-06-13 11:43:17 [0.18ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 66 - 2025-06-13 11:43:17 [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/make_payment
   Query 67 - 2025-06-13 11:43:17 [0.17ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 68 - 2025-06-13 11:43:17 [0.2ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (513850, 'APPROVED', '2025-06-13 11:43:17', 5, 161, null, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 69 - 2025-06-13 11:43:17 [0.23ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 2 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 70 - 2025-06-13 11:43:17 [0.28ms] */
update `transaction` set `current_workflow_state_id` = 7, `status` = 'INPROGRESS', `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513850;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 71 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 72 - 2025-06-13 11:43:17 [0.2ms] */
select * from `invoice` where `invoice`.`id` = 489518 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 73 - 2025-06-13 11:43:17 [0.19ms] */
select * from `vehicle_tax` where `vehicle_tax`.`id` = 403994 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 74 - 2025-06-13 11:43:17 [0.16ms] */
update `vehicle_tax` set `status` = 'INPROGRESS', `updated_by` = 161, `vehicle_tax`.`updated_at` = '2025-06-13 11:43:17' where `id` = 403994;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 75 - 2025-06-13 11:43:17 [0.2ms] */
select * from `vehicle_tax` where `id` = 403994 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 76 - 2025-06-13 11:43:17 [0.17ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":{"status":"INPROGRESS"},"old":{"status":"OPEN"}}', 161, 'App\Models\User', 403994, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 77 - 2025-06-13 11:43:17 [0.22ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`id` is not null and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 78 - 2025-06-13 11:43:17 [0.25ms] */
update `transaction` set `tax_collection_point_id` = 26, `parent_id` = 574673, `child` = 'Y', `grouped` = 'Y', `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513851;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 79 - 2025-06-13 11:43:17 [0.19ms] */
select * from `invoice` where `invoice`.`id` = 489519 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 80 - 2025-06-13 11:43:17 [0.16ms] */
update `invoice` set `parent_id` = 550327, `grouped` = 'Y', `invoice`.`updated_at` = '2025-06-13 11:43:17' where `id` = 489519;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 81 - 2025-06-13 11:43:17 [0.18ms] */
select * from `invoice` where `id` = 489519 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 82 - 2025-06-13 11:43:17 [0.17ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"parent_id":550327,"grouped":"Y"},"old":{"parent_id":null,"grouped":"N"}}', 161, 'App\Models\User', 489519, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 83 - 2025-06-13 11:43:17 [0.21ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 84 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 85 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 86 - 2025-06-13 11:43:17 [0.18ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 87 - 2025-06-13 11:43:17 [0.16ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 88 - 2025-06-13 11:43:17 [0.18ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (513851, 'APPROVED', '2025-06-13 11:43:17', 5, 161, null, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 89 - 2025-06-13 11:43:17 [0.22ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 2 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 90 - 2025-06-13 11:43:17 [0.26ms] */
update `transaction` set `current_workflow_state_id` = 7, `status` = 'INPROGRESS', `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513851;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 91 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 92 - 2025-06-13 11:43:17 [0.2ms] */
select * from `invoice` where `invoice`.`id` = 489519 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 93 - 2025-06-13 11:43:17 [0.17ms] */
update `transaction` set `invoice_id` = 550327, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 574673;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 94 - 2025-06-13 11:43:17 [0.26ms] */
update `vehicle` set `updated_by` = 161, `vehicle`.`updated_at` = '2025-06-13 11:43:17' where `id` = 43393;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 95 - 2025-06-13 11:43:17 [0.19ms] */
select * from `vehicle` where `id` = 43393 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 96 - 2025-06-13 11:43:17 [0.34ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle', '{"attributes":[],"old":[]}', 161, 'App\Models\User', 43393, 'Modules\Vehicle\Entities\Vehicle', 'updated', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 97 - 2025-06-13 11:43:17 [0.32ms] */
insert into `audits` (`old_values`, `new_values`, `event`, `auditable_id`, `auditable_type`, `user_id`, `user_type`, `tags`, `ip_address`, `user_agent`, `url`, `updated_at`, `created_at`) values ('{"updated_by":1}', '{"updated_by":161}', 'updated', 43393, 'Modules\Vehicle\Entities\Vehicle', 161, 'App\Models\User', null, '223.237.185.99', 'Dart/3.4 (dart:io)', 'https://testtra.puntlandgov.org/api/make_payment', '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 98 - 2025-06-13 11:43:17 [0.24ms] */
select * from `transaction` where `transaction`.`id` = 574673 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 99 - 2025-06-13 11:43:17 [0.18ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 100 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 101 - 2025-06-13 11:43:17 [0.18ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 102 - 2025-06-13 11:43:17 [0.19ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574673, 'APPROVED', '2025-06-13 11:43:17', 5, 161, null, 161, 161, '2025-06-13 11:43:17', '2025-06-13 11:43:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 103 - 2025-06-13 11:43:17 [0.2ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 2 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 104 - 2025-06-13 11:43:17 [0.23ms] */
update `transaction` set `current_workflow_state_id` = 7, `status` = 'INPROGRESS', `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 574673;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 105 - 2025-06-13 11:43:17 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 106 - 2025-06-13 11:43:17 [0.2ms] */
select * from `invoice` where `invoice`.`id` = 550327 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 107 - 2025-06-13 11:43:17 [0.25ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 108 - 2025-06-13 11:43:17 [0.31ms] */
select * from `invoice` where `transaction_id` = 513850 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 109 - 2025-06-13 11:43:17 [1.12ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489518 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 110 - 2025-06-13 11:43:17 [0.26ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 111 - 2025-06-13 11:43:17 [2.97ms] */
update `transaction` set `payment_provider_id` = 1, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513850;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 112 - 2025-06-13 11:43:17 [0.4ms] */
select * from `invoice` where `transaction_id` = 513851 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 113 - 2025-06-13 11:43:17 [0.36ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489519 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 114 - 2025-06-13 11:43:17 [0.37ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 115 - 2025-06-13 11:43:17 [3.15ms] */
update `transaction` set `payment_provider_id` = 1, `transaction`.`updated_at` = '2025-06-13 11:43:17' where `id` = 513851;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 116 - 2025-06-13 11:43:17 [0.39ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 117 - 2025-06-13 11:43:17 [0.43ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 118 - 2025-06-13 11:43:17 [0.29ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 119 - 2025-06-13 11:43:17 [0.32ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-06-13 11:43:18 [2.25ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-06-13 11:43:18 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-06-13 11:43:18 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-06-13 11:43:18 [0.26ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-06-13 11:43:18 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-06-13 11:43:18 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-06-13 11:43:18 [0.25ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-06-13 11:43:18 [0.14ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-06-13 11:43:18 [0.28ms] */
select `parent_id` from `transaction` where `id` in (513850, 513851) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-06-13 11:43:18 [163.82ms] */
select `id` from `transaction` where `parent_id` in (574673) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-06-13 11:43:18 [0.46ms] */
select * from `transaction` where `id` in (574673) and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-06-13 11:43:18 [0.31ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-06-13 11:43:18 [0.3ms] */
select * from `invoice` where `transaction_id` = 513850 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-06-13 11:43:18 [0.28ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489518 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-06-13 11:43:18 [0.53ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-06-13 11:43:18 [0.25ms] */
select * from `invoice` where `transaction_id` = 513851 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-06-13 11:43:18 [0.19ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489519 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-06-13 11:43:18 [0.37ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-06-13 11:43:18 [0.21ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-06-13 11:43:18 [0.21ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-06-13 11:43:18 [0.19ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-06-13 11:43:18 [0.19ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 1 - 2025-06-13 11:43:19 [2.04ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 2 - 2025-06-13 11:43:19 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 3 - 2025-06-13 11:43:19 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 4 - 2025-06-13 11:43:19 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 5 - 2025-06-13 11:43:19 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 6 - 2025-06-13 11:43:19 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 7 - 2025-06-13 11:43:19 [0.33ms] */
select * from `transaction` where `id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 8 - 2025-06-13 11:43:19 [8.68ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 513851 and `payment_documents`.`transaction_id` is not null and `type` = 'SERVICE_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 9 - 2025-06-13 11:43:19 [1.19ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 513851 and `payment_documents`.`transaction_id` is not null and `type` = 'GOV_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 10 - 2025-06-13 11:43:19 [0.74ms] */
select * from `invoice` where `invoice`.`id` = 489519 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 11 - 2025-06-13 11:43:19 [0.8ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 489519 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-06-13 11:43:20 [1.96ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-06-13 11:43:20 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-06-13 11:43:20 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-06-13 11:43:20 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-06-13 11:43:20 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-06-13 11:43:20 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-06-13 11:43:20 [0.18ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 1 - 2025-06-13 11:43:21 [2.02ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 2 - 2025-06-13 11:43:21 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 3 - 2025-06-13 11:43:21 [0.31ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 4 - 2025-06-13 11:43:21 [0.34ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 5 - 2025-06-13 11:43:21 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '134f9d78a02acd75a8dd12417fd1b17d62ae526134e38538c7bd7f12ac7e790ff34c0233968894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 6 - 2025-06-13 11:43:21 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 7 - 2025-06-13 11:43:21 [0.16ms] */
select `id`, `receipt_number` from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` asc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 8 - 2025-06-13 11:43:21 [0.13ms] */
select count(*) as aggregate from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-06-13 11:47:41 [1.55ms] */
select * from `users` where `email` = 'teller@field-officer.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-06-13 11:47:41 [0.19ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-06-13 11:47:41 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 161 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-06-13 11:47:41 [11.25ms] */
update `userprofiles` set `login_count` = 13, `last_login` = '2025-06-13 11:47:41', `userprofiles`.`updated_at` = '2025-06-13 11:47:41' where `id` = 161;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-06-13 11:47:41 [0.25ms] */
select * from `users` where `email` = 'teller@field-officer.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-06-13 11:47:41 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-06-13 11:47:41 [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 (161) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-06-13 11:47:41 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-06-13 11:47:41 [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-06-13 11:47: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-06-13 11:47:41 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-06-13 11:47:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-06-13 11:47:41 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d', 161, 5, '[]', 0, '2025-06-13 11:47:41', '2025-06-13 11:47:41', '2026-06-13 11:47:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-06-13 11:47:41 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-06-13 11:47:41 [3.12ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-06-13 11:47:45 [1.63ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-06-13 11:47:45 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-06-13 11:47:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-06-13 11:47:45 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-06-13 11:47:45 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-06-13 11:47:45 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-06-13 11:47:45 [1.23ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'TR176' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-06-13 11:47:45 [0.17ms] */
select * from `party` where `party`.`id` = 33550 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-06-13 11:47:45 [0.35ms] */
select * from `vehicle` where `id` = 43393 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-06-13 11:47:45 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 43393 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 1 - 2025-06-13 11:47:45 [2.09ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 2 - 2025-06-13 11:47:45 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 3 - 2025-06-13 11:47:45 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 4 - 2025-06-13 11:47:45 [0.28ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 5 - 2025-06-13 11:47:45 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 6 - 2025-06-13 11:47:45 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 7 - 2025-06-13 11:47:45 [0.44ms] */
select * from `vehicle` where `vehicle`.`id` = 43393 and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 8 - 2025-06-13 11:47:45 [0.33ms] */
select * from `vehicle` where `id` = 43393 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 9 - 2025-06-13 11:47:45 [0.24ms] */
select * from `party_vehicle` where `vehicle_id` = 43393 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 10 - 2025-06-13 11:47:45 [1.3ms] */
select `vehicle_tax`.`id`, `transaction`.`id` as `transaction_id`, `term`.`year`, `term`.`quarter`, `invoice`.`invoice_amount`, `invoice`.`outstanding_balance`, `vehicle_tax`.`exempt`, `invoice`.`status`, `tax_sticker`.`name` as `tax_sticker`, CASE
                WHEN term.quarter = 1 THEN DATE_FORMAT(CONCAT(term.year, "-03-31"), "%d-%m-%Y")
                WHEN term.quarter = 2 THEN DATE_FORMAT(CONCAT(term.year, "-06-30"), "%d-%m-%Y")
                WHEN term.quarter = 3 THEN DATE_FORMAT(CONCAT(term.year, "-09-30"), "%d-%m-%Y")
                WHEN term.quarter = 4 THEN DATE_FORMAT(CONCAT(term.year, "-12-31"), "%d-%m-%Y")
                ELSE NULL
                END as due_date from `vehicle_tax` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `transaction` on `vehicle_tax`.`transaction_id` = `transaction`.`id` left join `invoice` on `transaction`.`invoice_id` = `invoice`.`id` left join `tax_sticker` on `vehicle_tax`.`tax_sticker_id` = `tax_sticker`.`id` where `vehicle_tax`.`vehicle_id` = 43393 and `vehicle_tax`.`exempt` = 'N' and `vehicle_tax`.`deleted_at` is null and `transaction`.`deleted_at` is null and `invoice`.`deleted_at` is null order by `term`.`year` asc, `term`.`quarter` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 1 - 2025-06-13 11:47:46 [2.04ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 2 - 2025-06-13 11:47:46 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 3 - 2025-06-13 11:47:46 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 4 - 2025-06-13 11:47:46 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 5 - 2025-06-13 11:47:46 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 6 - 2025-06-13 11:47:46 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 7 - 2025-06-13 11:47:46 [0.13ms] */
select `id`, `name` from `region` where `deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-06-13 11:47:46 [2.04ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-06-13 11:47:46 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-06-13 11:47:46 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-06-13 11:47:47 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-06-13 11:47:47 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-06-13 11:47:47 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-06-13 11:47:47 [0.34ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 1 - 2025-06-13 11:47:48 [2.03ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 2 - 2025-06-13 11:47:48 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 3 - 2025-06-13 11:47:48 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 4 - 2025-06-13 11:47:48 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 5 - 2025-06-13 11:47:48 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 6 - 2025-06-13 11:47:48 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 7 - 2025-06-13 11:47:48 [0.16ms] */
select `id`, `receipt_number` from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` asc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 8 - 2025-06-13 11:47:48 [0.13ms] */
select count(*) as aggregate from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-06-13 11:47:49 [2.16ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-06-13 11:47:49 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-06-13 11:47:49 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-06-13 11:47:49 [0.34ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-06-13 11:47:49 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-06-13 11:47:49 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-06-13 11:47:49 [0.17ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-06-13 11:47:49 [0.14ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-06-13 11:47:49 [0.13ms] */
select `parent_id` from `transaction` where `id` in (513850, 513851) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-06-13 11:47:49 [0.12ms] */
select `id` from `transaction` where `parent_id` in (574673) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-06-13 11:47:49 [0.16ms] */
select * from `transaction` where `id` in (574673) and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-06-13 11:47:49 [0.12ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-06-13 11:47:49 [0.16ms] */
select * from `invoice` where `transaction_id` = 513850 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-06-13 11:47:49 [0.16ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489518 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-06-13 11:47:49 [0.21ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-06-13 11:47:49 [0.15ms] */
select * from `invoice` where `transaction_id` = 513851 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-06-13 11:47:49 [0.14ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489519 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-06-13 11:47:49 [0.17ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-06-13 11:47:49 [0.14ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-06-13 11:47:49 [0.14ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-06-13 11:47:49 [0.13ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-06-13 11:47:49 [0.14ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-06-13 11:47:50 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-06-13 11:47:50 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-06-13 11:47:50 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-06-13 11:47:50 [0.17ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-06-13 11:47:50 [0.15ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-06-13 11:47:50 [0.14ms] */
select `parent_id` from `transaction` where `id` in (513850, 513851) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-06-13 11:47:50 [0.13ms] */
select `id` from `transaction` where `parent_id` in (574673) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-06-13 11:47:50 [0.17ms] */
select * from `transaction` where `id` in (574673) and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-06-13 11:47:50 [0.13ms] */
select `transaction_id` from `vehicle_tax` where `id` in (403993, 403994) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-06-13 11:47:50 [0.16ms] */
select * from `invoice` where `transaction_id` = 513850 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-06-13 11:47:50 [0.16ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489518 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-06-13 11:47:50 [0.17ms] */
select * from `transaction` where `transaction`.`id` = 513850 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-06-13 11:47:50 [0.16ms] */
select * from `invoice` where `transaction_id` = 513851 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-06-13 11:47:50 [0.14ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 489519 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-06-13 11:47:50 [0.17ms] */
select * from `transaction` where `transaction`.`id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-06-13 11:47:50 [0.15ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-06-13 11:47:50 [0.14ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-06-13 11:47:50 [0.13ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-06-13 11:47:50 [0.14ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 1 - 2025-06-13 11:47:50 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 2 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 3 - 2025-06-13 11:47:50 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 4 - 2025-06-13 11:47:50 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 5 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 6 - 2025-06-13 11:47:50 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 7 - 2025-06-13 11:47:50 [0.19ms] */
select * from `transaction` where `id` = 513851 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 8 - 2025-06-13 11:47:50 [0.15ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 513851 and `payment_documents`.`transaction_id` is not null and `type` = 'SERVICE_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 9 - 2025-06-13 11:47:50 [0.13ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 513851 and `payment_documents`.`transaction_id` is not null and `type` = 'GOV_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 10 - 2025-06-13 11:47:50 [0.17ms] */
select * from `invoice` where `invoice`.`id` = 489519 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 11 - 2025-06-13 11:47:50 [0.18ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 489519 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-06-13 11:47:51 [2ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-06-13 11:47:51 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-06-13 11:47:51 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-06-13 11:47:51 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-06-13 11:47:51 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6b2ff2336c3c25da97c1455089d8860b8cea821afa64f6a474aa35ef76aad2167a0e8ed07c287b3d' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-06-13 11:47:51 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-06-13 11:47:51 [0.37ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
