select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:22:22 [0.33ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:22:22 [0.17ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:22:22 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 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-02-17 12:22:28 [2.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:22:28 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:22:28 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:22:28 [11.72ms] */
update `userprofiles` set `login_count` = 857, `last_login` = '2025-02-17 12:22:28', `userprofiles`.`updated_at` = '2025-02-17 12:22:28' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:22:28 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:22:28 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:22:28 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:22:28 [0.18ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:22:28 [0.15ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:22:28 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:22:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:22:28 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577', 149, 5, '[]', 0, '2025-02-17 12:22:28', '2025-02-17 12:22:28', '2026-02-17 12:22:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:22:28 [1.54ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:22:28 [0.42ms] */
select * from `oauth_access_tokens` where `id` = 'df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:22:28 [4.74ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:22:28 [1.5ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:22:28 [0.22ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:22:28 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:22:28 [3.16ms] */
update `userprofiles` set `login_count` = 858, `userprofiles`.`updated_at` = '2025-02-17 12:22:28' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:22:28 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:22:28 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:22:28 [0.35ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:22:28 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:22:28 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:22:28 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:22:28 [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-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:22:28 [3.08ms] */
update `userprofiles` set `login_count` = 859, `userprofiles`.`updated_at` = '2025-02-17 12:22:28' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:22:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:22:28 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:22:28 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:22:28 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:22:28 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436', 149, 5, '[]', 0, '2025-02-17 12:22:28', '2025-02-17 12:22:28', '2026-02-17 12:22:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:22:28 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:22:28 [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-02-17 12:22:28 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:22:28 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:22:28 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:22:28 [3.65ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba', 149, 5, '[]', 0, '2025-02-17 12:22:28', '2025-02-17 12:22:28', '2026-02-17 12:22:28');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:22:28 [6.3ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:22:28 [0.48ms] */
select * from `oauth_access_tokens` where `id` = 'b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:22:28 [3.33ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:22:28 [1.61ms] */
select * from `oauth_access_tokens` where `id` = 'df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:22:28 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:22:28 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:22:28 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'df191f4a67f593598c57401d688a4ea05916c01f7c131e2380067c068a64c8336ea89336132d1577' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:22:28 [0.32ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:22:28 [2.37ms] */
select * from `oauth_access_tokens` where `id` = '6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:22:28 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:22:28 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:22:28 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:22:28 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '6713e59f9b4545a2188ff3129f2e68f704b77cafab823ff16d038bb20054084166fa4bf620d43436' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:22:28 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:22:28 [0.53ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:22:28 [1.43ms] */
select * from `oauth_access_tokens` where `id` = 'b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:22:28 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:22:28 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'b5626b18c545d27c84a60886395964c77e89a898745514e017ae927b23e498ca4f4cb5899a22f6ba' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:22:28 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:22:28 [0.33ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:22:28 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:22:28 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 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-02-17 12:26:43 [2.53ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:26:43 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:26:43 [1.48ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:26:43 [6.68ms] */
update `userprofiles` set `login_count` = 860, `last_login` = '2025-02-17 12:26:43', `userprofiles`.`updated_at` = '2025-02-17 12:26:43' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:26:43 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:26:43 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:26:43 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:26:43 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:26: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-02-17 12:26: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-02-17 12:26:43 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:26:43 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:26:43 [4.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2', 149, 5, '[]', 0, '2025-02-17 12:26:43', '2025-02-17 12:26:43', '2026-02-17 12:26:43');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:26:43 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:26:43 [3.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:26:43 [1.71ms] */
select * from `oauth_access_tokens` where `id` = '8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:26:43 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:26:43 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:26:43 [0.23ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:26:43 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '8b40737f5d452e5c72b3580afe672b7631ec744339d67f661f653cf393c1059accd5fa1ed41c20f2' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:26:43 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:26:43 [4.77ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `payment`.`id` = 75699 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:41:38 [1.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:41:38 [0.33ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:41:38 [0.92ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:41:38 [10.74ms] */
update `userprofiles` set `login_count` = 861, `last_login` = '2025-02-17 12:41:38', `userprofiles`.`updated_at` = '2025-02-17 12:41:38' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:41:38 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:41:38 [0.68ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:41:38 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:41:38 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:41:38 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:41:38 [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-02-17 12:41:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:41:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:41:38 [3.93ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8', 149, 5, '[]', 0, '2025-02-17 12:41:38', '2025-02-17 12:41:38', '2026-02-17 12:41:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:41:38 [0.4ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:41:38 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:41:38 [1.49ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:41:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:41:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:41:38 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:41:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:41:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:41:38 [4.87ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'LI574' 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-02-17 12:41:38 [0.27ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:41:38 [0.26ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:41:39 [1.41ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:41:39 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:41:39 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:41:39 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:41:39 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:41:39 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:41:39 [1.73ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'TETSD451522' 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-02-17 12:41:39 [0.24ms] */
select * from `vehicle` where `id` = 99459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:41:39 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 99459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:41:39 [1.95ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:41:39 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:41:39 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:41:39 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:41:39 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'bb7f1cb0a64e2e481e3b8cd11ea7fd7bd0bc33144f22df5a2d74b7181871412c0bf30c6c77bbf3a8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:41:39 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:41:39 [1.02ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = '5656SXYVCYHC' 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-02-17 12:41:39 [0.34ms] */
select * from `vehicle` where `id` = 99458 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:41:39 [0.38ms] */
select * from `party_vehicle` where `vehicle_id` = 99458 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-02-17 12:41:46 [2.55ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:41:46 [2.65ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:41:46 [3.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:41:46 [0.28ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:41:46 [0.85ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:41:46 [12.54ms] */
update `userprofiles` set `login_count` = 862, `last_login` = '2025-02-17 12:41:46', `userprofiles`.`updated_at` = '2025-02-17 12:41:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:41:46 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:41:46 [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-02-17 12:41:46 [0.35ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:41:46 [0.24ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:41:46 [0.52ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:41:46 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:41:46 [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-02-17 12:41:46 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:41:46 [3.86ms] */
update `userprofiles` set `login_count` = 863, `userprofiles`.`updated_at` = '2025-02-17 12:41:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:41:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:41:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:41:46 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:41:46 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:41:46 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:41:46 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:41:46 [3.48ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c', 149, 5, '[]', 0, '2025-02-17 12:41:46', '2025-02-17 12:41:46', '2026-02-17 12:41:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:41:46 [1.46ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:41:46 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:41:46 [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-02-17 12:41:46 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:41:46 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:41:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:41:46 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:41:46 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af', 149, 5, '[]', 0, '2025-02-17 12:41:46', '2025-02-17 12:41:46', '2026-02-17 12:41:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:41:46 [4.52ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:41:46 [10.75ms] */
update `userprofiles` set `login_count` = 864, `userprofiles`.`updated_at` = '2025-02-17 12:41:46' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:41:46 [1.62ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:41:46 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:41:46 [0.47ms] */
select * from `oauth_access_tokens` where `id` = '9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:41:46 [0.19ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:41:46 [3.19ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:41:46 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:41:46 [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-02-17 12:41:46 [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-02-17 12:41:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:41:46 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:41:46 [3.91ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862', 149, 5, '[]', 0, '2025-02-17 12:41:46', '2025-02-17 12:41:46', '2026-02-17 12:41:46');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:41:46 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:41:46 [2.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:41:47 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:41:47 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:41:47 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:41:47 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:41:47 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '4af0adc33af86cab14c5c1d56e28e6c615976c9a7e36270f8f69ab08071cad500d65df8e5cabd862' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:41:47 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:41:47 [4.1ms] */
select * from `oauth_access_tokens` where `id` = 'dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:41:47 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:41:47 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:41:47 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:41:47 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'dadba4dcee5626c32db4b144ac39336f038607037b1d3dda729b520d43d5293fb7b33576a00f2f1c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:41:47 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:41:47 [0.35ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'LI574' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:41:47 [8.74ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 39526 and `license_plate` = 'LI574' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-02-17 12:41:47 [0.16ms] */
select * from `vehicle` where `id` = 50459 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:41:47 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 50459 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:41:47 [1.63ms] */
select * from `oauth_access_tokens` where `id` = '9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:41:47 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:41:47 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:41:47 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:41:47 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '9711d2d70310fe4cd22b475f4091fd49f626d8a035bf68b5c87c15772fd0035d54c79e308bc345af' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:41:47 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:41:47 [6.72ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 39526 and `vehicle`.`license_plate` = 'LI574' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:42:53 [2.41ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:42:53 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:42:53 [0.45ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:42:53 [7.24ms] */
update `userprofiles` set `login_count` = 865, `last_login` = '2025-02-17 12:42:53', `userprofiles`.`updated_at` = '2025-02-17 12:42:53' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:42:53 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:42:53 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:42:53 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:42:53 [0.16ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:42:53 [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-02-17 12:42:53 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:42:53 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:42:53 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:42:53 [8.17ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c', 149, 5, '[]', 0, '2025-02-17 12:42:53', '2025-02-17 12:42:53', '2026-02-17 12:42:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:42:53 [0.52ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:42:53 [3.26ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:42:53 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:42:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:42:53 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:42:53 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:42:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:42:53 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:42:53 [0.34ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'VT974' 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-02-17 12:42:53 [0.16ms] */
select * from `vehicle` where `id` = 87933 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:42:53 [0.17ms] */
select * from `party_vehicle` where `vehicle_id` = 87933 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:42:53 [2.24ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:42:53 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:42:53 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:42:53 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:42:53 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '1c0c1160a516f75e088065c162f374c7dd20f2c1bcd013576faf386acbc6a949ba544f50c79bb99c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:42:53 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:42:53 [0.47ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:42:53 [0.25ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:42:53 [0.25ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 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-02-17 12:42:56 [1.51ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:42:56 [0.33ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:42:56 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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 1 - 2025-02-17 12:42:56 [2.08ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:42:56 [5.95ms] */
update `userprofiles` set `login_count` = 866, `last_login` = '2025-02-17 12:42:56', `userprofiles`.`updated_at` = '2025-02-17 12:42:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:42:56 [0.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:42:56 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:42:56 [1.01ms] */
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-02-17 12:42:56 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:42:56 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:42:56 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:42:56 [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-02-17 12:42:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:42:56 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:42:56 [3.23ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522', 149, 5, '[]', 0, '2025-02-17 12:42:56', '2025-02-17 12:42:56', '2026-02-17 12:42:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:42:56 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:42:56 [3.03ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:42:56 [0.33ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:42:56 [0.58ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:42:56 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:42:56 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:42:56 [3.29ms] */
update `userprofiles` set `login_count` = 867, `userprofiles`.`updated_at` = '2025-02-17 12:42:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:42:56 [0.98ms] */
update `userprofiles` set `login_count` = 867, `userprofiles`.`updated_at` = '2025-02-17 12:42:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:42:56 [0.23ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:42:56 [0.92ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:42:56 [0.98ms] */
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-02-17 12:42:56 [1.45ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:42:56 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:42:56 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:42:56 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:42:56 [0.2ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:42:56 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:42:56 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:42:56 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:42:56 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:42:56 [0.52ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:42:56 [1.72ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:42:56 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:42:56 [0.31ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:42:56 [3.59ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9', 149, 5, '[]', 0, '2025-02-17 12:42:56', '2025-02-17 12:42:56', '2026-02-17 12:42:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:42:56 [2.95ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c', 149, 5, '[]', 0, '2025-02-17 12:42:56', '2025-02-17 12:42:56', '2026-02-17 12:42:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:42:56 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'd727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:42:56 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:42:56 [3.41ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:42:56 [5ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:42:56 [1.64ms] */
select * from `oauth_access_tokens` where `id` = '22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:42:56 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:42:56 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:42:56 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:42:56 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '22fc2899e768de065f8170a5162f108f7f839af5b6d952dea21f75670d94b416a93a8b5c58feb522' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:42:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:42:56 [0.35ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:42:57 [2.22ms] */
select * from `oauth_access_tokens` where `id` = 'd727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:42:57 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'd727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:42:57 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:42:57 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:42:57 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd727f20668de384ed7b3f44b30a8e09f7b58f3b3558bf023d7b410ed0d0a31d5af34938bd736e6e9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:42:57 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:42:57 [0.34ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:42:57 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:42:57 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:42:57 [2.2ms] */
select * from `oauth_access_tokens` where `id` = '1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:42:57 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:42:57 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:42:57 [0.24ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:42:57 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '1abab103cdb0bdeceb9b9061f87218dc89369ddf9cb66f3f875bc9b760fba3cd99a6374e3035fc9c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:42:57 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:42:57 [0.42ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:52:01 [1.58ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:52:01 [1.48ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:52:02 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:52:02 [0.48ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:52:02 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:52:02 [0.33ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:52:02 [5.65ms] */
update `userprofiles` set `login_count` = 868, `last_login` = '2025-02-17 12:52:02', `userprofiles`.`updated_at` = '2025-02-17 12:52:02' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:52:02 [11.56ms] */
update `userprofiles` set `login_count` = 868, `last_login` = '2025-02-17 12:52:02', `userprofiles`.`updated_at` = '2025-02-17 12:52:02' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:52:02 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:52:02 [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 5 - 2025-02-17 12:52:02 [0.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:52:02 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:52:02 [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-02-17 12:52:02 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:52:02 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:52:02 [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-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:52:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:52:02 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:52:02 [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-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:52:02 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:52:02 [3.53ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38', 149, 5, '[]', 0, '2025-02-17 12:52:02', '2025-02-17 12:52:02', '2026-02-17 12:52:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:52:02 [3.19ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851', 149, 5, '[]', 0, '2025-02-17 12:52:02', '2025-02-17 12:52:02', '2026-02-17 12:52:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:52:02 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:52:02 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:52:02 [3.35ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:52:02 [5.32ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:52:02 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:52:02 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '541da197d2a22ce6a20d0a43ae1a21ea3635927fcb0898c955ab1a430167db4152a144952377fe38' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:52:02 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:52:02 [0.35ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:52:02 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:52:02 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:52:02 [2.22ms] */
select * from `oauth_access_tokens` where `id` = '0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:52:02 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:52:02 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:52:02 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:52:02 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '0475e576dd420ac591cc91c93fe0fe94463016c84b722187035b44be92b29cb6aef9b9e64b1a9851' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:52:02 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:52:02 [0.43ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:52:02 [2.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:52:02 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:52:02 [0.39ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:52:02 [9.29ms] */
update `userprofiles` set `login_count` = 869, `userprofiles`.`updated_at` = '2025-02-17 12:52:02' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:52:02 [0.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:52:02 [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-02-17 12:52:02 [0.4ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:52:02 [0.29ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:52:02 [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-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:52:02 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:52:02 [3.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb', 149, 5, '[]', 0, '2025-02-17 12:52:02', '2025-02-17 12:52:02', '2026-02-17 12:52:02');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:52:02 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:52:02 [2.77ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:52:02 [1.5ms] */
select * from `oauth_access_tokens` where `id` = '008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:52:02 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:52:02 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '008d3e3f0ffd08f19e34201fb90329816737f15d34c29b9d71cdedfa3bcdca5f9f180e0dd1b471eb' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:52:02 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:52:02 [0.35ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:52:38 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:52:38 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:52:38 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:52:38 [5.84ms] */
update `userprofiles` set `login_count` = 870, `last_login` = '2025-02-17 12:52:38', `userprofiles`.`updated_at` = '2025-02-17 12:52:38' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:52:38 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:52:38 [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-02-17 12:52:38 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:52:38 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:52:38 [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-02-17 12:52:38 [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-02-17 12:52:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:52:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:52:38 [3.02ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d', 149, 5, '[]', 0, '2025-02-17 12:52:38', '2025-02-17 12:52:38', '2026-02-17 12:52:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:52:38 [0.23ms] */
select * from `oauth_access_tokens` where `id` = 'e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:52:38 [2.83ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:52:38 [1.41ms] */
select * from `oauth_access_tokens` where `id` = 'e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:52:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:52:38 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:52:38 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:52:38 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e4a516be0b967764035ba6ddab6f8e5583395dbcde7bb60eb54f9907461a5c0948d95d32a70e972d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:52:38 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:52:38 [159.82ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `payment`.`id` = 123849 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:12 [1.55ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:12 [1.45ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:12 [1.28ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:12 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:12 [1.61ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:54:12 [0.21ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:12 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:54:12 [3.4ms] */
update `userprofiles` set `login_count` = 871, `last_login` = '2025-02-17 12:54:12', `userprofiles`.`updated_at` = '2025-02-17 12:54:12' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:54:12 [6.55ms] */
update `userprofiles` set `login_count` = 871, `last_login` = '2025-02-17 12:54:12', `userprofiles`.`updated_at` = '2025-02-17 12:54:12' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:12 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:12 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:12 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:12 [0.46ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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 6 - 2025-02-17 12:54:12 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:12 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:54:12 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:54:12 [0.28ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:54:12 [3.52ms] */
update `userprofiles` set `login_count` = 872, `userprofiles`.`updated_at` = '2025-02-17 12:54:12' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:12 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:12 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:54:12 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:12 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:12 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:12 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:12 [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-02-17 12:54:12 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:54:12 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:54:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:54:12 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:12 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:12 [0.11ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:12 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:54:12 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:54:12 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:12 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:12 [12.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94', 149, 5, '[]', 0, '2025-02-17 12:54:12', '2025-02-17 12:54:12', '2026-02-17 12:54:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:12 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'd081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:12 [22.71ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f', 149, 5, '[]', 0, '2025-02-17 12:54:12', '2025-02-17 12:54:12', '2026-02-17 12:54:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:12 [21.04ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87', 149, 5, '[]', 0, '2025-02-17 12:54:12', '2025-02-17 12:54:12', '2026-02-17 12:54:12');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:12 [12.33ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:12 [0.36ms] */
select * from `oauth_access_tokens` where `id` = 'dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:12 [0.65ms] */
select * from `oauth_access_tokens` where `id` = 'a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:12 [11.72ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:12 [15.2ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:54:13 [1.5ms] */
select * from `oauth_access_tokens` where `id` = 'dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:54:13 [0.17ms] */
select * from `oauth_access_tokens` where `id` = 'dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:54:13 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:54:13 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:54:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'dd5d151aea90fc2a9ea0d08a4acf5804239cb31545afe06c8e6a1ff4508758dc4942414115c1340f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:54:13 [0.34ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 58008 and `vehicle`.`license_plate` = 'VT974' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:54:13 [1.52ms] */
select * from `oauth_access_tokens` where `id` = 'a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:54:13 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'a538cee089055c53c0abd638dc9c8f1be10123593401358e2ae2d05a3e0444a0e05419641badda87' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:54:13 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:54:13 [1.38ms] */
select * from `oauth_access_tokens` where `id` = 'd081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:54:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'd081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:54:13 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:54:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'd081e6de5022e00601119b4557fd508594363fe088c2b39493600e4a74fc58d03c09197184967a94' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:54:13 [0.35ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:54:13 [0.6ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'VT974' 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-02-17 12:54:13 [0.33ms] */
select * from `vehicle` where `id` = 87933 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:54:13 [0.31ms] */
select * from `party_vehicle` where `vehicle_id` = 87933 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-02-17 12:54:34 [1.5ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:34 [1.36ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:34 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:34 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:34 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:54:34 [11.13ms] */
update `userprofiles` set `login_count` = 873, `last_login` = '2025-02-17 12:54:34', `userprofiles`.`updated_at` = '2025-02-17 12:54:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:34 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:34 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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 5 - 2025-02-17 12:54:34 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:34 [0.59ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:54:34 [2.89ms] */
update `userprofiles` set `login_count` = 874, `userprofiles`.`updated_at` = '2025-02-17 12:54:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:54:34 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:34 [0.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:34 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:54:34 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:34 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:34 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:54:34 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:54:34 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:34 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:34 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:34 [0.22ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:34 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 12:54:34 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 12:54:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:34 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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 12 - 2025-02-17 12:54:34 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:34 [3.85ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c', 149, 5, '[]', 0, '2025-02-17 12:54:34', '2025-02-17 12:54:34', '2026-02-17 12:54:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 12:54:34 [2.08ms] */
update `userprofiles` set `login_count` = 875, `userprofiles`.`updated_at` = '2025-02-17 12:54:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:34 [1.72ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5', 149, 5, '[]', 0, '2025-02-17 12:54:34', '2025-02-17 12:54:34', '2026-02-17 12:54:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:34 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:34 [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-02-17 12:54:34 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:34 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:34 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:34 [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-02-17 12:54:34 [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-02-17 12:54:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:34 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:34 [3.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:34 [0.25ms] */
select * from `oauth_access_tokens` where `id` = '473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:34 [1.74ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b', 149, 5, '[]', 0, '2025-02-17 12:54:34', '2025-02-17 12:54:34', '2026-02-17 12:54:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:34 [4.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:34 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:34 [2.72ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 12:54:34 [2.69ms] */
select * from `oauth_access_tokens` where `id` = '473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 12:54:34 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 12:54:34 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 12:54:34 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 12:54:34 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '473837518d5f4f53fc99030b4d13efab9d673a846180893eae9b10d95e82943afebf854af3d2e03c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 12:54:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 12:54:34 [0.34ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 12:54:34 [2.15ms] */
select * from `oauth_access_tokens` where `id` = '60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 12:54:34 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 12:54:34 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 12:54:34 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 12:54:34 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '60f83f96444aeb9001b3ecb7cc6ad56ca22d5888ec95cd4291aa371da0c00ff32481e718d6df0c3b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 12:54:34 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 12:54:34 [0.54ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 12:54:34 [0.19ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 12:54:34 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 12:54:35 [2.42ms] */
select * from `oauth_access_tokens` where `id` = '4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 12:54:35 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 12:54:35 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 12:54:35 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 12:54:35 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '4ffcfffb8cd76d797a4a586d1628c4367eaa208d701fb868f90caa6da5df17199053c8602f639af5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 12:54:35 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 12:54:35 [0.3ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:54:56 [2.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:54:56 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:54:56 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:54:56 [11.32ms] */
update `userprofiles` set `login_count` = 876, `last_login` = '2025-02-17 12:54:56', `userprofiles`.`updated_at` = '2025-02-17 12:54:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:54:56 [0.31ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:54:56 [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-02-17 12:54:56 [0.31ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:54:56 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:54:56 [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-02-17 12:54:56 [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-02-17 12:54:56 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:54:56 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:54:56 [3.77ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('b9bee5e7e26ede33709d89dae9703c01055a58d30300f946715c150c9a47b0ffee2054fc5e1c75a6', 149, 5, '[]', 0, '2025-02-17 12:54:56', '2025-02-17 12:54:56', '2026-02-17 12:54:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:54:56 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'b9bee5e7e26ede33709d89dae9703c01055a58d30300f946715c150c9a47b0ffee2054fc5e1c75a6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:54:56 [3.42ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'b9bee5e7e26ede33709d89dae9703c01055a58d30300f946715c150c9a47b0ffee2054fc5e1c75a6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:56:34 [1.81ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:56:34 [0.27ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:56:34 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:56:34 [11.87ms] */
update `userprofiles` set `login_count` = 877, `last_login` = '2025-02-17 12:56:34', `userprofiles`.`updated_at` = '2025-02-17 12:56:34' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:56:34 [0.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:56:34 [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-02-17 12:56:34 [0.31ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:56:34 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:56:34 [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-02-17 12:56:34 [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-02-17 12:56:34 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:56:34 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:56:34 [3.56ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f833b69e691a3f51f6cd39d605bbfa8d8617d43ecfd27bbed2ef351dad901ddb8c182dbbf096a60e', 149, 5, '[]', 0, '2025-02-17 12:56:34', '2025-02-17 12:56:34', '2026-02-17 12:56:34');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:56:34 [0.24ms] */
select * from `oauth_access_tokens` where `id` = 'f833b69e691a3f51f6cd39d605bbfa8d8617d43ecfd27bbed2ef351dad901ddb8c182dbbf096a60e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:56:34 [3.44ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f833b69e691a3f51f6cd39d605bbfa8d8617d43ecfd27bbed2ef351dad901ddb8c182dbbf096a60e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 12:57:42 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 12:57:42 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 12:57:42 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 12:57:42 [12.93ms] */
update `userprofiles` set `login_count` = 878, `last_login` = '2025-02-17 12:57:42', `userprofiles`.`updated_at` = '2025-02-17 12:57:42' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 12:57:42 [0.29ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 12:57:42 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 12:57:42 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 12:57:42 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 12:57:42 [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-02-17 12:57:42 [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-02-17 12:57:42 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 12:57:42 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 12:57:42 [3.23ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('816b6328dfaa125605752d182e41db3adf24eacbe182de1c94dd7e22869e470e207a1a4e364285a4', 149, 5, '[]', 0, '2025-02-17 12:57:42', '2025-02-17 12:57:42', '2026-02-17 12:57:42');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 12:57:42 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '816b6328dfaa125605752d182e41db3adf24eacbe182de1c94dd7e22869e470e207a1a4e364285a4' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 12:57:42 [2.81ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '816b6328dfaa125605752d182e41db3adf24eacbe182de1c94dd7e22869e470e207a1a4e364285a4';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:02:16 [2.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:02:16 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:02:16 [0.52ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:02:16 [3.49ms] */
update `userprofiles` set `login_count` = 879, `last_login` = '2025-02-17 13:02:16', `userprofiles`.`updated_at` = '2025-02-17 13:02:16' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:02:16 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:02:16 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:02:16 [0.29ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:02:16 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:02:16 [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-02-17 13:02:16 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:02:16 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:02:16 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:02:16 [3.25ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca', 149, 5, '[]', 0, '2025-02-17 13:02:16', '2025-02-17 13:02:16', '2026-02-17 13:02:16');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:02:16 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:02:16 [3.16ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:02:16 [1.53ms] */
select * from `oauth_access_tokens` where `id` = '0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:02:16 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:02:16 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:02:16 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:02:16 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0e8b82b329895bfbd7df150bb8dafc8a5ce7a23fe1823cd8c6930247b261dcf46fd78ba51d0617ca' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:02:16 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:02:16 [0.33ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:03:26 [1.49ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:03:26 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:03:26 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:03:26 [3ms] */
update `userprofiles` set `login_count` = 880, `last_login` = '2025-02-17 13:03:26', `userprofiles`.`updated_at` = '2025-02-17 13:03:26' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:03:26 [0.2ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:03:26 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:03:26 [0.18ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:03:26 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:03:26 [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-02-17 13:03:26 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:03:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:03:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:03:26 [3.14ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('695c5913acf520e2839fc06c9d7f8360620428982fd901c03c46991a36a104b730deb7b55d257fbe', 149, 5, '[]', 0, '2025-02-17 13:03:26', '2025-02-17 13:03:26', '2026-02-17 13:03:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:03:26 [0.51ms] */
select * from `oauth_access_tokens` where `id` = '695c5913acf520e2839fc06c9d7f8360620428982fd901c03c46991a36a104b730deb7b55d257fbe' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:03:26 [5.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '695c5913acf520e2839fc06c9d7f8360620428982fd901c03c46991a36a104b730deb7b55d257fbe';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:03:35 [2.59ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:03:35 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:03:35 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:03:35 [15.31ms] */
update `userprofiles` set `login_count` = 881, `last_login` = '2025-02-17 13:03:35', `userprofiles`.`updated_at` = '2025-02-17 13:03:35' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:03:35 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:03:35 [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-02-17 13:03:35 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:03:35 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:03:35 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:03:35 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:03:35 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:03:35 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:03:35 [3.36ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e0ba34727476265120ac6870b8f272bf9a89765254f8764741df60fbd092805af0d2eb9fcc7d641a', 149, 5, '[]', 0, '2025-02-17 13:03:35', '2025-02-17 13:03:35', '2026-02-17 13:03:35');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:03:35 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'e0ba34727476265120ac6870b8f272bf9a89765254f8764741df60fbd092805af0d2eb9fcc7d641a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:03:35 [4.23ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e0ba34727476265120ac6870b8f272bf9a89765254f8764741df60fbd092805af0d2eb9fcc7d641a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:05:42 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:05:42 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:05:42 [0.47ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:05:42 [3.55ms] */
update `userprofiles` set `login_count` = 882, `last_login` = '2025-02-17 13:05:42', `userprofiles`.`updated_at` = '2025-02-17 13:05:42' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:05:42 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:05:42 [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-02-17 13:05:42 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:05:42 [0.23ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:05:42 [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-02-17 13:05:42 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:05:42 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:05:42 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:05:42 [3.33ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b', 149, 5, '[]', 0, '2025-02-17 13:05:42', '2025-02-17 13:05:42', '2026-02-17 13:05:42');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:05:42 [0.26ms] */
select * from `oauth_access_tokens` where `id` = 'afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:05:42 [3.18ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:05:42 [2.23ms] */
select * from `oauth_access_tokens` where `id` = 'afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:05:42 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:05:42 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:05:42 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:05:42 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'afbb00c227bc90cdff6d0f0696962a8df2a6bb014adb463e45d193e872c751d7dd1d513380cff54b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:05:42 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:05:42 [76.78ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `payment`.`id` = 94847 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:05:56 [1.57ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:05:56 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:05:56 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:05:56 [19.39ms] */
update `userprofiles` set `login_count` = 883, `last_login` = '2025-02-17 13:05:56', `userprofiles`.`updated_at` = '2025-02-17 13:05:56' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:05:56 [0.33ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:05:56 [0.7ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:05:56 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:05:56 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:05:56 [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-02-17 13:05:56 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:05:56 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:05:56 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:05:56 [3.76ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43', 149, 5, '[]', 0, '2025-02-17 13:05:56', '2025-02-17 13:05:56', '2026-02-17 13:05:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:05:56 [0.38ms] */
select * from `oauth_access_tokens` where `id` = '7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:05:56 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:05:56 [1.55ms] */
select * from `oauth_access_tokens` where `id` = '7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:05:56 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:05:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:05:56 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:05:56 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '7c14d31dfd98565547e4e647d4a1a72dd5cd80bc45de35aa6ee16e751c0464db3c3490430ad15c43' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:05:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:05:56 [0.28ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `payment`.`id` = 75699 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:06:29 [2.23ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:06:29 [1.64ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:06:29 [0.3ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:06:29 [0.51ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:06:29 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:06:29 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:06:29 [11.19ms] */
update `userprofiles` set `login_count` = 884, `last_login` = '2025-02-17 13:06:29', `userprofiles`.`updated_at` = '2025-02-17 13:06:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:06:29 [8.09ms] */
update `userprofiles` set `login_count` = 884, `last_login` = '2025-02-17 13:06:29', `userprofiles`.`updated_at` = '2025-02-17 13:06:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:06:29 [0.24ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:06:29 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:06:29 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:06:29 [0.72ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:06:29 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:06:29 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:06:29 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:06:29 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:06:29 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:06:29 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:06:29 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:06:29 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:06:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:06:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:06:29 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:06:29 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:06:29 [4.9ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9', 149, 5, '[]', 0, '2025-02-17 13:06:29', '2025-02-17 13:06:29', '2026-02-17 13:06:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:06:29 [7.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3', 149, 5, '[]', 0, '2025-02-17 13:06:29', '2025-02-17 13:06:29', '2026-02-17 13:06:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:06:29 [0.36ms] */
select * from `oauth_access_tokens` where `id` = 'e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:06:29 [3.1ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:06:29 [0.54ms] */
select * from `oauth_access_tokens` where `id` = '69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:06:29 [3.09ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:06:29 [2.5ms] */
select * from `oauth_access_tokens` where `id` = '69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:06:29 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:06:29 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:06:29 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:06:29 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '69671d9953391ed508f5d24c4ff07cc477404435f71fdf20df60af2faa968eac2f63f10a1d3a83c3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:06:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:06:29 [0.36ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 13:06:29 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:06:29 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:06:29 [2.05ms] */
select * from `oauth_access_tokens` where `id` = 'e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:06:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:06:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:06:29 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:06:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e3ba5fd3e80f1ea6a67142518a23496a66c261d59eb2dded9dd80fa828ffc39d41a35e940b0e91f9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:06:29 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:06:29 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:06:29 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:06:29 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:06:29 [0.43ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:06:29 [5.77ms] */
update `userprofiles` set `login_count` = 885, `userprofiles`.`updated_at` = '2025-02-17 13:06:29' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:06:29 [0.27ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:06:29 [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-02-17 13:06:29 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:06:29 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:06:29 [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-02-17 13:06:29 [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-02-17 13:06:29 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:06:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:06:29 [3.07ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e', 149, 5, '[]', 0, '2025-02-17 13:06:29', '2025-02-17 13:06:29', '2026-02-17 13:06:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:06:29 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:06:29 [2.82ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:06:29 [2.22ms] */
select * from `oauth_access_tokens` where `id` = '9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:06:29 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:06:29 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:06:29 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:06:29 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '9f911fc765a51366702a320536d5c062d65621ffb8dce2c094e8c147bdb44404b1930417fabc136e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:06:29 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:06:29 [0.3ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:07:21 [1.51ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:07:21 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:07:21 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:07:21 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:07:21 [11.09ms] */
update `userprofiles` set `login_count` = 886, `last_login` = '2025-02-17 13:07:21', `userprofiles`.`updated_at` = '2025-02-17 13:07:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:07:21 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:07:21 [0.57ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:07:21 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:07:21 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:07:21 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:07:21 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:07:21 [2.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:07:21 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:07:21 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:07:21 [0.3ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:07:21 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:07:21 [3.35ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d', 149, 5, '[]', 0, '2025-02-17 13:07:21', '2025-02-17 13:07:21', '2026-02-17 13:07:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:07:21 [4.85ms] */
update `userprofiles` set `login_count` = 887, `userprofiles`.`updated_at` = '2025-02-17 13:07:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:07:21 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:07:21 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:07:21 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:07:21 [0.36ms] */
select * from `oauth_access_tokens` where `id` = '1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:07:21 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:07:21 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:07:21 [3.13ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:07:21 [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-02-17 13:07:21 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:07:21 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:07:21 [3.26ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7', 149, 5, '[]', 0, '2025-02-17 13:07:21', '2025-02-17 13:07:21', '2026-02-17 13:07:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:07:21 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:07:21 [2.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:07:21 [0.23ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:07:21 [0.47ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:07:21 [3.18ms] */
update `userprofiles` set `login_count` = 888, `userprofiles`.`updated_at` = '2025-02-17 13:07:21' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:07:21 [0.37ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:07:21 [0.86ms] */
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-02-17 13:07:21 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:07:21 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:07:21 [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-02-17 13:07:21 [0.17ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:07:21 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:07:21 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:07:21 [3.31ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a', 149, 5, '[]', 0, '2025-02-17 13:07:21', '2025-02-17 13:07:21', '2026-02-17 13:07:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:07:21 [0.33ms] */
select * from `oauth_access_tokens` where `id` = 'c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:07:21 [2.97ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:07:22 [1.49ms] */
select * from `oauth_access_tokens` where `id` = '6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:07:22 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:07:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:07:22 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:07:22 [1.39ms] */
select * from `oauth_access_tokens` where `id` = '1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:07:22 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6da0cfb26b408d782eff478acbd32bfa24129c66ac0feb6638c05d3538055d9dc0b2e89dc33c02b7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:07:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:07:22 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:07:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:07:22 [0.38ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 13:07:22 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:07:22 [0.16ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:07:22 [0.17ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:07:22 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '1e2a3fa8d0a2c7ae20fb77d2c5a39f7fe810106752f7f5a66d34a5c8d03f950e0d74c03b5fe38b0d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:07:22 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:07:22 [0.32ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:07:22 [2.34ms] */
select * from `oauth_access_tokens` where `id` = 'c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:07:22 [0.28ms] */
select * from `oauth_access_tokens` where `id` = 'c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:07:22 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:07:22 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:07:22 [0.27ms] */
select * from `oauth_access_tokens` where `id` = 'c0d9744309d318615b1bcbc8589b6e6c82289b39959f72afc8413c5d44b26c5b1c8435d10619ba0a' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:07:22 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:07:22 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:17 [1.5ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:17 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:17 [1.34ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:17 [0.19ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:17 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:17 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:17 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:17 [0.24ms] */
update `userprofiles` set `login_count` = 889, `last_login` = '2025-02-17 13:14:17', `userprofiles`.`updated_at` = '2025-02-17 13:14:17' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:17 [11.59ms] */
update `userprofiles` set `login_count` = 889, `last_login` = '2025-02-17 13:14:17', `userprofiles`.`updated_at` = '2025-02-17 13:14:17' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:17 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:17 [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 5 - 2025-02-17 13:14:17 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:17 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:17 [0.62ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:17 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14: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-02-17 13:14: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-02-17 13:14: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-02-17 13:14:17 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:17 [0.22ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:17 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:17 [3.21ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82', 149, 5, '[]', 0, '2025-02-17 13:14:17', '2025-02-17 13:14:17', '2026-02-17 13:14:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:17 [0.23ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:17 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:17 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:17 [2.82ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281', 149, 5, '[]', 0, '2025-02-17 13:14:17', '2025-02-17 13:14:17', '2026-02-17 13:14:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:17 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:17 [0.4ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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 14 - 2025-02-17 13:14:17 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:17 [2.79ms] */
update `userprofiles` set `login_count` = 890, `userprofiles`.`updated_at` = '2025-02-17 13:14:17' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:17 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:17 [0.2ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:17 [0.48ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:17 [5.14ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:17 [1.93ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:17 [0.19ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14: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-02-17 13:14:17 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:17 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:17 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:17 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:17 [2.97ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6', 149, 5, '[]', 0, '2025-02-17 13:14:17', '2025-02-17 13:14:17', '2026-02-17 13:14:17');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:17 [0.33ms] */
select * from `oauth_access_tokens` where `id` = '397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:17 [2.82ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:14:18 [1.61ms] */
select * from `oauth_access_tokens` where `id` = '3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:14:18 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:14:18 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:14:18 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:14:18 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '3a042a3d9b52a0ddd90df203f6384dc9eed9e86d4e69d93f8a815d670684c98b6e5db18284c46a82' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:14:18 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:14:18 [1.61ms] */
select * from `oauth_access_tokens` where `id` = '397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:14:18 [0.36ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:14:18 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:14:18 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:14:18 [2.11ms] */
select * from `oauth_access_tokens` where `id` = '866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:14:18 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:14:18 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:14:18 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:14:18 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '397eb917e13d7d3e5d4cb76e81a7e6ea6fc1ae483e7cba9bd1b71da1d028f60a4db92f23b4b894c6' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:14:18 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:14:18 [0.31ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 58008 and `vehicle`.`license_plate` = 'VT974' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:14:18 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:14:18 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '866f1da2a22429891fe5087f8f5a1e10b2199b3385eff615ad1847601371e2e0e047729e61d71281' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:14:18 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:14:18 [0.33ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'VT974' 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-02-17 13:14:18 [0.16ms] */
select * from `vehicle` where `id` = 87933 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:14:18 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 87933 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-02-17 13:14:23 [2.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:23 [1.38ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:23 [1.35ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:23 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:23 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:23 [6ms] */
update `userprofiles` set `login_count` = 891, `last_login` = '2025-02-17 13:14:23', `userprofiles`.`updated_at` = '2025-02-17 13:14:23' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:23 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:23 [0.58ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:23 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:23 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:23 [0.19ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:23 [0.3ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:23 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:23 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:23 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:23 [0.47ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:23 [0.2ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:23 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:23 [0.56ms] */
update `userprofiles` set `login_count` = 892, `userprofiles`.`updated_at` = '2025-02-17 13:14:23' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:23 [3.44ms] */
update `userprofiles` set `login_count` = 892, `userprofiles`.`updated_at` = '2025-02-17 13:14:23' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:23 [4.74ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3', 149, 5, '[]', 0, '2025-02-17 13:14:23', '2025-02-17 13:14:23', '2026-02-17 13:14:23');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:23 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:23 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:23 [0.3ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:23 [0.18ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:23 [0.66ms] */
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-02-17 13:14:23 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:23 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:23 [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-02-17 13:14:23 [0.15ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:23 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:23 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:23 [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-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:23 [0.53ms] */
select * from `oauth_access_tokens` where `id` = '6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:23 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:23 [3.16ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7', 149, 5, '[]', 0, '2025-02-17 13:14:23', '2025-02-17 13:14:23', '2026-02-17 13:14:23');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:23 [3.75ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903', 149, 5, '[]', 0, '2025-02-17 13:14:23', '2025-02-17 13:14:23', '2026-02-17 13:14:23');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:23 [4.6ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:23 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:23 [0.25ms] */
select * from `oauth_access_tokens` where `id` = 'd4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:23 [2.88ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:23 [1.58ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:14:23 [1.55ms] */
select * from `oauth_access_tokens` where `id` = 'ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:14:23 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ba8fb00ab393d16d0747d5c71558d9ee63b05fb1f301fa3abbda08471a24602a9ebb75a0dbece9c7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:14:23 [0.33ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:14:23 [1.52ms] */
select * from `oauth_access_tokens` where `id` = 'd4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:14:23 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd4a11824a7349438505f6a5ec9b3b7c57ec2df1e4f099eee5acdcde2f554e5f98fbf4514f592a903' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:14:23 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:14:23 [0.47ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 58008 and `vehicle`.`license_plate` = 'VT974' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:14:23 [2.26ms] */
select * from `oauth_access_tokens` where `id` = '6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:14:23 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:14:23 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:14:23 [0.31ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:14:23 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6c9eb0dfe775d609f4cd46c33d2e1a2fc6d828a4ebc22163b3eb7e28c92243de8c6c695a015839e3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:14:23 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:14:23 [0.63ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'VT974' 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-02-17 13:14:23 [0.3ms] */
select * from `vehicle` where `id` = 87933 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:14:23 [0.3ms] */
select * from `party_vehicle` where `vehicle_id` = 87933 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-02-17 13:14:27 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:27 [1.46ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:27 [1.44ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:27 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:27 [0.53ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:27 [6.18ms] */
update `userprofiles` set `login_count` = 893, `last_login` = '2025-02-17 13:14:27', `userprofiles`.`updated_at` = '2025-02-17 13:14:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:27 [0.25ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:27 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:27 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:27 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:27 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:27 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:27 [3.28ms] */
update `userprofiles` set `login_count` = 894, `userprofiles`.`updated_at` = '2025-02-17 13:14:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:27 [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-02-17 13:14:27 [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-02-17 13:14:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:27 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:27 [0.26ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:27 [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 13 - 2025-02-17 13:14:27 [3.15ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420', 149, 5, '[]', 0, '2025-02-17 13:14:27', '2025-02-17 13:14:27', '2026-02-17 13:14:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:27 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:27 [0.22ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:27 [0.38ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:27 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:27 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:27 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:27 [0.4ms] */
select * from `oauth_access_tokens` where `id` = '7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:27 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:27 [3ms] */
update `userprofiles` set `login_count` = 895, `userprofiles`.`updated_at` = '2025-02-17 13:14:27' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:27 [4.09ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:27 [0.32ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:27 [5.05ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8', 149, 5, '[]', 0, '2025-02-17 13:14:27', '2025-02-17 13:14:27', '2026-02-17 13:14:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:27 [0.78ms] */
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-02-17 13:14:27 [0.31ms] */
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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:27 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:27 [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-02-17 13:14:27 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:27 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:27 [0.34ms] */
select * from `oauth_access_tokens` where `id` = '3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:27 [2.99ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c', 149, 5, '[]', 0, '2025-02-17 13:14:27', '2025-02-17 13:14:27', '2026-02-17 13:14:27');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:27 [3.98ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:27 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:27 [2.71ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:14:27 [2.39ms] */
select * from `oauth_access_tokens` where `id` = '7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:14:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:14:27 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:14:27 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:14:27 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:14:27 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:14:27 [0.32ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:14:27 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '7345877715f214ac73f78890407d9075362fbaec89ddabbc4fec071ac7aaa960ffa7df1ae75fe420' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:14:27 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:14:27 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:14:27 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '3f6ee84710bb59243af33d44848bc235d594a3db5c039a35523b195c541203ac24cb276e0baf06b8' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:14:27 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:14:27 [0.35ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'VT974' 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-02-17 13:14:27 [0.17ms] */
select * from `vehicle` where `id` = 87933 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:14:27 [0.31ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 58008 and `vehicle`.`license_plate` = 'VT974' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:14:27 [0.16ms] */
select * from `party_vehicle` where `vehicle_id` = 87933 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:14:27 [2.46ms] */
select * from `oauth_access_tokens` where `id` = '31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:14:27 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:14:27 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:14:27 [0.26ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:14:27 [0.21ms] */
select * from `oauth_access_tokens` where `id` = '31c9345a027a8dcd74642fd9f888645b1c3162ec6374b1f0a7497650baaf5c318dd20f37c4ef244c' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:14:27 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:14:27 [0.52ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 58008 and `license_plate` = 'VT974' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:31 [2.17ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:31 [1.43ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:14:31 [1.18ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:14:31 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:31 [0.44ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:31 [0.18ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:31 [0.34ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:31 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:14:31 [0.37ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:14:31 [4.34ms] */
update `userprofiles` set `login_count` = 896, `last_login` = '2025-02-17 13:14:31', `userprofiles`.`updated_at` = '2025-02-17 13:14:31' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:31 [0.31ms] */
update `userprofiles` set `login_count` = 896, `last_login` = '2025-02-17 13:14:31', `userprofiles`.`updated_at` = '2025-02-17 13:14:31' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-02-17 13:14:31 [6.08ms] */
update `userprofiles` set `login_count` = 896, `last_login` = '2025-02-17 13:14:31', `userprofiles`.`updated_at` = '2025-02-17 13:14:31' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:31 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:31 [0.16ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:31 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:31 [0.43ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:14:31 [0.29ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:31 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:31 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-02-17 13:14:31 [0.62ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-02-17 13:14:31 [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 (149) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:31 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:31 [0.13ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:31 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:31 [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-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:31 [0.16ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:31 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-02-17 13:14:31 [0.21ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:31 [3.2ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294', 149, 5, '[]', 0, '2025-02-17 13:14:31', '2025-02-17 13:14:31', '2026-02-17 13:14:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-02-17 13:14:31 [0.21ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:31 [4.51ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b', 149, 5, '[]', 0, '2025-02-17 13:14:31', '2025-02-17 13:14:31', '2026-02-17 13:14:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-02-17 13:14:31 [0.32ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-02-17 13:14:31 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-02-17 13:14:31 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-02-17 13:14:31 [3.07ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d', 149, 5, '[]', 0, '2025-02-17 13:14:31', '2025-02-17 13:14:31', '2026-02-17 13:14:31');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:31 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:31 [0.34ms] */
select * from `oauth_access_tokens` where `id` = '0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:31 [2.82ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:31 [3.67ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-02-17 13:14:31 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-02-17 13:14:31 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-02-17 13:14:31 [1.52ms] */
select * from `oauth_access_tokens` where `id` = '0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-02-17 13:14:31 [1.62ms] */
select * from `oauth_access_tokens` where `id` = '2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-02-17 13:14:31 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '0c6f8c6d1567170f5968c4699192226df8e6e3662d35f431e014fb49c90f69da500c2bad85c8233b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-02-17 13:14:31 [0.17ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-02-17 13:14:31 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '2e4a9f3debe424f5d7e8c92888fa0bd0956359b54eca17f2e82dd79afef1ae5de2976caa1648ab6d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-02-17 13:14:31 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-02-17 13:14:31 [0.34ms] */
select `vehicle`.`id` as `vehicle_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`.`phone_number_1` as `mobile_number_1`, `party`.`phone_number_2` as `mobile_number_2`, `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` = 'AH463' 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-02-17 13:14:31 [0.16ms] */
select * from `vehicle` where `id` = 76739 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-02-17 13:14:31 [0.35ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `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, `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`, `roles`.`name` as `role`, 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` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `workflow_definition` on `transaction`.`current_workflow_state_id` = `workflow_definition`.`id` left join `roles` on `workflow_definition`.`role_id` = `roles`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `roles`.`name` = 'payment' and `invoice`.`total_invoice_amount` > 0 and `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'N' and `invoice`.`grouped` = 'N' or `invoice`.`party_id` = 41816 and `license_plate` = 'AH463' and `invoice`.`parent` = 'Y' and `invoice`.`grouped` = 'N' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-02-17 13:14:31 [0.17ms] */
select * from `party_vehicle` where `vehicle_id` = 76739 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-02-17 13:14:31 [1.69ms] */
select * from `oauth_access_tokens` where `id` = '4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-02-17 13:14:31 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-02-17 13:14:31 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-02-17 13:14:31 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-02-17 13:14:31 [0.23ms] */
select * from `oauth_access_tokens` where `id` = '4cb6c649d6b3afd8d967710e29b53c326030992cee1472f20450cfbadac7fe49b31940934c2a4294' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-02-17 13:14:31 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-02-17 13:14:31 [0.43ms] */
select `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`.`id` as `payment_id`, `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` left join `transaction` on `transaction`.`invoice_id` = `invoice`.`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 `transaction`.`party_id` = 41816 and `vehicle`.`license_plate` = 'AH463' and `payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-02-17 13:15:24 [1.42ms] */
select * from `users` where `email` = 'sivaprasad@admin.com' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-02-17 13:15:24 [0.25ms] */
select * from `users` where `id` = 149 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-02-17 13:15:24 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 149 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-02-17 13:15:24 [6.08ms] */
update `userprofiles` set `login_count` = 897, `last_login` = '2025-02-17 13:15:24', `userprofiles`.`updated_at` = '2025-02-17 13:15:24' where `id` = 149;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-02-17 13:15:24 [0.22ms] */
