select * from `invoice` where `id` = 236915 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-05-05 10:22:38 [8.9ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-05-05 10:22:38', 236915, 177942, '2025-05-05 10:22:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-05-05 10:22:38 [0.44ms] */
select * from `invoice` where `invoice`.`id` = 236915 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-05-05 10:22:38 [0.52ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 236915 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-05-05 10:22:38 [3.48ms] */
update `invoice` set `outstanding_balance` = 117, `status` = 'PARTIAL_PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-05-05 10:22:38' where `id` = 236915;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-05-05 10:22:38 [0.37ms] */
select * from `invoice` where `id` = 236915 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-05-05 10:22:38 [4.89ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"117.00","status":"PARTIAL_PAID"},"old":{"outstanding_balance":"171.00","status":"OPEN"}}', 154, 'App\Models\User', 236915, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-05-05 10:22:38', '2025-05-05 10:22:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-05-05 10:22:38 [4.72ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-05-05 10:22:38', 236903, 177942, '2025-05-05 10:22:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-05-05 10:22:38 [1.89ms] */
select * from `invoice` where `invoice`.`id` = 236903 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-05-05 10:22:38 [1.01ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 236903 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 23 - 2025-05-05 10:22:38 [1.36ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 236903 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 24 - 2025-05-05 10:22:38 [3.21ms] */
update `invoice` set `invoice_amount` = 54, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 54, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-05-05 10:22:38' where `id` = 236903;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-05-05 10:22:38 [0.53ms] */
select * from `invoice` where `id` = 236903 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-05-05 10:22:38 [3.05ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"54.00","status":"OPEN"}}', 154, 'App\Models\User', 236903, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-05-05 10:22:38', '2025-05-05 10:22:38');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 27 - 2025-05-05 10:22:39 [395.31ms] */
select * from `transaction` where `invoice_id` = 236903 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-05-05 10:22:39 [3.62ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-05-05 10:22:39' where `id` = 205815 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 29 - 2025-05-05 10:22:39 [0.31ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-05-05 10:22:39 [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/make_payments
   Query 31 - 2025-05-05 10:22:39 [0.23ms] */
select * from `roles` where `roles`.`id` = 7 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-05-05 10:22:39 [0.49ms] */
select * from `transaction` where `transaction`.`id` = 253493 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 33 - 2025-05-05 10:22:39 [0.24ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-05-05 10:22:39 [0.23ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-05-05 10:22:39 [0.2ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-05-05 10:22:39 [2.47ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (253493, 'APPROVED', '2025-05-05 10:22:39', 7, 154, null, 154, 154, '2025-05-05 10:22:39', '2025-05-05 10:22:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-05-05 10:22:39 [0.21ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 38 - 2025-05-05 10:22:39 [2.14ms] */
update `transaction` set `current_workflow_state_id` = 8, `updated_by` = 154, `transaction`.`updated_at` = '2025-05-05 10:22:39' where `id` = 253493;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 39 - 2025-05-05 10:22:39 [0.18ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 40 - 2025-05-05 10:22:39 [0.95ms] */
select * from `invoice` where `invoice`.`id` = 236903 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 41 - 2025-05-05 10:22:39 [0.96ms] */
select * from `vehicle_tax` where `transaction_id` = 253493 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 42 - 2025-05-05 10:22:39 [0.25ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-05-05 10:22:39' where `id` = 205815;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 43 - 2025-05-05 10:22:39 [0.26ms] */
select * from `vehicle_tax` where `id` = 205815 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 44 - 2025-05-05 10:22:39 [1.46ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 205815, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 10:22:39', '2025-05-05 10:22:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 45 - 2025-05-05 10:22:39 [0.38ms] */
select * from `transaction` where `transaction`.`id` = 253506 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 46 - 2025-05-05 10:22:39 [0.21ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 47 - 2025-05-05 10:22:39 [0.19ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 48 - 2025-05-05 10:22:39 [0.2ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 7 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 49 - 2025-05-05 10:22:39 [0.31ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (253506, 'APPROVED', '2025-05-05 10:22:39', 7, 154, null, 154, 154, '2025-05-05 10:22:39', '2025-05-05 10:22:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 50 - 2025-05-05 10:22:39 [0.21ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 51 - 2025-05-05 10:22:39 [0.33ms] */
update `transaction` set `current_workflow_state_id` = 8, `updated_by` = 154, `transaction`.`updated_at` = '2025-05-05 10:22:39' where `id` = 253506;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 52 - 2025-05-05 10:22:39 [0.21ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 53 - 2025-05-05 10:22:39 [0.3ms] */
select * from `invoice` where `invoice`.`id` = 236915 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 54 - 2025-05-05 10:22:39 [0.35ms] */
select * from `vehicle_tax` where `id` = 205815 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 55 - 2025-05-05 10:22:39 [1.04ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 16 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 56 - 2025-05-05 10:22:39 [1.01ms] */
select * from `party` where `party`.`id` = 39414 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 57 - 2025-05-05 10:22:39 [0.75ms] */
select * from `person` where `person`.`id` = 39414 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 58 - 2025-05-05 10:22:39 [0.44ms] */
select * from `vehicle` where `vehicle`.`id` = 50215 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 59 - 2025-05-05 10:22:39 [0.35ms] */
select * from `term` where `term`.`id` = 93 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 60 - 2025-05-05 10:22:39 [0.86ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 61 - 2025-05-05 10:22:39 [0.34ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'SERVICE_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 62 - 2025-05-05 10:22:39 [4.3ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (5, 'GOV_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:22:39', '2025-05-05 10:22:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 63 - 2025-05-05 10:22:39 [2.9ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (5, 'SERVICE_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:22:39', '2025-05-05 10:22:39');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 64 - 2025-05-05 10:22:40 [589.88ms] */
select * from `transaction` where `invoice_id` in (236903) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 65 - 2025-05-05 10:22:40 [1.22ms] */
delete from `payment_documents` where `transaction_id` = 253493 and `type` in ('GOV_RECEIPT_IMAGE', 'SERVICE_RECEIPT_IMAGE');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 66 - 2025-05-05 10:22:40 [623.38ms] */
select * from `transaction` where `parent_id` = 253506 and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 67 - 2025-05-05 10:22:40 [5.9ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253493, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 68 - 2025-05-05 10:22:40 [2.89ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253493, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 69 - 2025-05-05 10:22:40 [2.98ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253494, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 70 - 2025-05-05 10:22:40 [2.72ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253494, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 71 - 2025-05-05 10:22:40 [3.52ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253495, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 72 - 2025-05-05 10:22:40 [3.37ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253495, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 73 - 2025-05-05 10:22:40 [3.01ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253496, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 74 - 2025-05-05 10:22:40 [1.85ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253496, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 75 - 2025-05-05 10:22:40 [3.05ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253497, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 76 - 2025-05-05 10:22:40 [2.76ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253497, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 77 - 2025-05-05 10:22:40 [2.74ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253506, 'GOV_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 78 - 2025-05-05 10:22:40 [1.56ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (253506, 'SERVICE_RECEIPT_IMAGE', 5, 6, '2025-05-05 10:22:40', '2025-05-05 10:22:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:22:48 [2.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:22:48 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:22:48 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:22:48 [1.32ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:22:48 [3.18ms] */
update `userprofiles` set `login_count` = 2066, `last_login` = '2025-05-05 10:22:48', `userprofiles`.`updated_at` = '2025-05-05 10:22:48' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:22:48 [0.2ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:22:48 [0.4ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:22:48 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:22:48 [0.29ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:22:48 [0.41ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:22:48 [0.26ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:22:48 [0.24ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:22:48 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:22:48 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:22:48 [3.58ms] */
update `userprofiles` set `login_count` = 2067, `userprofiles`.`updated_at` = '2025-05-05 10:22:48' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:22:48 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:22:48 [0.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:22:48 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:22:48 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:22:48 [3.69ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1', 154, 5, '[]', 0, '2025-05-05 10:22:48', '2025-05-05 10:22:48', '2026-05-05 10:22:48');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:22:48 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:22:48 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:22:48 [0.21ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:22:48 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:22:48 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:22:48 [0.42ms] */
select * from `oauth_access_tokens` where `id` = 'ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:22:48 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:22:48 [9.06ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31', 154, 5, '[]', 0, '2025-05-05 10:22:48', '2025-05-05 10:22:48', '2026-05-05 10:22:48');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:22:48 [0.39ms] */
select * from `oauth_access_tokens` where `id` = 'f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:22:48 [3.87ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-05 10:22:48 [6.69ms] */
select * from `oauth_access_tokens` where `id` = 'ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-05 10:22:48 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-05 10:22:48 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-05 10:22:48 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-05 10:22:48 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ef02ce6f53c33568109f7559cd7ba9180de5045d6b52c79a5674ebdcc3670dd116222858ad7285a1' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-05 10:22:48 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-05 10:22:48 [1.38ms] */
select * from `oauth_access_tokens` where `id` = 'f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-05 10:22:48 [0.16ms] */
select * from `oauth_access_tokens` where `id` = 'f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-05 10:22:48 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-05 10:22:48 [0.25ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-05 10:22:48 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'f674350554156a64971598fdbcd4c9c82f9a68d7bbde1b2ac6c517b67ac7e5f34452e48aad65ec31' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-05 10:22:48 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-05 10:22:48 [0.31ms] */
select count(*) as aggregate from `party` where `id` = 39414;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-05 10:22:48 [0.3ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'JP855';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-05 10:22:48 [15.54ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 39414 and `license_plate` = 'JP855' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-05 10:22:48 [28.66ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `service`.`name` = 'Tax' and `transaction`.`party_id` = 39414 and `vehicle`.`license_plate` = 'JP855' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-05 10:22:48 [1.26ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177942 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-05 10:22:48 [6.57ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177866 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-05-05 10:22:48 [0.74ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177865 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 11 - 2025-05-05 10:22:48 [0.96ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 166189 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:23:26 [1.73ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:23:26 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:23:26 [1.12ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:23:26 [6.19ms] */
update `userprofiles` set `login_count` = 2068, `last_login` = '2025-05-05 10:23:26', `userprofiles`.`updated_at` = '2025-05-05 10:23:26' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:23:26 [1.53ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:23:26 [1.75ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:23:26 [2.66ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:23:26 [2.91ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:23: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-05-05 10:23:26 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:23:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:23:26 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:23:26 [3.95ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0', 154, 5, '[]', 0, '2025-05-05 10:23:26', '2025-05-05 10:23:26', '2026-05-05 10:23:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:23:26 [1.43ms] */
select * from `oauth_access_tokens` where `id` = 'f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:23:26 [9.18ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 10:23:26 [1.42ms] */
select * from `oauth_access_tokens` where `id` = 'f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 10:23:26 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 10:23:26 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 10:23:26 [0.15ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 10:23:26 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'f205fea2312538717bd6944e2ad96c5ff3240fe23cb93ed33228b016f1ad1d2be3d808556da0f8e0' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 10:23:26 [0.1ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 10:23:26 [5.56ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'KY2332' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 10:23:26 [1.12ms] */
select * from `party` where `party`.`id` = 58927 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 10:23:26 [0.28ms] */
select * from `vehicle` where `id` = 99531 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 10:23:26 [0.29ms] */
select * from `party_vehicle` where `vehicle_id` = 99531 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:23:26 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:23:26 [0.23ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:23:26 [0.42ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:23:26 [11.91ms] */
update `userprofiles` set `login_count` = 2069, `userprofiles`.`updated_at` = '2025-05-05 10:23:26' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:23:26 [0.39ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:23:26 [0.71ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:23:26 [0.26ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:23:26 [0.15ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:23: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-05-05 10:23:26 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:23:26 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:23:26 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:23:26 [2.96ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7', 154, 5, '[]', 0, '2025-05-05 10:23:26', '2025-05-05 10:23:26', '2026-05-05 10:23:26');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:23:26 [0.35ms] */
select * from `oauth_access_tokens` where `id` = '50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:23:26 [3.17ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 10:23:26 [3.4ms] */
select * from `oauth_access_tokens` where `id` = '50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 10:23:26 [0.59ms] */
select * from `oauth_access_tokens` where `id` = '50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 10:23:26 [0.71ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 10:23:26 [0.77ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 10:23:26 [0.76ms] */
select * from `oauth_access_tokens` where `id` = '50332d4d836ecc8dd09ae169e3a5276ab5c54953243f330eee582d0c7aed467ee7a5c1bb0b94eea7' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 10:23:26 [0.71ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 10:23:26 [1.67ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'JU1122' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 10:23:26 [0.74ms] */
select * from `party` where `party`.`id` = 64962 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 10:23:26 [0.99ms] */
select * from `vehicle` where `id` = 99530 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 10:23:26 [1.32ms] */
select * from `party_vehicle` where `vehicle_id` = 99530 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:23:29 [1.35ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:23:29 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:23:29 [1.06ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:23:29 [11.09ms] */
update `userprofiles` set `login_count` = 2070, `last_login` = '2025-05-05 10:23:29', `userprofiles`.`updated_at` = '2025-05-05 10:23:29' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:23:29 [6.75ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:23:29 [0.73ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:23:29 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:23:29 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:23: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 1 - 2025-05-05 10:23:29 [4.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:23: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-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:23:29 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:23:29 [3.73ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3', 154, 5, '[]', 0, '2025-05-05 10:23:29', '2025-05-05 10:23:29', '2026-05-05 10:23:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:23:29 [1.33ms] */
select * from `oauth_access_tokens` where `id` = 'f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:23:29 [3.9ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:23:29 [5.53ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:23:29 [4ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:23:29 [1.62ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:23:29 [2.91ms] */
update `userprofiles` set `login_count` = 2071, `userprofiles`.`updated_at` = '2025-05-05 10:23:29' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:23:29 [0.4ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:23:29 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:23:29 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:23:29 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:23:29 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:23:29 [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-05-05 10:23:29 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:23:29 [2.91ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed', 154, 5, '[]', 0, '2025-05-05 10:23:29', '2025-05-05 10:23:29', '2026-05-05 10:23:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:23:29 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:23:29 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:23:29 [0.47ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:23:29 [5.22ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:23:29 [4.86ms] */
update `userprofiles` set `login_count` = 2072, `userprofiles`.`updated_at` = '2025-05-05 10:23:29' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-05 10:23:29 [4.5ms] */
select * from `oauth_access_tokens` where `id` = 'f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:23:29 [0.18ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:23:29 [0.51ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:23:29 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-05 10:23:29 [1.99ms] */
select * from `oauth_access_tokens` where `id` = 'f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:23:29 [0.17ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:23:29 [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-05-05 10:23:29 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-05 10:23:29 [0.24ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-05 10:23:29 [0.29ms] */
select * from `oauth_access_tokens` where `id` = 'f63deaa4f6e7b8947ae3a23bcb3d02baf1eb330987911fb465865b5a75669bcb58c638097e756cd3' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:23:29 [3.37ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5', 154, 5, '[]', 0, '2025-05-05 10:23:29', '2025-05-05 10:23:29', '2026-05-05 10:23:29');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-05 10:23:29 [7.9ms] */
select count(*) as aggregate from `party` where `id` = 64962;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-05 10:23:29 [0.34ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'JU1122';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:23:29 [1.72ms] */
select * from `oauth_access_tokens` where `id` = 'ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-05 10:23:29 [2.12ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64962 and `license_plate` = 'JU1122' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:23:29 [3.67ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-05 10:23:29 [3.28ms] */
select * from `oauth_access_tokens` where `id` = '021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-05 10:23:29 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '021e1386eacc46a663d74bfa59d7b0e9a33db9453bbf841dcc71e9cdc6660cd1f3769577033adfed' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-05 10:23:29 [1.61ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `service`.`name` = 'Tax' and `transaction`.`party_id` = 64962 and `vehicle`.`license_plate` = 'JU1122' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-05 10:23:29 [0.69ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177934 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 10:23:29 [2.2ms] */
select * from `oauth_access_tokens` where `id` = 'ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 10:23:29 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 10:23:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'ef1526aeb3ca5caa0e0e145198c8ef1553b26e5a81d2d00eb6676b1ca947ea1fef86c6c5972181c5' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 10:23:29 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 10:23:29 [0.35ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'JU1122' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 10:23:29 [0.17ms] */
select * from `party` where `party`.`id` = 64962 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 10:23:29 [0.15ms] */
select * from `vehicle` where `id` = 99530 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 10:23:29 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 99530 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:26:19 [1.58ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:26:19 [0.32ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:26:19 [1.65ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:26:19 [3.41ms] */
update `userprofiles` set `login_count` = 2073, `last_login` = '2025-05-05 10:26:19', `userprofiles`.`updated_at` = '2025-05-05 10:26:19' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:26:19 [0.29ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:26:19 [0.41ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:26:19 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:26:19 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:26:19 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:26:19 [0.2ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:26:19 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:26:19 [0.1ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:26:19 [6.28ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('d1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74', 154, 5, '[]', 0, '2025-05-05 10:26:19', '2025-05-05 10:26:19', '2026-05-05 10:26:19');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:26:19 [0.32ms] */
select * from `oauth_access_tokens` where `id` = 'd1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:26:19 [2.92ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'd1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 1 - 2025-05-05 10:26:19 [1.48ms] */
select * from `oauth_access_tokens` where `id` = 'd1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 2 - 2025-05-05 10:26:19 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 3 - 2025-05-05 10:26:19 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 4 - 2025-05-05 10:26:19 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 5 - 2025-05-05 10:26:19 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'd1012dedc40f12245156252aa9b2473bbdd51ba5cdac2e1ad7cb088918dcb59f052754f977799d74' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 6 - 2025-05-05 10:26:19 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 7 - 2025-05-05 10:26:20 [367.79ms] */
select count(*) as aggregate from `payment` where `external_payment_reference_no` = 'PRF1F48367';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 8 - 2025-05-05 10:26:20 [1.23ms] */
select * from `payment_method` where `name` = 'SomBank' and `payment_method`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 9 - 2025-05-05 10:26:20 [1.12ms] */
select * from `invoice` where `id` in (550275) and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 10 - 2025-05-05 10:26:20 [7.6ms] */
insert into `Payment` (`payment_amount`, `payment_date`, `external_payment_reference_no`, `payment_method_id`, `paid_by`, `paid_by_mobile`, `payment_collected_by`, `district_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (38.00, '2025-05-05 10:26:20', 'PRF1F48367', 6, 'testsixteen', +252888666555, 1, 1, 154, 154, '2025-05-05 10:26:20', '2025-05-05 10:26:20');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 11 - 2025-05-05 10:26:20 [0.23ms] */
select * from `Payment` where `id` = 177943 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 12 - 2025-05-05 10:26:20 [3.07ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('Payment', '{"attributes":{"payment_method_id":6,"payment_amount":"38.00","payment_date":"2025-05-05 10:26:20","external_payment_reference_no":"PRF1F48367","payment_receipt_number":null,"siinpay_payref_number":null,"paid_by":"testsixteen","paid_by_mobile":"+252888666555","district_id":1,"migration_id":null,"payment_collected_by":1}}', 154, 'App\Models\User', 177943, 'Modules\Transaction\Entities\Payment', 'created', '2025-05-05 10:26:20', '2025-05-05 10:26:20');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 13 - 2025-05-05 10:26:20 [3.01ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-05-05 10:26:20', 550275, 177943, '2025-05-05 10:26:20');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-05-05 10:26:20 [0.33ms] */
select * from `invoice` where `invoice`.`id` = 550275 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-05-05 10:26:20 [0.45ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 550275 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-05-05 10:26:20 [0.43ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 550275 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-05-05 10:26:20 [2.82ms] */
update `invoice` set `invoice_amount` = 38, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 38, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-05-05 10:26:20' where `id` = 550275;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-05-05 10:26:20 [0.38ms] */
select * from `invoice` where `id` = 550275 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-05-05 10:26:20 [6.28ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 550275, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-05-05 10:26:20', '2025-05-05 10:26:20');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-05-05 10:26:21 [1206.14ms] */
select * from `transaction` where `invoice_id` = 550275 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-05-05 10:26:21 [2.99ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-05-05 10:26:21' where `id` = 464467 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-05-05 10:26:21 [0.62ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 23 - 2025-05-05 10:26:21 [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/make_payments
   Query 24 - 2025-05-05 10:26:21 [0.32ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-05-05 10:26:21 [0.74ms] */
select * from `transaction` where `transaction`.`id` = 574618 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-05-05 10:26:21 [0.19ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 27 - 2025-05-05 10:26:21 [0.21ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-05-05 10:26:21 [0.25ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 29 - 2025-05-05 10:26:21 [0.87ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574618, 'APPROVED', '2025-05-05 10:26:21', 5, 154, null, 154, 154, '2025-05-05 10:26:21', '2025-05-05 10:26:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-05-05 10:26:21 [0.22ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 31 - 2025-05-05 10:26:21 [1.64ms] */
update `transaction` set `current_workflow_state_id` = 8, `status` = 'INPROGRESS', `updated_by` = 154, `transaction`.`updated_at` = '2025-05-05 10:26:21' where `id` = 574618;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-05-05 10:26:21 [0.17ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 33 - 2025-05-05 10:26:21 [0.34ms] */
select * from `invoice` where `invoice`.`id` = 550275 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-05-05 10:26:21 [1.44ms] */
select * from `vehicle_tax` where `transaction_id` = 574618 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-05-05 10:26:21 [0.21ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-05-05 10:26:21' where `id` = 464467;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-05-05 10:26:21 [0.22ms] */
select * from `vehicle_tax` where `id` = 464467 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-05-05 10:26:21 [2.57ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 464467, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 10:26:21', '2025-05-05 10:26:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 38 - 2025-05-05 10:26:21 [0.32ms] */
select * from `vehicle_tax` where `id` = 464467 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 39 - 2025-05-05 10:26:21 [0.76ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 99893 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 40 - 2025-05-05 10:26:21 [0.65ms] */
select * from `party` where `party`.`id` = 64962 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 41 - 2025-05-05 10:26:21 [0.41ms] */
select * from `person` where `person`.`id` = 62336 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 42 - 2025-05-05 10:26:21 [1.54ms] */
select * from `vehicle` where `vehicle`.`id` = 99530 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 43 - 2025-05-05 10:26:21 [0.67ms] */
select * from `term` where `term`.`id` = 106 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 44 - 2025-05-05 10:26:21 [0.9ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 45 - 2025-05-05 10:26:21 [0.6ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'SERVICE_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 46 - 2025-05-05 10:26:21 [5.64ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (6, 'GOV_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:26:21', '2025-05-05 10:26:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 47 - 2025-05-05 10:26:21 [2.72ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (6, 'SERVICE_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:26:21', '2025-05-05 10:26:21');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 48 - 2025-05-05 10:26:22 [926.05ms] */
select * from `transaction` where `invoice_id` in (550275) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 49 - 2025-05-05 10:26:22 [8.09ms] */
delete from `payment_documents` where `transaction_id` = 574618 and `type` in ('GOV_RECEIPT_IMAGE', 'SERVICE_RECEIPT_IMAGE');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 50 - 2025-05-05 10:26:22 [3.05ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (574618, 'GOV_RECEIPT_IMAGE', 6, 6, '2025-05-05 10:26:22', '2025-05-05 10:26:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 51 - 2025-05-05 10:26:22 [6.08ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (574618, 'SERVICE_RECEIPT_IMAGE', 6, 6, '2025-05-05 10:26:22', '2025-05-05 10:26:22');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:26:30 [1.44ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:26:30 [2.83ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:26:30 [0.76ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:26:30 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:26:30 [1.14ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:26:30 [5.61ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:26:30 [2.89ms] */
update `userprofiles` set `login_count` = 2074, `last_login` = '2025-05-05 10:26:30', `userprofiles`.`updated_at` = '2025-05-05 10:26:30' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:26:30 [2.78ms] */
update `userprofiles` set `login_count` = 2074, `last_login` = '2025-05-05 10:26:30', `userprofiles`.`updated_at` = '2025-05-05 10:26:30' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:26:30 [0.19ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:26:30 [0.21ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:26:30 [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 6 - 2025-05-05 10:26:30 [0.38ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:26:30 [0.16ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:26:30 [1.85ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:26:30 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:26:30 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:26:30 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:26:30 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:26:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:26:30 [0.93ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:26:30 [0.17ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:26:30 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:26:30 [3.84ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f', 154, 5, '[]', 0, '2025-05-05 10:26:30', '2025-05-05 10:26:30', '2026-05-05 10:26:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:26:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:26:30 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:26:30 [2.83ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364', 154, 5, '[]', 0, '2025-05-05 10:26:30', '2025-05-05 10:26:30', '2026-05-05 10:26:30');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:26:30 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:26:30 [2.99ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:26:30 [0.43ms] */
select * from `oauth_access_tokens` where `id` = 'eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:26:30 [3.85ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-05 10:26:30 [2.5ms] */
select * from `oauth_access_tokens` where `id` = '116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-05 10:26:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-05 10:26:30 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-05 10:26:30 [0.3ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-05 10:26:30 [2.72ms] */
select * from `oauth_access_tokens` where `id` = 'eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-05 10:26:30 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '116d19e928059cc236bea0439f11925e869ebaefb6e70c2c51752c817d83a11418ef944f4a407c0f' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-05 10:26:30 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-05 10:26:30 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-05 10:26:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-05 10:26:30 [0.21ms] */
select count(*) as aggregate from `party` where `id` = 64962;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-05 10:26:30 [0.2ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'JU1122';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-05 10:26:30 [0.22ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-05 10:26:30 [0.15ms] */
select * from `oauth_access_tokens` where `id` = 'eb1798ef9be4211a6436da8063f2b3778cd82a022022e2b669b615be61d560d60e3d79a7d15f4364' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-05 10:26:30 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-05 10:26:30 [12.75ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `service`.`name` = 'Tax' and `transaction`.`party_id` = 64962 and `vehicle`.`license_plate` = 'JU1122' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-05 10:26:30 [15.58ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64962 and `license_plate` = 'JU1122' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-05 10:26:30 [3.18ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177943 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-05 10:26:30 [0.83ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177934 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:52:44 [1.79ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:52:44 [0.33ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:52:44 [0.64ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:52:44 [7.91ms] */
update `userprofiles` set `login_count` = 2075, `last_login` = '2025-05-05 10:52:44', `userprofiles`.`updated_at` = '2025-05-05 10:52:44' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:52:44 [0.45ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:52:44 [0.67ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:52:44 [0.55ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:52:44 [0.31ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:52:44 [0.23ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:52:44 [0.33ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:52:44 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:52:44 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:52:44 [3.06ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704', 154, 5, '[]', 0, '2025-05-05 10:52:44', '2025-05-05 10:52:44', '2026-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:52:44 [0.3ms] */
select * from `oauth_access_tokens` where `id` = '037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:52:44 [2.8ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 1 - 2025-05-05 10:52:44 [2.5ms] */
select * from `oauth_access_tokens` where `id` = '037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 2 - 2025-05-05 10:52:44 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 3 - 2025-05-05 10:52:44 [0.44ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 4 - 2025-05-05 10:52:44 [0.62ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 5 - 2025-05-05 10:52:44 [0.32ms] */
select * from `oauth_access_tokens` where `id` = '037fb88027eb487b027e65972ed5c4aa1122f8e96e8695366f43c140294ac53dcdd7bf073c548704' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 6 - 2025-05-05 10:52:44 [0.29ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 7 - 2025-05-05 10:52:44 [48.26ms] */
select count(*) as aggregate from `payment` where `external_payment_reference_no` = 'PR7737ECE6';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 8 - 2025-05-05 10:52:44 [0.44ms] */
select * from `payment_method` where `name` = 'SomBank' and `payment_method`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 9 - 2025-05-05 10:52:44 [0.38ms] */
select * from `invoice` where `id` in (550274) and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 10 - 2025-05-05 10:52:44 [5.85ms] */
insert into `Payment` (`payment_amount`, `payment_date`, `external_payment_reference_no`, `payment_method_id`, `paid_by`, `paid_by_mobile`, `payment_collected_by`, `district_id`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (38.00, '2025-05-05 10:52:44', 'PR7737ECE6', 6, 'testsixteen', +252888666555, 1, 1, 154, 154, '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 11 - 2025-05-05 10:52:44 [0.22ms] */
select * from `Payment` where `id` = 177944 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 12 - 2025-05-05 10:52:44 [2.93ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('Payment', '{"attributes":{"payment_method_id":6,"payment_amount":"38.00","payment_date":"2025-05-05 10:52:44","external_payment_reference_no":"PR7737ECE6","payment_receipt_number":null,"siinpay_payref_number":null,"paid_by":"testsixteen","paid_by_mobile":"+252888666555","district_id":1,"migration_id":null,"payment_collected_by":1}}', 154, 'App\Models\User', 177944, 'Modules\Transaction\Entities\Payment', 'created', '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 13 - 2025-05-05 10:52:44 [2.85ms] */
insert into `invoice_payment` (`created_at`, `invoice_id`, `payment_id`, `updated_at`) values ('2025-05-05 10:52:44', 550274, 177944, '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 14 - 2025-05-05 10:52:44 [0.37ms] */
select * from `invoice` where `invoice`.`id` = 550274 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 15 - 2025-05-05 10:52:44 [0.52ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 550274 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 16 - 2025-05-05 10:52:44 [0.53ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 550274 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 17 - 2025-05-05 10:52:44 [2.82ms] */
update `invoice` set `invoice_amount` = 38, `outstanding_balance` = 0, `discounts` = 0, `total_invoice_amount` = 38, `status` = 'PAID', `updated_by` = 154, `invoice`.`updated_at` = '2025-05-05 10:52:44' where `id` = 550274;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 18 - 2025-05-05 10:52:44 [0.46ms] */
select * from `invoice` where `id` = 550274 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 19 - 2025-05-05 10:52:44 [2.87ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('invoice', '{"attributes":{"outstanding_balance":"0.00","status":"PAID"},"old":{"outstanding_balance":"38.00","status":"OPEN"}}', 154, 'App\Models\User', 550274, 'Modules\Transaction\Entities\Invoice', 'updated', '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 20 - 2025-05-05 10:52:44 [554.58ms] */
select * from `transaction` where `invoice_id` = 550274 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 21 - 2025-05-05 10:52:44 [6.58ms] */
update `vehicle_tax` set `status` = 'PAID', `vehicle_tax`.`updated_at` = '2025-05-05 10:52:44' where `id` = 464466 and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 22 - 2025-05-05 10:52:44 [0.6ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 23 - 2025-05-05 10:52:44 [0.54ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 24 - 2025-05-05 10:52:44 [0.48ms] */
select * from `roles` where `roles`.`id` = 5 and `roles`.`id` is not null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 25 - 2025-05-05 10:52:44 [0.36ms] */
select * from `transaction` where `transaction`.`id` = 574617 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 26 - 2025-05-05 10:52:44 [0.34ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 27 - 2025-05-05 10:52:44 [0.27ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 28 - 2025-05-05 10:52:44 [0.23ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 6 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 29 - 2025-05-05 10:52:44 [1.84ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574617, 'APPROVED', '2025-05-05 10:52:44', 5, 154, null, 154, 154, '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 30 - 2025-05-05 10:52:44 [0.34ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 3 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 31 - 2025-05-05 10:52:44 [0.85ms] */
update `transaction` set `current_workflow_state_id` = 8, `status` = 'INPROGRESS', `updated_by` = 154, `transaction`.`updated_at` = '2025-05-05 10:52:44' where `id` = 574617;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 32 - 2025-05-05 10:52:44 [0.22ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 33 - 2025-05-05 10:52:44 [0.31ms] */
select * from `invoice` where `invoice`.`id` = 550274 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 34 - 2025-05-05 10:52:44 [0.52ms] */
select * from `vehicle_tax` where `transaction_id` = 574617 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 35 - 2025-05-05 10:52:44 [0.25ms] */
update `vehicle_tax` set `updated_by` = 154, `vehicle_tax`.`updated_at` = '2025-05-05 10:52:44' where `id` = 464466;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 36 - 2025-05-05 10:52:44 [0.27ms] */
select * from `vehicle_tax` where `id` = 464466 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 37 - 2025-05-05 10:52:44 [0.64ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":[],"old":[]}', 154, 'App\Models\User', 464466, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 38 - 2025-05-05 10:52:44 [0.38ms] */
select * from `vehicle_tax` where `id` = 464466 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 39 - 2025-05-05 10:52:44 [0.41ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 99893 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 40 - 2025-05-05 10:52:44 [0.81ms] */
select * from `party` where `party`.`id` = 64962 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 41 - 2025-05-05 10:52:44 [0.43ms] */
select * from `person` where `person`.`id` = 62336 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 42 - 2025-05-05 10:52:44 [1.23ms] */
select * from `vehicle` where `vehicle`.`id` = 99530 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 43 - 2025-05-05 10:52:44 [0.51ms] */
select * from `term` where `term`.`id` = 105 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 44 - 2025-05-05 10:52:44 [0.42ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 45 - 2025-05-05 10:52:44 [0.3ms] */
select * from `receipts` where `is_auto_generated` = 'Yes' and `type` = 'SERVICE_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 46 - 2025-05-05 10:52:44 [2.84ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (7, 'GOV_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 47 - 2025-05-05 10:52:44 [1.43ms] */
insert into `receipts` (`receipt_number`, `type`, `is_auto_generated`, `user_id`, `used`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (7, 'SERVICE_RECEIPT_NUMBER', 'Yes', 154, 'Yes', 154, 154, '2025-05-05 10:52:44', '2025-05-05 10:52:44');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 48 - 2025-05-05 10:52:45 [777.74ms] */
select * from `transaction` where `invoice_id` in (550274) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 49 - 2025-05-05 10:52:45 [12.69ms] */
delete from `payment_documents` where `transaction_id` = 574617 and `type` in ('GOV_RECEIPT_IMAGE', 'SERVICE_RECEIPT_IMAGE');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 50 - 2025-05-05 10:52:45 [10.76ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (574617, 'GOV_RECEIPT_IMAGE', 7, 6, '2025-05-05 10:52:45', '2025-05-05 10:52:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payments
   Query 51 - 2025-05-05 10:52:45 [3ms] */
insert into `payment_documents` (`transaction_id`, `type`, `receipt_number`, `payment_provider_id`, `updated_at`, `created_at`) values (574617, 'SERVICE_RECEIPT_IMAGE', 7, 6, '2025-05-05 10:52:45', '2025-05-05 10:52:45');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:52:53 [1.47ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:52:53 [1.39ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:52:53 [0.27ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:52:53 [1ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:52:53 [0.18ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:52:53 [0.35ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:52:53 [18.92ms] */
update `userprofiles` set `login_count` = 2076, `last_login` = '2025-05-05 10:52:53', `userprofiles`.`updated_at` = '2025-05-05 10:52:53' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:52:53 [15.56ms] */
update `userprofiles` set `login_count` = 2076, `last_login` = '2025-05-05 10:52:53', `userprofiles`.`updated_at` = '2025-05-05 10:52:53' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:52:53 [0.32ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:52:53 [1.28ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:52:53 [0.97ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:52:53 [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-05-05 10:52:53 [0.24ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:52:53 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:52:53 [0.2ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:52:53 [0.19ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:52:53 [0.16ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:52:53 [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-05-05 10:52:53 [0.18ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:52: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-05-05 10:52:53 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:52:53 [0.22ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:52:53 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:52:53 [0.23ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:52:53 [3.58ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e', 154, 5, '[]', 0, '2025-05-05 10:52:53', '2025-05-05 10:52:53', '2026-05-05 10:52:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:52:53 [4.49ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707', 154, 5, '[]', 0, '2025-05-05 10:52:53', '2025-05-05 10:52:53', '2026-05-05 10:52:53');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:52:53 [0.4ms] */
select * from `oauth_access_tokens` where `id` = 'e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:52:53 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:52:53 [3.27ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = 'e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:52:53 [3.16ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-05 10:52:53 [3.22ms] */
select * from `oauth_access_tokens` where `id` = 'e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-05 10:52:53 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-05 10:52:53 [0.13ms] */
select * from `oauth_access_tokens` where `id` = 'e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-05 10:52:53 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-05 10:52:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-05 10:52:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-05 10:52:53 [0.16ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-05 10:52:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = 'e9d18963212acc5e90e2c3b31379935c61ec0b7a97f769ee631644e38b3249024e9a9f3e004af63e' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-05 10:52:53 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-05 10:52:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-05 10:52:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '30f3f4efac0b73f80fcfcd6780155fbed0502d8bb4d0531451ba30271b01fc444700b8cff3fc5707' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-05 10:52:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-05 10:52:53 [0.9ms] */
select count(*) as aggregate from `party` where `id` = 64962;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-05 10:52:53 [0.54ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'JU1122';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-05 10:52:53 [4.76ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 64962 and `license_plate` = 'JU1122' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-05 10:52:53 [7.43ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `service`.`name` = 'Tax' and `transaction`.`party_id` = 64962 and `vehicle`.`license_plate` = 'JU1122' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-05 10:52:53 [0.55ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177944 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 9 - 2025-05-05 10:52:53 [0.46ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177943 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 10 - 2025-05-05 10:52:53 [0.44ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177934 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:54:13 [1.38ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:54:13 [0.25ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:54:13 [0.76ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:54:13 [6.03ms] */
update `userprofiles` set `login_count` = 2077, `last_login` = '2025-05-05 10:54:13', `userprofiles`.`updated_at` = '2025-05-05 10:54:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:54:13 [0.24ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:54:13 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:54:13 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:54:13 [0.25ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:54:13 [0.18ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:54:13 [0.22ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:54:13 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:54:13 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:54:13 [5.2ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d', 154, 5, '[]', 0, '2025-05-05 10:54:13', '2025-05-05 10:54:13', '2026-05-05 10:54:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:54:13 [0.55ms] */
select * from `oauth_access_tokens` where `id` = '29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:54:13 [4.01ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 10:54:13 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 10:54:13 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 10:54:13 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 10:54:13 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 10:54:13 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '29308b8b05a8b5bbe32a8ac02581536225e984346a25eb3c3eea8e4d613e05aaf16f5e2aeae0fe3d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 10:54:13 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 10:54:13 [5.66ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'KY2332' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 10:54:13 [0.42ms] */
select * from `party` where `party`.`id` = 58927 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 10:54:13 [0.43ms] */
select * from `vehicle` where `id` = 99531 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 10:54:13 [0.53ms] */
select * from `party_vehicle` where `vehicle_id` = 99531 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:54:13 [3.41ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:54:13 [0.2ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:54:13 [0.49ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:54:13 [6.8ms] */
update `userprofiles` set `login_count` = 2078, `userprofiles`.`updated_at` = '2025-05-05 10:54:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:54:13 [0.19ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:54:13 [0.42ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:54:13 [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 (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:54:13 [0.35ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:54:13 [0.32ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:54:13 [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-05-05 10:54:13 [0.24ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:54:13 [0.21ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:54:13 [3.08ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d', 154, 5, '[]', 0, '2025-05-05 10:54:13', '2025-05-05 10:54:13', '2026-05-05 10:54:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:54:13 [0.37ms] */
select * from `oauth_access_tokens` where `id` = '60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:54:13 [2.84ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 1 - 2025-05-05 10:54:13 [2ms] */
select * from `oauth_access_tokens` where `id` = '60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 2 - 2025-05-05 10:54:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 3 - 2025-05-05 10:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 4 - 2025-05-05 10:54:13 [0.19ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 5 - 2025-05-05 10:54:13 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '60396a93e89a5c4ec3d751e3735b8b00598d8609e9f1e63d99bd1e6389870d92eebf12de4767931d' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 6 - 2025-05-05 10:54:13 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 7 - 2025-05-05 10:54:13 [3.96ms] */
select DISTINCT payment.id as payment_id, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, `vehicle`.`license_plate`, `payment`.`payment_amount`, `external_payment_reference_no` as `payment_reference_number`, `payment`.`payment_date`, `payment_method`.`name` as `payment_method`, `payment`.`paid_by`, `payment`.`paid_by_mobile` from `payment` left join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` left join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` and `invoice`.`parent` = 'N' left join `transaction` on `transaction`.`invoice_id` = `invoice`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `party` on `transaction`.`party_id` = `party`.`id` left join `payment_method` on `payment`.`payment_method_id` = `payment_method`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `service`.`name` = 'Tax' and `transaction`.`party_id` = 58927 and `vehicle`.`license_plate` = 'KY2332' and `payment`.`deleted_at` is null order by `payment`.`payment_date` desc;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/payments
   Query 8 - 2025-05-05 10:54:13 [1.51ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter` from `invoice` left join `invoice_payment` on `invoice`.`id` = `invoice_payment`.`invoice_id` left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` where `invoice_payment`.`payment_id` = 177933 and `invoice`.`parent` = 'N';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:54:13 [1.61ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:54:13 [0.31ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:54:13 [0.5ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:54:13 [3.12ms] */
update `userprofiles` set `login_count` = 2079, `userprofiles`.`updated_at` = '2025-05-05 10:54:13' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:54:13 [0.22ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:54:13 [0.45ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:54:13 [0.17ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:54:13 [0.14ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:54:13 [0.12ms] */
select * from `oauth_personal_access_clients` order by `id` desc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 10 - 2025-05-05 10:54:13 [0.14ms] */
select * from `oauth_clients` where `oauth_clients`.`id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 11 - 2025-05-05 10:54:13 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:54:13 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:54:13 [3.18ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b', 154, 5, '[]', 0, '2025-05-05 10:54:13', '2025-05-05 10:54:13', '2026-05-05 10:54:13');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:54:13 [0.43ms] */
select * from `oauth_access_tokens` where `id` = '6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:54:13 [2.95ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 1 - 2025-05-05 10:54:14 [1.57ms] */
select * from `oauth_access_tokens` where `id` = '6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 2 - 2025-05-05 10:54:14 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 3 - 2025-05-05 10:54:14 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 4 - 2025-05-05 10:54:14 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 5 - 2025-05-05 10:54:14 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6ed4cdb0c73305a19184e988f4a6752e19e6559948b24c07e9d18c00583e2ca37ea6f6b9ef6f3c1b' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 6 - 2025-05-05 10:54:14 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 7 - 2025-05-05 10:54:14 [0.31ms] */
select count(*) as aggregate from `party` where `id` = 58927;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 8 - 2025-05-05 10:54:14 [0.63ms] */
select count(*) as aggregate from `vehicle` where `license_plate` = 'KY2332';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoices
   Query 9 - 2025-05-05 10:54:14 [1.71ms] */
select `invoice`.`id` as `invoice_id`, `invoice_number`, `term`.`year`, `term`.`quarter`, `invoice`.`transaction_id`, `party`.`id` as `customer_id`, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `vehicle`.`license_plate`, `service`.`name` as `service_name`, `invoice`.`due_date`, `invoice`.`total_invoice_amount` as `invoice_amount`, `invoice`.`status`, `invoice`.`parent`, `invoice`.`created_at`, `invoice`.`updated_at`, CASE WHEN invoice_payment.id IS NULL THEN "Y" ELSE "N" END as make_payment from `invoice` left join `party` on `invoice`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' left join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` left join `vehicle_tax` on `transaction`.`vehicle_tax_id` = `vehicle_tax`.`id` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `vehicle` on `transaction`.`vehicle_id` = `vehicle`.`id` left join `service` on `transaction`.`service_id` = `service`.`id` left join `invoice_payment` on `invoice_payment`.`invoice_id` = `invoice`.`id` where `invoice`.`total_invoice_amount` > 0 and `service`.`name` = 'Tax' and `vehicle_tax`.`exempt` = 'N' and `transaction`.`vehicle_tax_id` is not null and `invoice`.`parent` = 'N' and `invoice`.`party_id` = 58927 and `license_plate` = 'KY2332' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 1 - 2025-05-05 10:59:35 [2.27ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 2 - 2025-05-05 10:59:35 [0.28ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 3 - 2025-05-05 10:59:35 [0.71ms] */
select * from `userprofiles` where `userprofiles`.`user_id` = 154 and `userprofiles`.`user_id` is not null and `userprofiles`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 4 - 2025-05-05 10:59:35 [11.49ms] */
update `userprofiles` set `login_count` = 2080, `last_login` = '2025-05-05 10:59:35', `userprofiles`.`updated_at` = '2025-05-05 10:59:35' where `id` = 154;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 5 - 2025-05-05 10:59:35 [0.25ms] */
select * from `users` where `email` = 'userpayment@puntlandgov.org' and `users`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 6 - 2025-05-05 10:59:35 [0.56ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'roles';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 7 - 2025-05-05 10:59:35 [0.23ms] */
select `id`, `name`, `model_has_roles`.`model_id` as `pivot_model_id`, `model_has_roles`.`role_id` as `pivot_role_id`, `model_has_roles`.`model_type` as `pivot_model_type` from `roles` inner join `model_has_roles` on `roles`.`id` = `model_has_roles`.`role_id` where `model_has_roles`.`model_id` in (154) and `model_has_roles`.`model_type` = 'App\Models\User';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 8 - 2025-05-05 10:59:35 [0.24ms] */
select exists(select * from `oauth_personal_access_clients`) as `exists`;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 9 - 2025-05-05 10:59: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-05-05 10:59:35 [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-05-05 10:59:35 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 12 - 2025-05-05 10:59:35 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 13 - 2025-05-05 10:59:35 [3.59ms] */
insert into `oauth_access_tokens` (`id`, `user_id`, `client_id`, `scopes`, `revoked`, `created_at`, `updated_at`, `expires_at`) values ('6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9', 154, 5, '[]', 0, '2025-05-05 10:59:35', '2025-05-05 10:59:35', '2026-05-05 10:59:35');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 14 - 2025-05-05 10:59:35 [0.65ms] */
select * from `oauth_access_tokens` where `id` = '6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/login
   Query 15 - 2025-05-05 10:59:35 [3.42ms] */
update `oauth_access_tokens` set `name` = 'Secret' where `id` = '6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 1 - 2025-05-05 10:59:35 [1.56ms] */
select * from `oauth_access_tokens` where `id` = '6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 2 - 2025-05-05 10:59:35 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 3 - 2025-05-05 10:59:35 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 4 - 2025-05-05 10:59:35 [0.17ms] */
select * from `users` where `id` = 154 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 5 - 2025-05-05 10:59:35 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6506be92e505804fbf4b23f07be547df46321cfd21d62f3c603acaf352585f997e3fd52a6b9f57b9' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 6 - 2025-05-05 10:59:35 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 7 - 2025-05-05 10:59:35 [239.25ms] */
select `invoice`.`invoice_number`, `invoice`.`invoice_date` as `issue_date`, `invoice`.`due_date`, `invoice`.`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 customer_name, CASE
                WHEN party.phone_number_2 IS NOT NULL THEN CONCAT(party.phone_number_1," / ",party.phone_number_2)
                ELSE party.phone_number_1 END as mobile_number, `invoice`.`total_invoice_amount`, `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 `transaction`.`invoice_id` = `invoice`.`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 `invoice`.`id` = 550278 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/invoice
   Query 8 - 2025-05-05 10:59:35 [0.48ms] */
select `id`, `item`, `description`, `quantity`, `unit_price`, `total_price` from `invoice_item` where `invoice_id` = 550278 and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 12:12:28 [2.29ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 12:12:28 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 12:12:28 [0.78ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 12:12:28 [0.78ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 12:12:28 [0.29ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 12:12:28 [0.28ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 12:12:28 [4.34ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'RY844' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 12:12:28 [0.35ms] */
select * from `party` where `party`.`id` = 43312 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 12:12:28 [0.36ms] */
select * from `vehicle` where `id` = 92818 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 12:12:28 [0.48ms] */
select * from `party_vehicle` where `vehicle_id` = 92818 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 1 - 2025-05-05 12:12:29 [1.71ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 2 - 2025-05-05 12:12:29 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 3 - 2025-05-05 12:12:29 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 4 - 2025-05-05 12:12:29 [0.28ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 5 - 2025-05-05 12:12:29 [0.31ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 6 - 2025-05-05 12:12:29 [0.26ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 7 - 2025-05-05 12:12:29 [0.44ms] */
select * from `vehicle` where `vehicle`.`id` = 92818 and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 8 - 2025-05-05 12:12:29 [0.32ms] */
select * from `vehicle` where `id` = 92818 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 9 - 2025-05-05 12:12:29 [0.38ms] */
select * from `party_vehicle` where `vehicle_id` = 92818 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 10 - 2025-05-05 12:12:29 [1.28ms] */
select `vehicle_tax`.`id`, `transaction`.`id` as `transaction_id`, `term`.`year`, `term`.`quarter`, `invoice`.`invoice_amount`, `invoice`.`outstanding_balance`, `vehicle_tax`.`exempt`, `invoice`.`status`, `tax_sticker`.`name` as `tax_sticker`, CASE
                WHEN term.quarter = 1 THEN DATE_FORMAT(CONCAT(term.year, "-03-31"), "%d-%m-%Y")
                WHEN term.quarter = 2 THEN DATE_FORMAT(CONCAT(term.year, "-06-30"), "%d-%m-%Y")
                WHEN term.quarter = 3 THEN DATE_FORMAT(CONCAT(term.year, "-09-30"), "%d-%m-%Y")
                WHEN term.quarter = 4 THEN DATE_FORMAT(CONCAT(term.year, "-12-31"), "%d-%m-%Y")
                ELSE NULL
                END as due_date from `vehicle_tax` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `transaction` on `vehicle_tax`.`transaction_id` = `transaction`.`id` left join `invoice` on `transaction`.`invoice_id` = `invoice`.`id` left join `tax_sticker` on `vehicle_tax`.`tax_sticker_id` = `tax_sticker`.`id` where `vehicle_tax`.`vehicle_id` = 92818 and `vehicle_tax`.`exempt` = 'N' and `vehicle_tax`.`deleted_at` is null and `transaction`.`deleted_at` is null and `invoice`.`deleted_at` is null order by `term`.`year` asc, `term`.`quarter` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 1 - 2025-05-05 12:12:29 [1.31ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 2 - 2025-05-05 12:12:29 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 3 - 2025-05-05 12:12:29 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 4 - 2025-05-05 12:12:29 [0.16ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 5 - 2025-05-05 12:12:29 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 6 - 2025-05-05 12:12:29 [0.3ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 7 - 2025-05-05 12:12:29 [0.44ms] */
select `id`, `name` from `region` where `deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-05-05 12:12:30 [2.28ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-05-05 12:12:30 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-05-05 12:12:30 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-05-05 12:12:30 [0.25ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-05-05 12:12:30 [0.22ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-05-05 12:12:30 [0.2ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-05-05 12:12:30 [0.66ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 1 - 2025-05-05 12:12:37 [1.66ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 2 - 2025-05-05 12:12:37 [0.2ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 3 - 2025-05-05 12:12:37 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 4 - 2025-05-05 12:12:37 [0.24ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 5 - 2025-05-05 12:12:37 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 6 - 2025-05-05 12:12:37 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 7 - 2025-05-05 12:12:37 [0.46ms] */
select * from `vehicle_tax` where `id` = 362633 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 8 - 2025-05-05 12:12:37 [1.57ms] */
select `id`, `name` from `tax_sticker` where `term_id` = 100 and `name` like '%2024-Q4%' and `assigned` = 'NO' and `tax_sticker`.`deleted_at` is null limit 10;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 1 - 2025-05-05 12:12:40 [1.26ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 2 - 2025-05-05 12:12:40 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 3 - 2025-05-05 12:12:40 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 4 - 2025-05-05 12:12:40 [0.16ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 5 - 2025-05-05 12:12:40 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 6 - 2025-05-05 12:12:40 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 7 - 2025-05-05 12:12:40 [0.27ms] */
select * from `tax_sticker` where `tax_sticker`.`id` = 586340 and `tax_sticker`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 8 - 2025-05-05 12:12:40 [0.16ms] */
select * from `vehicle_tax` where `id` = 362633 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 9 - 2025-05-05 12:12:40 [3.34ms] */
update `vehicle_tax` set `updated_by` = 161, `tax_sticker_id` = 586340, `vehicle_tax`.`updated_at` = '2025-05-05 12:12:40' where `id` = 362633;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 10 - 2025-05-05 12:12:40 [0.29ms] */
select * from `vehicle_tax` where `id` = 362633 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 11 - 2025-05-05 12:12:40 [3.13ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":{"tax_sticker_id":586340},"old":{"tax_sticker_id":null}}', 161, 'App\Models\User', 362633, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 12:12:40', '2025-05-05 12:12:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 12 - 2025-05-05 12:12:40 [3.14ms] */
update `tax_sticker` set `assigned` = 'Y', `updated_by` = 161, `tax_sticker`.`updated_at` = '2025-05-05 12:12:40' where `id` = 586340;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 1 - 2025-05-05 12:12:40 [2.16ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 2 - 2025-05-05 12:12:40 [0.28ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 3 - 2025-05-05 12:12:40 [0.27ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 4 - 2025-05-05 12:12:40 [0.31ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 5 - 2025-05-05 12:12:40 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 6 - 2025-05-05 12:12:40 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 7 - 2025-05-05 12:12:40 [0.29ms] */
select * from `vehicle_tax` where `id` in (362633) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 8 - 2025-05-05 12:12:40 [0.32ms] */
select * from `transaction` where `transaction`.`id` = 460723 and `transaction`.`id` is not null and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 9 - 2025-05-05 12:12:40 [0.25ms] */
select * from `transaction` where `transaction`.`id` = 460723 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 10 - 2025-05-05 12:12:40 [0.27ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 11 - 2025-05-05 12:12:40 [0.27ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 12 - 2025-05-05 12:12:40 [0.27ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 8 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 13 - 2025-05-05 12:12:40 [0.41ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (460723, 'APPROVED', '2025-05-05 12:12:40', 8, 161, null, 161, 161, '2025-05-05 12:12:40', '2025-05-05 12:12:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 14 - 2025-05-05 12:12:40 [0.26ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 4 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 15 - 2025-05-05 12:12:40 [0.36ms] */
update `transaction` set `current_workflow_state_id` = 9, `status` = 'END', `updated_by` = 161, `transaction`.`updated_at` = '2025-05-05 12:12:40' where `id` = 460723;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 16 - 2025-05-05 12:12:40 [0.21ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 17 - 2025-05-05 12:12:40 [0.31ms] */
select * from `vehicle_tax` where `transaction_id` = 460723 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 18 - 2025-05-05 12:12:40 [0.17ms] */
update `vehicle_tax` set `status` = 'ISSUED', `vehicle_tax`.`updated_at` = '2025-05-05 12:12:40' where `id` = 362633;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 19 - 2025-05-05 12:12:40 [0.22ms] */
select * from `vehicle_tax` where `id` = 362633 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 20 - 2025-05-05 12:12:40 [0.2ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":{"status":"ISSUED"},"old":{"status":"PAID"}}', 161, 'App\Models\User', 362633, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 12:12:40', '2025-05-05 12:12:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 21 - 2025-05-05 12:12:40 [0.28ms] */
select * from `invoice` where `invoice`.`id` = 438241 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 22 - 2025-05-05 12:12:40 [0.25ms] */
select * from `transaction` where `id` = 460723 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 23 - 2025-05-05 12:12:40 [0.25ms] */
select * from `transaction` where `transaction`.`id` = 510882 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 24 - 2025-05-05 12:12:40 [0.14ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 25 - 2025-05-05 12:12:40 [0.14ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 26 - 2025-05-05 12:12:40 [0.15ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 8 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 27 - 2025-05-05 12:12:40 [0.22ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (510882, 'APPROVED', '2025-05-05 12:12:40', 8, 161, null, 161, 161, '2025-05-05 12:12:40', '2025-05-05 12:12:40');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 28 - 2025-05-05 12:12:40 [0.14ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 4 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 29 - 2025-05-05 12:12:40 [0.28ms] */
update `transaction` set `current_workflow_state_id` = 9, `status` = 'END', `updated_by` = 161, `transaction`.`updated_at` = '2025-05-05 12:12:40' where `id` = 510882;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 30 - 2025-05-05 12:12:40 [0.14ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 31 - 2025-05-05 12:12:40 [0.25ms] */
select * from `vehicle_tax` where `transaction_id` = 510882 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 32 - 2025-05-05 12:12:40 [0.26ms] */
select * from `invoice` where `invoice`.`id` = 486557 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 33 - 2025-05-05 12:12:40 [0.51ms] */
select * from `term` where `term`.`id` = 100 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 34 - 2025-05-05 12:12:40 [0.62ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 92476 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 35 - 2025-05-05 12:12:40 [0.4ms] */
select * from `party` where `party`.`id` = 43312 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 36 - 2025-05-05 12:12:40 [0.41ms] */
select * from `person` where `person`.`id` = 43312 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 37 - 2025-05-05 12:12:40 [0.47ms] */
select * from `vehicle` where `vehicle`.`id` = 92818 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 38 - 2025-05-05 12:12:40 [0.68ms] */
select * from `invoice` where `invoice`.`id` = 438241 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 39 - 2025-05-05 12:12:40 [1.18ms] */
select * from `invoice_payment` where `invoice_payment`.`invoice_id` = 438241 and `invoice_payment`.`invoice_id` is not null and `invoice_payment`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 40 - 2025-05-05 12:12:40 [1.53ms] */
select * from `Payment` where `Payment`.`id` = 177935 and `Payment`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 41 - 2025-05-05 12:12:40 [0.94ms] */
select * from `tax_collection_points` where `tax_collection_points`.`id` = 27 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 42 - 2025-05-05 12:12:40 [0.8ms] */
select * from `tax_sticker` where `tax_sticker`.`id` = 586340 and `tax_sticker`.`id` is not null and `tax_sticker`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 1 - 2025-05-05 12:12:53 [1.34ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 2 - 2025-05-05 12:12:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 3 - 2025-05-05 12:12:53 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 4 - 2025-05-05 12:12:53 [0.16ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 5 - 2025-05-05 12:12:53 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 6 - 2025-05-05 12:12:53 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 7 - 2025-05-05 12:12:53 [0.34ms] */
select `vehicle`.`id` as `vehicle_id`, `company`.`contact_party_id`, `party`.`id` as `party_id`, `vehicle`.`license_plate`, `vehicle`.`year`, `vehicle`.`odometer`, `vehicle`.`vin`, `sub_category`.`name` as `sub_category`, `classification_type`.`name` as `classification`, `make`.`name` as `make`, `model`.`name` as `model`, `vehicle_color`.`name` as `vehicle_color`, `fuel_type`.`name` as `fuel_type`, `vehicle_type`.`name` as `vehicle_type`, CASE
                WHEN party_vehicle.id IS NULL THEN "UNREGISTERED" ELSE party_vehicle.status END AS status, CASE
                WHEN person.id IS NOT NULL THEN CONCAT(person.first_name, " ", person.second_name, " ", person.third_name, " ", person.fourth_name)
                WHEN company.id IS NOT NULL THEN company.company_name
                ELSE "No Entity Found"
                END AS owner, `party`.`partyable_type` as `owner_type`, `party_vehicle`.`registration_date`, `vehicle`.`created_at`, `vehicle`.`updated_at` from `vehicle` left join `party_vehicle` on `party_vehicle`.`vehicle_id` = `vehicle`.`id` left join `sub_category` on `vehicle`.`sub_category_id` = `sub_category`.`id` left join `classification_type` on `party_vehicle`.`classification_id` = `classification_type`.`id` left join `model` on `vehicle`.`model_id` = `model`.`id` left join `make` on `model`.`make_id` = `make`.`id` left join `vehicle_color` on `vehicle`.`vehicle_color_id` = `vehicle_color`.`id` left join `fuel_type` on `vehicle`.`fuel_type_id` = `fuel_type`.`id` left join `vehicle_type` on `vehicle`.`vehicle_type_id` = `vehicle_type`.`id` left join `party` on `party_vehicle`.`party_id` = `party`.`id` left join `person` on `person`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Person' left join `company` on `company`.`id` = `party`.`partyable_id` and `party`.`partyable_type` = 'Company' where `license_plate` = 'RY844' and `party_vehicle`.`is_owner` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 8 - 2025-05-05 12:12:53 [0.2ms] */
select * from `party` where `party`.`id` = 43312 and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 9 - 2025-05-05 12:12:53 [0.15ms] */
select * from `vehicle` where `id` = 92818 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/vehicle
   Query 10 - 2025-05-05 12:12:53 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 92818 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 1 - 2025-05-05 12:12:55 [2.4ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 2 - 2025-05-05 12:12:55 [1.48ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 3 - 2025-05-05 12:12:55 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 4 - 2025-05-05 12:12:55 [0.39ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 5 - 2025-05-05 12:12:55 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 6 - 2025-05-05 12:12:55 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 7 - 2025-05-05 12:12:55 [0.16ms] */
select * from `vehicle` where `vehicle`.`id` = 92818 and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 8 - 2025-05-05 12:12:55 [0.14ms] */
select * from `vehicle` where `id` = 92818 and `provisional` = 'Y' and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 9 - 2025-05-05 12:12:55 [0.15ms] */
select * from `party_vehicle` where `vehicle_id` = 92818 and `is_owner` = 'Y' and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/taxes
   Query 10 - 2025-05-05 12:12:55 [5.7ms] */
select `vehicle_tax`.`id`, `transaction`.`id` as `transaction_id`, `term`.`year`, `term`.`quarter`, `invoice`.`invoice_amount`, `invoice`.`outstanding_balance`, `vehicle_tax`.`exempt`, `invoice`.`status`, `tax_sticker`.`name` as `tax_sticker`, CASE
                WHEN term.quarter = 1 THEN DATE_FORMAT(CONCAT(term.year, "-03-31"), "%d-%m-%Y")
                WHEN term.quarter = 2 THEN DATE_FORMAT(CONCAT(term.year, "-06-30"), "%d-%m-%Y")
                WHEN term.quarter = 3 THEN DATE_FORMAT(CONCAT(term.year, "-09-30"), "%d-%m-%Y")
                WHEN term.quarter = 4 THEN DATE_FORMAT(CONCAT(term.year, "-12-31"), "%d-%m-%Y")
                ELSE NULL
                END as due_date from `vehicle_tax` left join `term` on `vehicle_tax`.`term_id` = `term`.`id` left join `transaction` on `vehicle_tax`.`transaction_id` = `transaction`.`id` left join `invoice` on `transaction`.`invoice_id` = `invoice`.`id` left join `tax_sticker` on `vehicle_tax`.`tax_sticker_id` = `tax_sticker`.`id` where `vehicle_tax`.`vehicle_id` = 92818 and `vehicle_tax`.`exempt` = 'N' and `vehicle_tax`.`deleted_at` is null and `transaction`.`deleted_at` is null and `invoice`.`deleted_at` is null order by `term`.`year` asc, `term`.`quarter` asc;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 1 - 2025-05-05 12:12:56 [1.43ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 2 - 2025-05-05 12:12:56 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 3 - 2025-05-05 12:12:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 4 - 2025-05-05 12:12:56 [0.24ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 5 - 2025-05-05 12:12:56 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 6 - 2025-05-05 12:12:56 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/region-list
   Query 7 - 2025-05-05 12:12:56 [0.13ms] */
select `id`, `name` from `region` where `deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-05-05 12:12:56 [13.52ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-05-05 12:12:56 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-05-05 12:12:56 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-05-05 12:12:56 [0.17ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-05-05 12:12:56 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-05-05 12:12:56 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-05-05 12:12:56 [0.19ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 1 - 2025-05-05 12:13:25 [1.86ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 2 - 2025-05-05 12:13:25 [0.27ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 3 - 2025-05-05 12:13:25 [0.32ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 4 - 2025-05-05 12:13:25 [0.25ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 5 - 2025-05-05 12:13:25 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 6 - 2025-05-05 12:13:25 [0.17ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 7 - 2025-05-05 12:13:25 [4.56ms] */
select `id`, `receipt_number` from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null order by `id` asc limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_receipt_number
   Query 8 - 2025-05-05 12:13:25 [2.28ms] */
select count(*) as aggregate from `receipts` where `used` = 'No' and `user_id` = 161 and `type` = 'GOV_RECEIPT_NUMBER' and `receipts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-05-05 12:13:26 [1.34ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-05-05 12:13:26 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-05-05 12:13:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-05-05 12:13:26 [0.2ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-05-05 12:13:26 [0.16ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-05-05 12:13:26 [0.14ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-05-05 12:13:26 [1.04ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-05-05 12:13:26 [0.38ms] */
select `transaction_id` from `vehicle_tax` where `id` in (401389, 401390) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-05-05 12:13:26 [0.31ms] */
select `parent_id` from `transaction` where `id` in (511239, 511240) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-05-05 12:13:26 [304.65ms] */
select `id` from `transaction` where `parent_id` in (574628) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-05-05 12:13:26 [0.52ms] */
select * from `transaction` where `id` in (574628) and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-05-05 12:13:26 [0.19ms] */
select `transaction_id` from `vehicle_tax` where `id` in (401389, 401390) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-05-05 12:13:26 [0.54ms] */
select * from `invoice` where `transaction_id` = 511239 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-05-05 12:13:26 [0.4ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 486907 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-05-05 12:13:26 [0.33ms] */
select * from `transaction` where `transaction`.`id` = 511239 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-05-05 12:13:26 [0.32ms] */
select * from `invoice` where `transaction_id` = 511240 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-05-05 12:13:26 [0.28ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 486908 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-05-05 12:13:26 [0.28ms] */
select * from `transaction` where `transaction`.`id` = 511240 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-05-05 12:13:26 [0.24ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-05-05 12:13:26 [0.28ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-05-05 12:13:26 [0.18ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-05-05 12:13:26 [0.25ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 1 - 2025-05-05 12:13:28 [2.03ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 2 - 2025-05-05 12:13:28 [0.26ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 3 - 2025-05-05 12:13:28 [0.25ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 4 - 2025-05-05 12:13:28 [0.32ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 5 - 2025-05-05 12:13:28 [0.15ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 6 - 2025-05-05 12:13:28 [0.15ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 7 - 2025-05-05 12:13:28 [0.16ms] */
select * from `payment_configurations` where `provider_id` = 1 and `status` = 1 and `payment_configurations`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 8 - 2025-05-05 12:13:28 [0.14ms] */
select `transaction_id` from `vehicle_tax` where `id` in (401389, 401390) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 9 - 2025-05-05 12:13:28 [0.13ms] */
select `parent_id` from `transaction` where `id` in (511239, 511240) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 10 - 2025-05-05 12:13:28 [0.12ms] */
select `id` from `transaction` where `parent_id` in (574628) and `transaction`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 11 - 2025-05-05 12:13:28 [0.15ms] */
select * from `transaction` where `id` in (574628) and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 12 - 2025-05-05 12:13:28 [0.12ms] */
select `transaction_id` from `vehicle_tax` where `id` in (401389, 401390) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 13 - 2025-05-05 12:13:28 [0.18ms] */
select * from `invoice` where `transaction_id` = 511239 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 14 - 2025-05-05 12:13:28 [0.14ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 486907 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 15 - 2025-05-05 12:13:28 [0.16ms] */
select * from `transaction` where `transaction`.`id` = 511239 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 16 - 2025-05-05 12:13:28 [0.15ms] */
select * from `invoice` where `transaction_id` = 511240 and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 17 - 2025-05-05 12:13:28 [0.13ms] */
select * from `invoice_item` where `invoice_item`.`invoice_id` = 486908 and `invoice_item`.`invoice_id` is not null and `invoice_item`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 18 - 2025-05-05 12:13:28 [0.16ms] */
select * from `transaction` where `transaction`.`id` = 511240 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 19 - 2025-05-05 12:13:28 [0.14ms] */
select * from `merchants` where `merchants`.`id` = 1 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 20 - 2025-05-05 12:13:28 [0.14ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 1 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 21 - 2025-05-05 12:13:28 [0.13ms] */
select * from `merchants` where `merchants`.`id` = 3 and `merchants`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/make_payment
   Query 22 - 2025-05-05 12:13:28 [0.13ms] */
select * from `user_accounts` where `user_id` = 161 and `payment_provider_id` = 3 and `user_accounts`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 1 - 2025-05-05 12:13:29 [1.51ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 2 - 2025-05-05 12:13:29 [0.18ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 3 - 2025-05-05 12:13:29 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 4 - 2025-05-05 12:13:29 [0.2ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 5 - 2025-05-05 12:13:29 [0.17ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 6 - 2025-05-05 12:13:29 [0.16ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 7 - 2025-05-05 12:13:29 [0.42ms] */
select * from `transaction` where `id` = 511240 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 8 - 2025-05-05 12:13:29 [1.56ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 511240 and `payment_documents`.`transaction_id` is not null and `type` = 'SERVICE_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 9 - 2025-05-05 12:13:29 [0.54ms] */
select * from `invoice` where `invoice`.`id` = 486908 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 10 - 2025-05-05 12:13:29 [0.68ms] */
select `Payment`.*, `invoice_payment`.`invoice_id` as `pivot_invoice_id`, `invoice_payment`.`payment_id` as `pivot_payment_id`, `invoice_payment`.`created_at` as `pivot_created_at`, `invoice_payment`.`updated_at` as `pivot_updated_at` from `Payment` inner join `invoice_payment` on `Payment`.`id` = `invoice_payment`.`payment_id` where `invoice_payment`.`invoice_id` = 486908 and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/workflow
   Query 11 - 2025-05-05 12:13:29 [1.53ms] */
select * from `payment_documents` where `payment_documents`.`transaction_id` = 511240 and `payment_documents`.`transaction_id` is not null and `type` = 'GOV_RECEIPT_IMAGE' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 1 - 2025-05-05 12:13:30 [1.61ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 2 - 2025-05-05 12:13:30 [0.19ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 3 - 2025-05-05 12:13:30 [0.18ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 4 - 2025-05-05 12:13:30 [0.21ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 5 - 2025-05-05 12:13:30 [0.24ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 6 - 2025-05-05 12:13:30 [0.19ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org/api/payment_providers
   Query 7 - 2025-05-05 12:13:30 [0.24ms] */
select * from `payment_method` where exists (select * from `payment_configurations` where `payment_method`.`id` = `payment_configurations`.`provider_id` and `fee_type` = 'Government' and `payment_configurations`.`deleted_at` is null) and `payment_method`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 1 - 2025-05-05 12:13:42 [1.31ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 2 - 2025-05-05 12:13:42 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 3 - 2025-05-05 12:13:42 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 4 - 2025-05-05 12:13:42 [0.15ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 5 - 2025-05-05 12:13:42 [0.14ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 6 - 2025-05-05 12:13:42 [0.13ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 7 - 2025-05-05 12:13:42 [0.52ms] */
select * from `vehicle_tax` where `id` = 401390 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/get_sticker_code
   Query 8 - 2025-05-05 12:13:42 [1.26ms] */
select `id`, `name` from `tax_sticker` where `term_id` = 104 and `name` like '%2025-Q2%' and `assigned` = 'NO' and `tax_sticker`.`deleted_at` is null limit 10;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 1 - 2025-05-05 12:13:56 [1.34ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 2 - 2025-05-05 12:13:56 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 3 - 2025-05-05 12:13:56 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 4 - 2025-05-05 12:13:56 [0.16ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 5 - 2025-05-05 12:13:56 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 6 - 2025-05-05 12:13:56 [0.11ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 7 - 2025-05-05 12:13:56 [0.75ms] */
select * from `tax_sticker` where `tax_sticker`.`id` = 636474 and `tax_sticker`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 8 - 2025-05-05 12:13:56 [0.14ms] */
select * from `vehicle_tax` where `id` = 401390 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 9 - 2025-05-05 12:13:56 [3.97ms] */
update `vehicle_tax` set `tax_sticker_id` = 636474, `vehicle_tax`.`updated_at` = '2025-05-05 12:13:56' where `id` = 401390;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 10 - 2025-05-05 12:13:56 [0.54ms] */
select * from `vehicle_tax` where `id` = 401390 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 11 - 2025-05-05 12:13:56 [6.76ms] */
insert into `activity_log` (`log_name`, `properties`, `causer_id`, `causer_type`, `subject_id`, `subject_type`, `description`, `updated_at`, `created_at`) values ('vehicle_tax', '{"attributes":{"tax_sticker_id":636474},"old":{"tax_sticker_id":636470}}', 161, 'App\Models\User', 401390, 'Modules\Vehicle\Entities\VehicleTax', 'updated', '2025-05-05 12:13:56', '2025-05-05 12:13:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/assign_sticker_code
   Query 12 - 2025-05-05 12:13:56 [3.46ms] */
update `tax_sticker` set `assigned` = 'Y', `updated_by` = 161, `tax_sticker`.`updated_at` = '2025-05-05 12:13:56' where `id` = 636474;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 1 - 2025-05-05 12:13:56 [1.34ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 2 - 2025-05-05 12:13:56 [0.12ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 3 - 2025-05-05 12:13:56 [0.12ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 4 - 2025-05-05 12:13:56 [0.14ms] */
select * from `users` where `id` = 161 and `users`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 5 - 2025-05-05 12:13:56 [0.13ms] */
select * from `oauth_access_tokens` where `id` = '6e705d00a3f68c70a8e8f3246e483618c9d9d170ad99c8f4ec4893503770e1f1e17cd189db04c587' limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 6 - 2025-05-05 12:13:56 [0.11ms] */
select * from `oauth_clients` where `id` = 5 limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 7 - 2025-05-05 12:13:56 [0.33ms] */
select * from `vehicle_tax` where `id` in (401389, 401390) and `vehicle_tax`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 8 - 2025-05-05 12:13:56 [0.27ms] */
select * from `transaction` where `transaction`.`id` = 511239 and `transaction`.`id` is not null and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 9 - 2025-05-05 12:13:56 [0.23ms] */
select * from `transaction` where `transaction`.`id` = 511239 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 10 - 2025-05-05 12:13:56 [0.13ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 11 - 2025-05-05 12:13:56 [0.12ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 12 - 2025-05-05 12:13:56 [0.21ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 9 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 13 - 2025-05-05 12:13:56 [0.41ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (511239, 'APPROVED', '2025-05-05 12:13:56', 9, 161, null, 161, 161, '2025-05-05 12:13:56', '2025-05-05 12:13:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 14 - 2025-05-05 12:13:56 [0.24ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 5 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 15 - 2025-05-05 12:13:56 [0.15ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 16 - 2025-05-05 12:13:56 [0.27ms] */
select * from `vehicle_tax` where `transaction_id` = 511239 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 17 - 2025-05-05 12:13:56 [0.2ms] */
select * from `invoice` where `invoice`.`id` = 486907 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 18 - 2025-05-05 12:13:56 [0.34ms] */
select * from `transaction` where `id` = 511239 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 19 - 2025-05-05 12:13:56 [0.29ms] */
select * from `transaction` where `transaction`.`id` = 574628 and `transaction`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 20 - 2025-05-05 12:13:56 [0.17ms] */
select * from `service_workflow` where `service_workflow`.`id` = 2 and `service_workflow`.`id` is not null and `service_workflow`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 21 - 2025-05-05 12:13:56 [0.15ms] */
select * from `service` where `service`.`id` = 2 and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 22 - 2025-05-05 12:13:56 [0.16ms] */
select * from `workflow_definition` where `workflow_definition`.`id` = 9 and `workflow_definition`.`id` is not null and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 23 - 2025-05-05 12:13:56 [0.25ms] */
insert into `transaction_workflow` (`transaction_id`, `action`, `action_date`, `role_id`, `user_id`, `comments`, `updated_by`, `created_by`, `created_at`, `updated_at`) values (574628, 'APPROVED', '2025-05-05 12:13:56', 9, 161, null, 161, 161, '2025-05-05 12:13:56', '2025-05-05 12:13:56');
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 24 - 2025-05-05 12:13:56 [0.16ms] */
select * from `workflow_definition` where `workflow_id` = 2 and `step_number` = 5 and `workflow_definition`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 25 - 2025-05-05 12:13:56 [0.16ms] */
select * from `service` where `service`.`id` = 2 and `service`.`id` is not null and `service`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 26 - 2025-05-05 12:13:56 [0.25ms] */
select * from `vehicle_tax` where `transaction_id` = 574628 and `vehicle_tax`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 27 - 2025-05-05 12:13:56 [0.35ms] */
select * from `invoice` where `invoice`.`id` = 550285 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 28 - 2025-05-05 12:13:56 [0.29ms] */
select * from `term` where `term`.`id` = 103 and `term`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 29 - 2025-05-05 12:13:56 [0.19ms] */
select * from `party_vehicle` where `party_vehicle`.`id` = 92476 and `party_vehicle`.`id` is not null and `party_vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 30 - 2025-05-05 12:13:56 [0.17ms] */
select * from `party` where `party`.`id` = 43312 and `party`.`id` is not null and `party`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 31 - 2025-05-05 12:13:56 [0.19ms] */
select * from `person` where `person`.`id` = 43312 and `person`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 32 - 2025-05-05 12:13:56 [0.18ms] */
select * from `vehicle` where `vehicle`.`id` = 92818 and `vehicle`.`id` is not null and `vehicle`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 33 - 2025-05-05 12:13:56 [0.29ms] */
select * from `invoice` where `invoice`.`id` = 486907 and `invoice`.`id` is not null and `invoice`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 34 - 2025-05-05 12:13:56 [0.29ms] */
select * from `invoice_payment` where `invoice_payment`.`invoice_id` = 486907 and `invoice_payment`.`invoice_id` is not null and `invoice_payment`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 35 - 2025-05-05 12:13:56 [0.39ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 36 - 2025-05-05 12:13:56 [0.44ms] */
select column_name as `column_name` from information_schema.columns where table_schema = 'prod_rta_temp' and table_name = 'permissions';
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 37 - 2025-05-05 12:13:56 [0.3ms] */
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/complete_transaction
   Query 38 - 2025-05-05 12:13:56 [0.43ms] */
select * from `district` where `district`.`id` = 37 and `district`.`deleted_at` is null limit 1;
/*==================================================*/
/* Origin (request): POST https://testtra.puntlandgov.org/api/complete_transaction
   Query 39 - 2025-05-05 12:13:56 [0.26ms] */
select * from `region` where `region`.`id` = 7 and `region`.`deleted_at` is null limit 1;
/*==================================================*/
