/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 1 - 2025-05-03 11:44:35 [3.52ms] */
select * from `users` where `email` = 'admin@admin.com' and `status` = 1 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 2 - 2025-05-03 11:44:35 [0.31ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 3 - 2025-05-03 11:44:35 [0.74ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 2 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 4 - 2025-05-03 11:44:35 [12.9ms] */
update `userprofiles` set `last_ip` = '157.51.102.218', `login_count` = 646, `last_login` = '2025-05-03 11:44:35', `userprofiles`.`updated_at` = '2025-05-03 11:44:35' where `id` = 2;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 5 - 2025-05-03 11:44:35 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 6 - 2025-05-03 11:44:35 [0.53ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/login
   Query 7 - 2025-05-03 11:44:35 [0.51ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 1 - 2025-05-03 11:44:36 [6.91ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 2 - 2025-05-03 11:44:36 [0.45ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 3 - 2025-05-03 11:44:36 [0.33ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 4 - 2025-05-03 11:44:36 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 5 - 2025-05-03 11:44:36 [49.87ms] */
select count(*) as aggregate from `party` where `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 6 - 2025-05-03 11:44:36 [18.72ms] */
select count(*) as aggregate from `party` where `created_at` > '2025-05-03' and `party`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 7 - 2025-05-03 11:44:36 [65.12ms] */
select count(*) as aggregate from `vehicle` where `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 8 - 2025-05-03 11:44:36 [30.26ms] */
select count(*) as aggregate from `vehicle` where `created_at` > '2025-05-03' and `vehicle`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-05-03 11:44:36 [121.54ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-02' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 10 - 2025-05-03 11:44:36 [44.25ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-02' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-05-03 11:44:36 [275.04ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-03' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-05-03 11:44:37 [1020.7ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-03' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 1 - 2025-05-03 11:44:55 [2.05ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 2 - 2025-05-03 11:44:55 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 3 - 2025-05-03 11:44:55 [0.33ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 4 - 2025-05-03 11:44:55 [0.37ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 5 - 2025-05-03 11:44:55 [0.39ms] */
select `region`.`name` from `district` inner join `region` on `region`.`id` = `district`.`region_id` where `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports
   Query 6 - 2025-05-03 11:44:55 [0.25ms] */
select `name` from `classification_type` where `classification_type`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports/SiinPayTaxCollectionReport
   Query 1 - 2025-05-03 11:45:01 [6.01ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports/SiinPayTaxCollectionReport
   Query 2 - 2025-05-03 11:45:01 [9.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports/SiinPayTaxCollectionReport
   Query 3 - 2025-05-03 11:45:01 [0.5ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/reports/SiinPayTaxCollectionReport
   Query 4 - 2025-05-03 11:45:01 [0.53ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/admin/log-viewer/logs/2025-05-03/download
   Query 1 - 2025-05-03 11:45:21 [2.31ms] */
select * from `users` where `id` = 2 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/admin/log-viewer/logs/2025-05-03/download
   Query 2 - 2025-05-03 11:45:21 [0.76ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/admin/log-viewer/logs/2025-05-03/download
   Query 3 - 2025-05-03 11:45:21 [0.6ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/admin/log-viewer/logs/2025-05-03/download
   Query 4 - 2025-05-03 11:45:21 [0.36ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 12:47:53 [2.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-05-03 12:47:53 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:47:53 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:47:53 [5.96ms] */
update `userprofiles` set `login_count` = 1983, `last_login` = '2025-05-03 12:47:53', `userprofiles`.`updated_at` = '2025-05-03 12:47:53' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:47:53 [0.29ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:47:53 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 12:47:53 [0.55ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:47:53 [0.35ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:47:53 [0.28ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 12:47:53 [0.27ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 12:47:53 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:47:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:47:53 [3.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489', 154, 5, '[]', 0, '2025-05-03 12:47:53', '2025-05-03 12:47:53', '2026-05-03 12:47:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:47:53 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:47:53 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-03 12:47:53 [2.1ms] */
select * from `oauth_access_tokens` where `id` = '6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-03 12:47:53 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-03 12:47:53 [0.44ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-03 12:47:53 [0.42ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-03 12:47:53 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '6527758e2a044ed871f722bd40bc0a929e8a4948cc68de424a23c1e0765e4d80a0cff0327192c489' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-03 12:47:53 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-03 12:47:53 [1.59ms] */
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` = 'YB189' 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-05-03 12:47:53 [0.36ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-03 12:47:53 [0.41ms] */
select * from `vehicle` where `id` = 88508 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-03 12:47:53 [0.49ms] */
select * from `party_vehicle` where `vehicle_id` = 88508 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 12:47:55 [2.29ms] */
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 1 - 2025-05-03 12:47:55 [1.28ms] */
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 1 - 2025-05-03 12:47:55 [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-05-03 12:47:55 [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-05-03 12:47:55 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:47:55 [5.91ms] */
update `userprofiles` set `login_count` = 1984, `last_login` = '2025-05-03 12:47:55', `userprofiles`.`updated_at` = '2025-05-03 12:47:55' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:47:55 [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-05-03 12:47:55 [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-05-03 12:47:55 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:47:55 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:47:55 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:47:55 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 12:47:55 [0.21ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:47:55 [3.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8', 154, 5, '[]', 0, '2025-05-03 12:47:55', '2025-05-03 12:47:55', '2026-05-03 12:47:55');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:47:55 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:47:55 [2.81ms] */
update `userprofiles` set `login_count` = 1985, `userprofiles`.`updated_at` = '2025-05-03 12:47:55' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:47:55 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:47:55 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 12:47:55 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:47:55 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:47:55 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:47:55 [0.66ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 12:47:55 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:47:55 [3.15ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 12:47:55 [0.35ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:47:55 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 12:47:55 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:47:55 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:47:55 [2.83ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3', 154, 5, '[]', 0, '2025-05-03 12:47:55', '2025-05-03 12:47:55', '2026-05-03 12:47:55');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:47:55 [1.71ms] */
update `userprofiles` set `login_count` = 1986, `userprofiles`.`updated_at` = '2025-05-03 12:47:55' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:47:55 [0.3ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:47:55 [0.61ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:47:55 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 12:47:55 [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 15 - 2025-05-03 12:47:55 [2.93ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:47:55 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:47:55 [0.22ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 12:47:55 [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-05-03 12:47:55 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:47:55 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:47:55 [3.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142', 154, 5, '[]', 0, '2025-05-03 12:47:55', '2025-05-03 12:47:55', '2026-05-03 12:47:55');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:47:55 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:47:55 [2.61ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-03 12:47:55 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-03 12:47:55 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-03 12:47:55 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-03 12:47:55 [0.26ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-03 12:47:55 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '78d644d6caee571ce394757461f35f3998cc03b424d8e11314c4dcacd56acbeea8ac74eea7d78fe8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-03 12:47:55 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-03 12:47:55 [2.67ms] */
select DISTINCT payment.id as payment_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, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 55378 and `vehicle`.`license_plate` = 'YB189' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-03 12:47:55 [0.67ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177827 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-03 12:47:55 [0.46ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177726 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-05-03 12:47:55 [0.67ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177594 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 11 - 2025-05-03 12:47:55 [0.53ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 100020 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 12 - 2025-05-03 12:47:55 [0.63ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 28998 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-03 12:47:55 [1.62ms] */
select * from `oauth_access_tokens` where `id` = '4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-03 12:47:55 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '4ad06791c988b40916e55c10bfaac8ff53c41a0bd37758a3da33ef25df7cba407e8fb4bac00771b3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-03 12:47:55 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-03 12:47:55 [0.22ms] */
select count(*) as aggregate from `party` where `id` = 55378;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-03 12:47:55 [0.22ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YB189';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-03 12:47:55 [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` = 55378 and `license_plate` = 'YB189' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-03 12:47:55 [1.33ms] */
select * from `oauth_access_tokens` where `id` = '8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-03 12:47:55 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-03 12:47:55 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '8e2192b9104c597e2da4f10a49db8ae0fdff1f6760303ab1898ad4f8bb04dc744962fa416792e142' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-03 12:47:55 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-03 12:47:55 [0.36ms] */
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` = 'YB189' 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-05-03 12:47:55 [0.15ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-03 12:47:55 [0.15ms] */
select * from `vehicle` where `id` = 88508 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-03 12:47:55 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 88508 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 12:49:08 [2.03ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 12:49:08 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:49:08 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:49:08 [11.53ms] */
update `userprofiles` set `login_count` = 1987, `last_login` = '2025-05-03 12:49:08', `userprofiles`.`updated_at` = '2025-05-03 12:49:08' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:49:08 [0.31ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:49:08 [0.69ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 12:49:08 [0.3ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:49: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-05-03 12:49: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-05-03 12:49: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-05-03 12:49:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:49:08 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:49:08 [3.39ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c', 154, 5, '[]', 0, '2025-05-03 12:49:08', '2025-05-03 12:49:08', '2026-05-03 12:49:08');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:49:08 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:49:08 [3.14ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 1 - 2025-05-03 12:49:08 [2.47ms] */
select * from `oauth_access_tokens` where `id` = '11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 2 - 2025-05-03 12:49:08 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 3 - 2025-05-03 12:49:08 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 4 - 2025-05-03 12:49:08 [0.25ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 5 - 2025-05-03 12:49:08 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '11da732bb3692334fd032d6425e289929f26cc3437494b4c129f04bc9f69d3412a0b7c10ffa8620c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 6 - 2025-05-03 12:49:08 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 7 - 2025-05-03 12:49:09 [78.12ms] */
select count(*) as aggregate from `payment` where `external_payment_reference_no` = 'PR2DADA930';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 8 - 2025-05-03 12:49:09 [0.8ms] */
select * from `payment_method` where `name` = 'SomBank' and `payment_method`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 9 - 2025-05-03 12:49:09 [0.54ms] */
select * from `invoice` where `id` in (520135) and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 10 - 2025-05-03 12:49:09 [6.92ms] */
insert into `Payment` (`payment_amount`, `payment_date`, `external_payment_reference_no`, `payment_method_id`, `paid_by`, `paid_by_mobile`, `payment_collected_by`, `district_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (38.00, '2025-05-03 12:49:09', 'PR2DADA930', 6, 'Ibrahim', +2529524736623, 1, 1, 154, 154, '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 11 - 2025-05-03 12:49:09 [0.23ms] */
select * from `Payment` where `id` = 177929 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 12 - 2025-05-03 12:49:09 [5.11ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('Payment', '{"attributes":{"payment_method_id":6,"payment_amount":"38.00","payment_date":"2025-05-03 12:49:09","external_payment_reference_no":"PR2DADA930","payment_receipt_number":null,"siinpay_payref_number":null,"paid_by":"Ibrahim","paid_by_mobile":"+2529524736623","district_id":1,"migration_id":null,"payment_collected_by":1}}', 154, 'App\Models\User', 177929, 'Modules\Transaction\Entities\Payment', 'created', '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 13 - 2025-05-03 12:49:09 [4.23ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-05-03 12:49:09', 520135, 177929, '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-05-03 12:49:09 [0.36ms] */
select * from `invoice` where `invoice`.`id` = 520135 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-05-03 12:49:09 [0.49ms] */
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` = 520135 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-05-03 12:49:09 [2.42ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 520135 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-05-03 12:49:09 [3.51ms] */
update `invoice` set `invoice_amount` = 38, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 38, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-05-03 12:49:09' where `id` = 520135;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-05-03 12:49:09 [0.34ms] */
select * from `invoice` where `id` = 520135 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-05-03 12:49:09 [4.14ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 520135, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-05-03 12:49:09 [498.69ms] */
select * from `transaction` where `invoice_id` = 520135 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-05-03 12:49:09 [5.92ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-05-03 12:49:09' where `id` = 434608 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-05-03 12:49:09 [0.41ms] */
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_payments
   Query 23 - 2025-05-03 12:49:09 [0.47ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 24 - 2025-05-03 12:49:09 [0.35ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-05-03 12:49:09 [0.43ms] */
select * from `transaction` where `transaction`.`id` = 544467 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-05-03 12:49:09 [0.38ms] */
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_payments
   Query 27 - 2025-05-03 12:49:09 [0.3ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-05-03 12:49:09 [0.22ms] */
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_payments
   Query 29 - 2025-05-03 12:49:09 [0.59ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (544467, 'APPROVED', '2025-05-03 12:49:09', 5, 154, null, 154, 154, '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-05-03 12:49:09 [0.31ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 31 - 2025-05-03 12:49:09 [0.75ms] */
update `transaction` set `current_workflow_state_id` = 8, `status` = 'INPROGRESS', `updated_by` = 154, `transaction`.`updated_at` = '2025-05-03 12:49:09' where `id` = 544467;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-05-03 12:49:09 [0.22ms] */
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_payments
   Query 33 - 2025-05-03 12:49:09 [0.34ms] */
select * from `invoice` where `invoice`.`id` = 520135 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-05-03 12:49:09 [0.38ms] */
select * from `vehicle_tax` where `transaction_id` = 544467 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-05-03 12:49:09 [0.19ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-05-03 12:49:09' where `id` = 434608;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-05-03 12:49:09 [0.21ms] */
select * from `vehicle_tax` where `id` = 434608 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-05-03 12:49:09 [0.4ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 434608, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 38 - 2025-05-03 12:49:09 [0.32ms] */
select * from `vehicle_tax` where `id` = 434608 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 39 - 2025-05-03 12:49:09 [0.36ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 77475 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 40 - 2025-05-03 12:49:09 [0.34ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 41 - 2025-05-03 12:49:09 [0.39ms] */
select * from `person` where `person`.`id` = 55378 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 42 - 2025-05-03 12:49:09 [0.38ms] */
select * from `vehicle` where `vehicle`.`id` = 88508 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 43 - 2025-05-03 12:49:09 [0.31ms] */
select * from `term` where `term`.`id` = 105 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 44 - 2025-05-03 12:49:09 [4.4ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 45 - 2025-05-03 12:49:09 [3.85ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'SERVICE_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 46 - 2025-05-03 12:49:09 [3.06ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (1, 'GOV_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 47 - 2025-05-03 12:49:09 [1.48ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (1, 'SERVICE_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-03 12:49:09', '2025-05-03 12:49:09');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 48 - 2025-05-03 12:49:10 [446.65ms] */
select * from `transaction` where `invoice_id` in (520135) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 49 - 2025-05-03 12:49:10 [1.25ms] */
delete from `payment_documents` where `transaction_id` = 544467 and `type` in ('GOV_RECEIPT_IMAGE', 'SERVICE_RECEIPT_IMAGE');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 50 - 2025-05-03 12:49:10 [3.32ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (544467, 'GOV_RECEIPT_IMAGE', 1, 6, '2025-05-03 12:49:10', '2025-05-03 12:49:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 51 - 2025-05-03 12:49:10 [2.91ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (544467, 'SERVICE_RECEIPT_IMAGE', 1, 6, '2025-05-03 12:49:10', '2025-05-03 12:49:10');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 12:49:17 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 12:49:17 [1.36ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 12:49:17 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:49:17 [0.53ms] */
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 2 - 2025-05-03 12:49:17 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 12:49:17 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:49:17 [2.66ms] */
update `userprofiles` set `login_count` = 1988, `last_login` = '2025-05-03 12:49:17', `userprofiles`.`updated_at` = '2025-05-03 12:49:17' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 12:49:17 [9.75ms] */
update `userprofiles` set `login_count` = 1988, `last_login` = '2025-05-03 12:49:17', `userprofiles`.`updated_at` = '2025-05-03 12:49:17' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 12:49:17 [0.15ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:49: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/login
   Query 5 - 2025-05-03 12:49:17 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 12:49:17 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 12:49:17 [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-05-03 12:49:17 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:49:17 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:49:17 [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-05-03 12:49:17 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 12:49:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:49:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 12:49:17 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 12:49:17 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 12:49:17 [0.32ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:49:17 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53', 154, 5, '[]', 0, '2025-05-03 12:49:17', '2025-05-03 12:49:17', '2026-05-03 12:49:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 12:49:17 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 12:49:17 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 12:49:17 [3.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b', 154, 5, '[]', 0, '2025-05-03 12:49:17', '2025-05-03 12:49:17', '2026-05-03 12:49:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:49:17 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:49:17 [5.28ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 12:49:17 [0.6ms] */
select * from `oauth_access_tokens` where `id` = '95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 12:49:17 [3.5ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-03 12:49:17 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-03 12:49:17 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-03 12:49:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-03 12:49:17 [1.42ms] */
select * from `oauth_access_tokens` where `id` = '95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-03 12:49:17 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-03 12:49:17 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-03 12:49:17 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-03 12:49:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2d946d9adeab06d0d8309889d80f780ec8d4eca40679931075cd905445e737c12c07b03975dd1b53' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-03 12:49:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-03 12:49:17 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-03 12:49:17 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '95b1968fa032964e0aa4b84d285e03fd2aafb2c2afce27a8683f6c3ff7cc09ed763dcf4f90ccfa1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-03 12:49:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-03 12:49:17 [0.14ms] */
select count(*) as aggregate from `party` where `id` = 55378;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-03 12:49:17 [0.12ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YB189';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-03 12:49:17 [1.72ms] */
select DISTINCT payment.id as payment_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, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 55378 and `vehicle`.`license_plate` = 'YB189' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-03 12:49:17 [0.7ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177929 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-03 12:49:17 [1.13ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 55378 and `license_plate` = 'YB189' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-03 12:49:17 [0.6ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177827 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-05-03 12:49:17 [0.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177726 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 11 - 2025-05-03 12:49:17 [0.87ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177594 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 12 - 2025-05-03 12:49:17 [0.81ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 100020 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 13 - 2025-05-03 12:49:17 [0.92ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 28998 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 13:01:41 [2.07ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 13:01:41 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 13:01:41 [0.59ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 13:01:41 [6.46ms] */
update `userprofiles` set `login_count` = 1989, `last_login` = '2025-05-03 13:01:41', `userprofiles`.`updated_at` = '2025-05-03 13:01:41' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 13:01:41 [0.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 13:01:41 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 13:01: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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 13:01:41 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 13:01:41 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 13:01: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-05-03 13:01:41 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 13:01:41 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 13:01:41 [3.54ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7', 154, 5, '[]', 0, '2025-05-03 13:01:41', '2025-05-03 13:01:41', '2026-05-03 13:01:41');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 13:01:41 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 13:01:41 [5.37ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-03 13:01:41 [2.26ms] */
select * from `oauth_access_tokens` where `id` = '55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-03 13:01:41 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-03 13:01:41 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-03 13:01:41 [0.34ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-03 13:01:41 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '55d083c86a58e6dd768eeb7672389aa4959681b2e858d5fe2be7df01c905c45e2db3f2932481f8c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-03 13:01:41 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-03 13:01:41 [0.33ms] */
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` = 'YB189' 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-05-03 13:01:41 [0.15ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-03 13:01:41 [0.15ms] */
select * from `vehicle` where `id` = 88508 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-03 13:01:41 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 88508 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 13:01:43 [2.16ms] */
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 1 - 2025-05-03 13:01:43 [1.26ms] */
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 1 - 2025-05-03 13:01:43 [1.83ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 13:01:43 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 13:01:43 [0.45ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 13:01:43 [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-05-03 13:01:43 [0.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 13:01:43 [1.71ms] */
update `userprofiles` set `login_count` = 1990, `last_login` = '2025-05-03 13:01:43', `userprofiles`.`updated_at` = '2025-05-03 13:01:43' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 13:01:43 [5.61ms] */
update `userprofiles` set `login_count` = 1990, `last_login` = '2025-05-03 13:01:43', `userprofiles`.`updated_at` = '2025-05-03 13:01:43' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 13:01:43 [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 5 - 2025-05-03 13:01:43 [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-05-03 13:01:43 [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 6 - 2025-05-03 13:01:43 [0.55ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 13:01:43 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 13:01:43 [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 7 - 2025-05-03 13:01:43 [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 3 - 2025-05-03 13:01:43 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 13:01:43 [0.15ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 13:01:43 [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-05-03 13:01:43 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 13:01:43 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 13:01:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-03 13:01:43 [3.06ms] */
update `userprofiles` set `login_count` = 1991, `userprofiles`.`updated_at` = '2025-05-03 13:01:43' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 13:01:43 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 13:01:43 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 13:01:43 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 13:01:43 [0.17ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 13:01:43 [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 11 - 2025-05-03 13:01:43 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 13:01:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 13:01:43 [0.15ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 13:01:43 [3.22ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee', 154, 5, '[]', 0, '2025-05-03 13:01:43', '2025-05-03 13:01:43', '2026-05-03 13:01:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-03 13:01:43 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 13:01:43 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 13:01:43 [4.12ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e', 154, 5, '[]', 0, '2025-05-03 13:01:43', '2025-05-03 13:01:43', '2026-05-03 13:01:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 13:01:43 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-03 13:01:43 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 13:01:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 13:01:43 [2.84ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3', 154, 5, '[]', 0, '2025-05-03 13:01:43', '2025-05-03 13:01:43', '2026-05-03 13:01:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 13:01:43 [0.39ms] */
select * from `oauth_access_tokens` where `id` = '8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 13:01:43 [0.2ms] */
select * from `oauth_access_tokens` where `id` = 'f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 13:01:43 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 13:01:43 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 13:01:43 [2.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 13:01:43 [3.77ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-03 13:01:44 [2.29ms] */
select * from `oauth_access_tokens` where `id` = '61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-03 13:01:44 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-03 13:01:44 [0.34ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '61a31ce60d722ea80b635c1b2115af3fa82d62e2ae94f11f4a3da9be777cc9bc08c8e104f095854e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-03 13:01:44 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-03 13:01:44 [0.16ms] */
select count(*) as aggregate from `party` where `id` = 55378;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-03 13:01:44 [0.13ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'YB189';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-03 13:01:44 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 55378 and `license_plate` = 'YB189' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-03 13:01:44 [6.57ms] */
select * from `oauth_access_tokens` where `id` = 'f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-03 13:01:44 [1.91ms] */
select * from `oauth_access_tokens` where `id` = '8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-03 13:01:44 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-03 13:01:44 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-03 13:01:44 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-03 13:01:44 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'f29381cf6449c2b5b56f51f3f472159228592d0ce73d8d8bc9be94c6929b3a55f6b709cc8d9dc9e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-03 13:01:44 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '8f52d80b7e15462fd296c7bbc5e670a6f0857f9f51c5f7cedafe44428af65e5a829620c496afdbee' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-03 13:01:44 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-03 13:01:44 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-03 13:01:44 [0.37ms] */
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` = 'YB189' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-03 13:01:44 [0.33ms] */
select DISTINCT payment.id as payment_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, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`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 `service`.`name` = 'Tax' and `transaction`.`party_id` = 55378 and `vehicle`.`license_plate` = 'YB189' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-03 13:01:44 [0.17ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177929 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-03 13:01:44 [0.16ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177827 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-03 13:01:44 [0.16ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-05-03 13:01:44 [0.15ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177726 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 11 - 2025-05-03 13:01:44 [0.17ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 177594 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-03 13:01:44 [0.16ms] */
select * from `vehicle` where `id` = 88508 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 12 - 2025-05-03 13:01:44 [0.18ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 100020 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 13 - 2025-05-03 13:01:44 [0.15ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` 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` where `invoice_payment`.`payment_id` = 28998 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-03 13:01:44 [0.18ms] */
select * from `party_vehicle` where `vehicle_id` = 88508 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-03 13:06:19 [1.41ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-03 13:06:19 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-03 13:06:19 [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-05-03 13:06:19 [20.47ms] */
update `userprofiles` set `login_count` = 1992, `last_login` = '2025-05-03 13:06:19', `userprofiles`.`updated_at` = '2025-05-03 13:06:19' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-03 13:06:19 [0.32ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-03 13:06:19 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-03 13:06:19 [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-05-03 13:06:19 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-03 13:06:19 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-03 13:06:19 [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-05-03 13:06:19 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-03 13:06:19 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-03 13:06:19 [3.7ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9', 154, 5, '[]', 0, '2025-05-03 13:06:19', '2025-05-03 13:06:19', '2026-05-03 13:06:19');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-03 13:06:19 [0.37ms] */
select * from `oauth_access_tokens` where `id` = 'fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-03 13:06:19 [5.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-03 13:06:19 [2.38ms] */
select * from `oauth_access_tokens` where `id` = 'fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-03 13:06:19 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-03 13:06:19 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-03 13:06:19 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-03 13:06:19 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'fa5031472de87d74c9c439c49bb14a74f2c47e5ca4f8f78e1fd0b23a49979631a7d1b861a78e69e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-03 13:06:19 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-03 13:06:19 [0.34ms] */
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` = 'YB189' 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-05-03 13:06:19 [0.15ms] */
select * from `party` where `party`.`id` = 55378 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-03 13:06:19 [0.15ms] */
select * from `vehicle` where `id` = 88508 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-03 13:06:19 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 88508 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
