Skip to content

URS-031 · Record all transactions with timestamps and user IDs

Title: Record all transactions with timestamps and user IDs Date: 2026-09-29T02:30:47.546Z Duration: 107.3s Overall Status: ✅ PASS

The system shall record all transactions (orders, edits, returns) with timestamps and user IDs.

Source: User_Requirement_Specifications_Vantis_DeviceFlow.xlsx — the run below proves the system meets this requirement.

Status: ✅ PASS

Each step below corresponds to one Playwright test that ran sequentially. Screenshots and video recordings provide visual evidence of the UI behaviour.

1. Step 1: Logged in as Blair Bennett — ✅ PASS

Section titled “1. Step 1: Logged in as Blair Bennett — ✅ PASS”

What this step proves:

Authenticates as Blair Bennett (Corveta sales rep), establishing the user identity that will be recorded against subsequent transactions.

Audit events generated by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

TimeTypeActionUserOrgPerformed
2026-09-29 02:30:53Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:30:57Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:31:34Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:06Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:14Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:21Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis—

Screenshots:

step 01 logged in

Video recording:


What this step proves:

Submits the first bill-only order as Blair Bennett. The system records the order in billing_orders with created_by_user_id and a server-side created_at timestamp.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-09-29T02:31:07.969Z → 2026-09-29T02:31:30.392Z)

TimeTypeActionUserOrgPerformed
2026-09-29 02:31:09Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupno
2026-09-29 02:31:27Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupno
2026-09-29 02:31:27Zdecisionbill_only.link_purchase_orderblair.bennett@corvetasurgical.comCorveta Surgical Groupno
2026-09-29 02:31:27ZdecisionbasicErp.deriveSalesOrderblair.bennett@corvetasurgical.comVantisno
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis—
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis—
2026-09-29 02:31:27Zdecisionbill_only_order.inventory_items_decrementblair.bennett@corvetasurgical.comVantisyes
2026-09-29 02:31:27Zdecisionbill_only_order.direct_po_import_on_createblair.bennett@corvetasurgical.comVantisno
2026-09-29 02:31:27Zbilling_orderstatus_changeblair.bennett@corvetasurgical.comVantis—
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis—
2026-09-29 02:31:27Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisno
2026-09-29 02:31:27Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisno
2026-09-29 02:31:29Zdecisionbill_only.notifications.cc_incident_recipients—Vantisno
2026-09-29 02:31:29Ztransactional_emailnew_bill_only—Corveta Surgical Group—

Emails triggered by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

Email 1: New Bill-Only Order - 9/29/2026 - Vantis BO-1

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-1

New Bill-Only Order - 9/29/2026 - Vantis BO-1

Email 2: New Bill-Only Order - 9/29/2026 - Vantis BO-2

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-2

New Bill-Only Order - 9/29/2026 - Vantis BO-2

Screenshots:

step 02 account selected

step 02 devices selected

step 02 documents

step 02 review

step 02 order submitted

Video recording:


What this step proves:

Submits a second bill-only order, demonstrating that each transaction is recorded independently with its own user ID and a distinct timestamp.

Audit events generated by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

TimeTypeActionUserOrgPerformed
2026-09-29 02:31:27Zdecisionbill_only_order.inventory_items_decrementblair.bennett@corvetasurgical.comVantisyes
2026-09-29 02:31:27Zbilling_orderstatus_changeblair.bennett@corvetasurgical.comVantis—
2026-09-29 02:32:01Zdecisionbill_only_order.inventory_items_decrementblair.bennett@corvetasurgical.comVantisyes
2026-09-29 02:32:01Zbilling_orderstatus_changeblair.bennett@corvetasurgical.comVantis—

Emails triggered by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

Email 1: New Bill-Only Order - 9/29/2026 - Vantis BO-1

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-1

New Bill-Only Order - 9/29/2026 - Vantis BO-1

Email 2: New Bill-Only Order - 9/29/2026 - Vantis BO-2

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-2

New Bill-Only Order - 9/29/2026 - Vantis BO-2

Screenshots:

step 03 second order submitted

Video recording:


4. Step 4: Billing list with recorded transactions — ✅ PASS

Section titled “4. Step 4: Billing list with recorded transactions — ✅ PASS”

What this step proves:

Views the billing list as Blair, confirming that the Submitter and Created columns expose the recorded user and timestamp for each transaction in the UI.

Screenshots:

step 04 billing list

Video recording:


What this step proves:

Views the returns list, confirming that the Created By and Created columns expose user and timestamp attribution for return transactions.

Screenshots:

step 05 returns list

Video recording:


6. Step 6a: Cross-user billing view — ✅ PASS

Section titled “6. Step 6a: Cross-user billing view — ✅ PASS”

What this step proves:

Logs in as Mark Manufacturer to verify that Blair’s order transactions are visible to a different authorized user with the original user attribution intact.

Audit events generated by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

TimeTypeActionUserOrgPerformed
2026-09-29 02:30:53Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:30:57Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:31:34Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:06Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:14Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group—
2026-09-29 02:32:21Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis—

Screenshots:

step 06 cross user billing

Video recording:


7. Step 6b: Cross-user returns view — ✅ PASS

Section titled “7. Step 6b: Cross-user returns view — ✅ PASS”

What this step proves:

As Mark Manufacturer, verifies that return transactions are also visible cross-user with Created By and Created columns showing the original submitter.

Screenshots:

step 06 cross user returns


8. Step 7: Combined transaction log — ✅ PASS

Section titled “8. Step 7: Combined transaction log — ✅ PASS”

What this step proves:

Renders a live query from billing_orders, inventory_transactions, audit_events, and returns tables, proving every recorded transaction has a user and timestamp.

Screenshots:

step 07 transaction log

Video recording:


The following SQL queries ran against the application database after the Playwright scenarios completed. Each query asserts a specific condition that proves the feature under test persisted its data correctly.

Bill-only orders recorded with user ID + timestamp — ✅ PASS

Section titled “Bill-only orders recorded with user ID + timestamp — ✅ PASS”

Assertion: At least two billing_orders created by Blair in the test window, each with created_by_user_id and created_at populated

SELECT id, order_number, status, created_by_user_id, created_at
FROM billing_orders
WHERE created_by_user_id = $1
AND created_at > NOW() - INTERVAL '30 minutes'
ORDER BY created_at ASC
idorder_numberstatuscreated_by_user_idcreated_at
01a0eb00-b65f-75e7-a132-d7f361809099BO-1submitted17b8c9d0-e1f2-3456-1234-5678901234562026-09-29T02:31:27.240Z
01a0eb01-3aa1-7080-a70b-3e8175be48aaBO-2submitted17b8c9d0-e1f2-3456-1234-5678901234562026-09-29T02:32:01.379Z

Inventory transactions recorded with timestamp — ✅ PASS

Section titled “Inventory transactions recorded with timestamp — ✅ PASS”

Assertion: inventory_transactions rows exist for the bill-only orders, each with a non-null created_at

SELECT id, source_type, source_id, created_at,
distributor_organization_id, manufacturer_organization_id
FROM inventory_transactions
WHERE source_type = 'bill_only_order'
AND created_at > NOW() - INTERVAL '30 minutes'
AND (distributor_organization_id = $1 OR manufacturer_organization_id = $1)
ORDER BY created_at ASC
idsource_typesource_idcreated_atdistributor_organization_idmanufacturer_organization_id
01a0eb00-b66f-76f5-ac1f-3294e85410eabill_only_order01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Zb2c3d4e5-f6a7-8901-bcde-f12345678901NULL
01a0eb01-3aa9-74ef-b451-62b78b735e54bill_only_order01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Zb2c3d4e5-f6a7-8901-bcde-f12345678901NULL

Inventory history records each change with a timestamp — ✅ PASS

Section titled “Inventory history records each change with a timestamp — ✅ PASS”

Assertion: inventory_history contains bill_only_order rows in the test window, each with created_at populated

SELECT ih.id, ih.item_id, ih.quantity, ih.info, ih.created_at
FROM inventory_history ih
WHERE ih.created_at > NOW() - INTERVAL '30 minutes'
AND ih.info->>'reason' = 'bill_only_order'
ORDER BY ih.created_at ASC
LIMIT 20
iditem_idquantityinfocreated_at
01a0eb00-b684-75a7-8c7a-ce9e97e853cd2cc1ac87-b8a3-49b0-9224-e39f6fbdf3f52{"action":"removed","reason":"bill_only_order","bestEffort":true,"billingOrderId":"01a0eb00-b65f-75e7-a132-d7f361809099","shortageQuantity":0,"requestedQuantity":2}2026-09-29T02:31:27.240Z
01a0eb00-b684-75a7-8c7a-ce9feff0471ed8d3261f-e222-4f23-bd6c-ac6f3682363b3{"action":"removed","reason":"bill_only_order","bestEffort":true,"billingOrderId":"01a0eb00-b65f-75e7-a132-d7f361809099","shortageQuantity":0,"requestedQuantity":3}2026-09-29T02:31:27.240Z
01a0eb01-3aae-730e-94ca-31cbd51e36de2cc1ac87-b8a3-49b0-9224-e39f6fbdf3f51{"action":"removed","reason":"bill_only_order","bestEffort":true,"billingOrderId":"01a0eb01-3aa1-7080-a70b-3e8175be48aa","shortageQuantity":0,"requestedQuantity":1}2026-09-29T02:32:01.379Z
01a0eb01-3aae-730e-94ca-31cca8307548d8d3261f-e222-4f23-bd6c-ac6f3682363b1{"action":"removed","reason":"bill_only_order","bestEffort":true,"billingOrderId":"01a0eb01-3aa1-7080-a70b-3e8175be48aa","shortageQuantity":0,"requestedQuantity":1}2026-09-29T02:32:01.379Z

Audit events recorded with user ID + timestamp — ✅ PASS

Section titled “Audit events recorded with user ID + timestamp — ✅ PASS”

Assertion: At least one audit_events row in the test window has both user_id and created_at populated, and no row is missing created_at

SELECT id, organization_id, user_id, event_type, action,
object_id, created_at
FROM audit_events
WHERE created_at > NOW() - INTERVAL '30 minutes'
AND organization_id IN ($1, $2)
ORDER BY created_at ASC
LIMIT 50
idorganization_iduser_idevent_typeactionobject_idcreated_at
01a0eaff-dad7-744a-b3ef-01b0d6fd2975a1b2c3d4-e5f6-7890-abcd-ef1234567890NULLdecisionreturn_overdue_sweepa1b2c3d4-e5f6-7890-abcd-ef12345678902026-09-29T02:30:31.383Z
01a0eaff-dba4-736c-80f1-0924770b8e94b2c3d4e5-f6a7-8901-bcde-f12345678901NULLdecisionensure_lot_expiration_cycle_counter_assignmenta6e7f8a9-b0c1-2345-0123-4567890123452026-09-29T02:30:31.589Z
01a0eaff-dbd1-7c9e-98d5-0ee4bce51a76b2c3d4e5-f6a7-8901-bcde-f12345678901NULLdecisionensure_lot_expiration_cycle_counter_assignmentb7f8a9b0-c1d2-3456-1234-5678901234562026-09-29T02:30:31.647Z
01a0eaff-dc6d-7167-87b1-e578dd2b2d93b2c3d4e5-f6a7-8901-bcde-f12345678901NULLchecklistchecklists.create01a0eaff-dc0f-7e8a-98b4-12fca27f58022026-09-29T02:30:31.694Z
01a0eaff-de99-7ee7-b7df-48c31471e26ab2c3d4e5-f6a7-8901-bcde-f12345678901NULLdecisionupgrade_lot_expiration_checklist_priorityb2c3d4e5-f6a7-8901-bcde-f123456789012026-09-29T02:30:32.362Z
01a0eaff-df5d-7a56-850c-b66b7410ea3fb2c3d4e5-f6a7-8901-bcde-f12345678901NULLdecisionensure_lot_expiration_checklistb2c3d4e5-f6a7-8901-bcde-f123456789012026-09-29T02:30:32.549Z
01a0eb00-2f30-78b1-a147-881747c2cfcdb2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456user_loguser:loginNULL2026-09-29T02:30:53.046Z
01a0eb00-408f-7b44-ba25-29b7bd5e2203b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456user_loguser:loginNULL2026-09-29T02:30:57.460Z
01a0eb00-7149-71b7-89f3-d4c1b5a2e220b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.duplicate_submission_blockfea7b8c9-d0e1-2345-0123-4567890123452026-09-29T02:31:09.658Z
01a0eb00-b54b-7e87-a49c-d40cab34977ab2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.duplicate_submission_blockfea7b8c9-d0e1-2345-0123-4567890123452026-09-29T02:31:27.240Z
01a0eb00-b601-75a5-9e9a-a3b92b5f5a4ba1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionrepresentatives.gate_rep_actiona1b2c3d4-e5f6-7890-abcd-ef12345678902026-09-29T02:31:27.240Z
01a0eb00-b657-77c2-a4d7-bce8a391c1dfa1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionrepresentatives.gate_rep_actiona1b2c3d4-e5f6-7890-abcd-ef12345678902026-09-29T02:31:27.240Z
01a0eb00-b666-7d8b-88fc-99ddd4722fc1a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.inventory_items_decrement01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Z
01a0eb00-b698-74a0-97da-b8ce4138994aa1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.direct_po_import_on_create01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Z
01a0eb00-b6a1-7ce8-a60d-a91b21a9f2cfa1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456billing_orderstatus_change01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Z
01a0eb00-b6ae-709e-a290-74b7737e898da1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbasicErp.deriveSalesOrder01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Z
01a0eb00-b6bc-757d-9608-05aae6ab9fd3a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb00-b6b6-7f70-9fb5-780d94a6b04f2026-09-29T02:31:27.240Z
01a0eb00-b6c5-79fe-98de-1f3f3baa35f5a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb00-b6c3-7c5a-8d6a-cedbd19b38ad2026-09-29T02:31:27.240Z
01a0eb00-b6d2-7bfd-aa73-3730d451d4a8a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb00-b6cc-7b50-915e-c5ba342b0df12026-09-29T02:31:27.240Z
01a0eb00-b6d8-721c-a455-c602332c42d0b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only.link_purchase_order01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:27.240Z
01a0eb00-bd61-7c5e-9df0-bfd978684962a1b2c3d4-e5f6-7890-abcd-ef1234567890NULLdecisionbill_only.notifications.cc_incident_recipients01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:29.378Z
01a0eb00-bf55-7663-b9c1-94eb6ae2874bb2c3d4e5-f6a7-8901-bcde-f12345678901NULLtransactional_emailnew_bill_only01a0eb00-b65f-75e7-a132-d7f3618090992026-09-29T02:31:29.923Z
01a0eb00-d0bb-7fbd-a8ec-e5bbdbe9019bb2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456user_loguser:loginNULL2026-09-29T02:31:34.367Z
01a0eb00-fe54-7fb1-9548-7ae19f5bdaf7b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.duplicate_submission_blockfea7b8c9-d0e1-2345-0123-4567890123452026-09-29T02:31:45.986Z
01a0eb01-3a6c-7045-8f84-e054646bd3a6b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.duplicate_submission_blockfea7b8c9-d0e1-2345-0123-4567890123452026-09-29T02:32:01.379Z
01a0eb01-3a85-78c6-8bcd-4361d8ce448aa1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionrepresentatives.gate_rep_actiona1b2c3d4-e5f6-7890-abcd-ef12345678902026-09-29T02:32:01.379Z
01a0eb01-3a9c-71a7-9484-b249692aca32a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionrepresentatives.gate_rep_actiona1b2c3d4-e5f6-7890-abcd-ef12345678902026-09-29T02:32:01.379Z
01a0eb01-3aa4-78c9-b52d-f4e834e3a9e3a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.inventory_items_decrement01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Z
01a0eb01-3ab3-7113-a1c8-8487f4a4f59ca1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbill_only_order.direct_po_import_on_create01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Z
01a0eb01-3ab6-76f0-82f8-9f6267391293a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456billing_orderstatus_change01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Z
01a0eb01-3ab9-7579-b3fe-bb5e2495ff14a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456decisionbasicErp.deriveSalesOrder01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Z
01a0eb01-3abf-7a0e-9b74-495a69f995e9a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb01-3abe-7ccb-98de-c2355e1b35a32026-09-29T02:32:01.379Z
01a0eb01-3ac4-702f-bbc0-40d066859c33a1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb01-3ac2-7a85-9e81-3237861c1be42026-09-29T02:32:01.379Z
01a0eb01-3ac8-7add-a5e9-481f16cb226da1b2c3d4-e5f6-7890-abcd-ef123456789017b8c9d0-e1f2-3456-1234-567890123456scheduled_taskscheduled_task.scheduled01a0eb01-3ac6-7ebf-b546-f3436391ce6a2026-09-29T02:32:01.379Z
01a0eb01-3acb-7708-ad14-add5d90f615eb2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456decisionbill_only.link_purchase_order01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:01.379Z
01a0eb01-3f51-7a4e-9aa0-f8d7d29fbfbba1b2c3d4-e5f6-7890-abcd-ef1234567890NULLdecisionbill_only.notifications.cc_incident_recipients01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:02.642Z
01a0eb01-413c-7f71-9443-e81a76443f3bb2c3d4e5-f6a7-8901-bcde-f12345678901NULLtransactional_emailnew_bill_only01a0eb01-3aa1-7080-a70b-3e8175be48aa2026-09-29T02:32:03.148Z
01a0eb01-4feb-717a-b0a3-f7f8467970c0b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456user_loguser:loginNULL2026-09-29T02:32:06.898Z
01a0eb01-6cc3-731d-a4b6-3020fee17f66b2c3d4e5-f6a7-8901-bcde-f1234567890117b8c9d0-e1f2-3456-1234-567890123456user_loguser:loginNULL2026-09-29T02:32:14.285Z
01a0eb01-8982-77f1-a1d9-579fbbf7e5dba1b2c3d4-e5f6-7890-abcd-ef1234567890d4e5f6a7-b8c9-0123-def1-234567890123user_loguser:loginNULL2026-09-29T02:32:21.640Z

Returns have created_by_user_id + created_at populated — ✅ PASS

Section titled “Returns have created_by_user_id + created_at populated — ✅ PASS”

Assertion: All pre-seeded returns (and any created during the test) have non-null created_by_user_id and created_at

SELECT r.id, r.return_number, r.status, r.created_by_user_id,
r.created_at, u.email AS created_by_email
FROM returns r
LEFT JOIN users u ON u.id = r.created_by_user_id
WHERE r.return_number = ANY($1)
OR r.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY r.created_at ASC
idreturn_numberstatuscreated_by_user_idcreated_atcreated_by_email
ca000003-0000-4000-8000-000000000003VRI-RET-2025-003submitted17b8c9d0-e1f2-3456-1234-5678901234562026-08-30T02:23:23.225Zblair.bennett@corvetasurgical.com
ca000002-0000-4000-8000-000000000002VRI-RET-2025-002submitted28c9d0e1-f2a3-4567-2345-6789012345672026-09-15T02:23:23.225Zrana.reyes@corvetasurgical.com
ca000001-0000-4000-8000-000000000001VRI-RET-2025-001submitted17b8c9d0-e1f2-3456-1234-5678901234562026-09-26T02:23:23.225Zblair.bennett@corvetasurgical.com

Inventory transactions timestamped at or after their triggering order — ✅ PASS

Section titled “Inventory transactions timestamped at or after their triggering order — ✅ PASS”

Assertion: For every bill-only order in the test window, the earliest inventory_transaction linked to it has created_at >= billing_order.created_at

SELECT bo.order_number,
bo.created_at AS order_created_at,
MIN(it.created_at) AS first_txn_created_at
FROM billing_orders bo
JOIN inventory_transactions it
ON it.source_type = 'bill_only_order'
AND it.source_id = bo.id
WHERE bo.created_by_user_id = $1
AND bo.created_at > NOW() - INTERVAL '30 minutes'
GROUP BY bo.id, bo.order_number, bo.created_at
order_numberorder_created_atfirst_txn_created_at
BO-12026-09-29T02:31:27.240Z2026-09-29T02:31:27.240Z
BO-22026-09-29T02:32:01.379Z2026-09-29T02:32:01.379Z

Multiple distinct users represented across transactions — ✅ PASS

Section titled “Multiple distinct users represented across transactions — ✅ PASS”

Assertion: The combined transaction set (orders, returns, audit events) contains at least two distinct user IDs

SELECT DISTINCT user_id FROM (
SELECT created_by_user_id AS user_id FROM billing_orders
WHERE created_at > NOW() - INTERVAL '30 minutes'
AND created_by_user_id IS NOT NULL
UNION
SELECT created_by_user_id AS user_id FROM returns
WHERE return_number = ANY($1)
UNION
SELECT user_id FROM audit_events
WHERE created_at > NOW() - INTERVAL '30 minutes'
AND user_id IS NOT NULL
) u
ORDER BY user_id
user_id
17b8c9d0-e1f2-3456-1234-567890123456
28c9d0e1-f2a3-4567-2345-678901234567
d4e5f6a7-b8c9-0123-def1-234567890123

Per-declaration outcome of every expectedAuditActions and expectedEmailTemplates entry written into the orchestrator. Missing evidence here is a real test failure, not a soft warning.

Each row asserts that a declared expectedAuditActions entry produced a matching row in audit_events. A ❌ flips overall status to FAIL — the declaration is real proof, not just an annotation.

StepExpected Audit ActionFound
Step 1: Logged in as Blair Bennettuser_log:user:login✅
Step 2: First orderdecision:bill_only_order.inventory_items_decrement✅
Step 2: First orderbilling_order:status_change✅
Step 3: Second orderdecision:bill_only_order.inventory_items_decrement✅
Step 3: Second orderbilling_order:status_change✅
Step 6: Cross-user billing viewuser_log:user:login✅

Each row asserts that a declared expectedEmailTemplates entry was matched (case-insensitive substring) by a captured email subject or template. A ❌ flips overall status to FAIL.

StepExpected TemplateFound
Step 2: First orderNew Bill-Only Order✅
Step 3: Second orderNew Bill-Only Order✅

Every row written to audit_events while this test was running (scoped to the demo organizations). Provides compliance evidence that user actions are traced end-to-end (URS-003).

Capture window start: 2026-09-29T02:30:46.444Z

SELECT
ae.created_at,
ae.event_type,
ae.action,
ae.user_id,
u.email AS user_email,
ae.organization_id,
o.name AS organization_name,
ae.object_id,
ae.secondary_object_id,
ae.payload,
ae.route,
ae.trace_id
FROM audit_events ae
LEFT JOIN users u ON u.id = ae.user_id
LEFT JOIN organizations o ON o.id = ae.organization_id
WHERE ae.created_at >= $1
AND ae.organization_id = ANY($2::uuid[])
ORDER BY ae.created_at ASC

34 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-09-29 02:30:53Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group——
2026-09-29 02:30:57Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group——
2026-09-29 02:31:09Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupfea7b8c9-d0e1-2345-0123-456789012345nono_same_day_candidates
2026-09-29 02:31:27Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupfea7b8c9-d0e1-2345-0123-456789012345nono_same_day_candidates
2026-09-29 02:31:27Zdecisionbill_only.link_purchase_orderblair.bennett@corvetasurgical.comCorveta Surgical Group01a0eb00-b65f-75e7-a132-d7f361809099nono_purchase_order_selected
2026-09-29 02:31:27ZdecisionbasicErp.deriveSalesOrderblair.bennett@corvetasurgical.comVantis01a0eb00-b65f-75e7-a132-d7f361809099noflag_disabled
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb00-b6c3-7c5a-8d6a-cedbd19b38ad—
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb00-b6cc-7b50-915e-c5ba342b0df1—
2026-09-29 02:31:27Zdecisionbill_only_order.inventory_items_decrementblair.bennett@corvetasurgical.comVantis01a0eb00-b65f-75e7-a132-d7f361809099yesinventory_items_decremented
2026-09-29 02:31:27Zdecisionbill_only_order.direct_po_import_on_createblair.bennett@corvetasurgical.comVantis01a0eb00-b65f-75e7-a132-d7f361809099noNo uploaded PO documents
2026-09-29 02:31:27Zbilling_orderstatus_changeblair.bennett@corvetasurgical.comVantis01a0eb00-b65f-75e7-a132-d7f361809099—
2026-09-29 02:31:27Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb00-b6b6-7f70-9fb5-780d94a6b04f—
2026-09-29 02:31:27Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisa1b2c3d4-e5f6-7890-abcd-ef1234567890nono_blocking_relationship
2026-09-29 02:31:27Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisa1b2c3d4-e5f6-7890-abcd-ef1234567890nono_blocking_relationship
2026-09-29 02:31:29Zdecisionbill_only.notifications.cc_incident_recipients—Vantis01a0eb00-b65f-75e7-a132-d7f361809099noorder has no no-charge item with an incident reason
2026-09-29 02:31:29Ztransactional_emailnew_bill_only—Corveta Surgical Group01a0eb00-b65f-75e7-a132-d7f361809099—
2026-09-29 02:31:34Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group——
2026-09-29 02:31:45Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupfea7b8c9-d0e1-2345-0123-456789012345noall_candidates_vetoed
2026-09-29 02:32:01Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb01-3ac2-7a85-9e81-3237861c1be4—
2026-09-29 02:32:01Zdecisionbill_only_order.duplicate_submission_blockblair.bennett@corvetasurgical.comCorveta Surgical Groupfea7b8c9-d0e1-2345-0123-456789012345noall_candidates_vetoed
2026-09-29 02:32:01Zdecisionbill_only.link_purchase_orderblair.bennett@corvetasurgical.comCorveta Surgical Group01a0eb01-3aa1-7080-a70b-3e8175be48aanono_purchase_order_selected
2026-09-29 02:32:01Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisa1b2c3d4-e5f6-7890-abcd-ef1234567890nono_blocking_relationship
2026-09-29 02:32:01Zdecisionrepresentatives.gate_rep_actionblair.bennett@corvetasurgical.comVantisa1b2c3d4-e5f6-7890-abcd-ef1234567890nono_blocking_relationship
2026-09-29 02:32:01Zdecisionbill_only_order.inventory_items_decrementblair.bennett@corvetasurgical.comVantis01a0eb01-3aa1-7080-a70b-3e8175be48aayesinventory_items_decremented
2026-09-29 02:32:01Zdecisionbill_only_order.direct_po_import_on_createblair.bennett@corvetasurgical.comVantis01a0eb01-3aa1-7080-a70b-3e8175be48aanoNo uploaded PO documents
2026-09-29 02:32:01Zbilling_orderstatus_changeblair.bennett@corvetasurgical.comVantis01a0eb01-3aa1-7080-a70b-3e8175be48aa—
2026-09-29 02:32:01ZdecisionbasicErp.deriveSalesOrderblair.bennett@corvetasurgical.comVantis01a0eb01-3aa1-7080-a70b-3e8175be48aanoflag_disabled
2026-09-29 02:32:01Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb01-3abe-7ccb-98de-c2355e1b35a3—
2026-09-29 02:32:01Zscheduled_taskscheduled_task.scheduledblair.bennett@corvetasurgical.comVantis01a0eb01-3ac6-7ebf-b546-f3436391ce6a—
2026-09-29 02:32:02Zdecisionbill_only.notifications.cc_incident_recipients—Vantis01a0eb01-3aa1-7080-a70b-3e8175be48aanoorder has no no-charge item with an incident reason
2026-09-29 02:32:03Ztransactional_emailnew_bill_only—Corveta Surgical Group01a0eb01-3aa1-7080-a70b-3e8175be48aa—
2026-09-29 02:32:06Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group——
2026-09-29 02:32:14Zuser_loguser:loginblair.bennett@corvetasurgical.comCorveta Surgical Group——
2026-09-29 02:32:21Zuser_loguser:loginmark.manufacturer@vantismedical.comVantis——

2 notification email(s) were captured during this test run. Each email is rendered as a screenshot for compliance review.

1. New Bill-Only Order - 9/29/2026 - Vantis BO-1

Section titled “1. New Bill-Only Order - 9/29/2026 - Vantis BO-1”

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-1

New Bill-Only Order - 9/29/2026 - Vantis BO-1

2. New Bill-Only Order - 9/29/2026 - Vantis BO-2

Section titled “2. New Bill-Only Order - 9/29/2026 - Vantis BO-2”

Template: New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-2

New Bill-Only Order - 9/29/2026 - Vantis BO-2