Skip to content

URS-050 · Select Another Rep's Trunk Stock for Bill-Only Orders

Title: Select Another Rep’s Trunk Stock for Bill-Only Orders Date: 2026-04-23T03:43:21.310Z Duration: 71.6s Overall Status: ✅ PASS

The system shall support the use of trunk stock within the same sales agency when submitting bill‑only orders.

Source: User_Requirement_Specifications_ZuriMED_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: Login and own trunk — ✅ PASS

Section titled “1. Step 1: Login and own trunk — ✅ PASS”

What this step proves:

A sales rep logs in and navigates to their trunk stock. This establishes the baseline inventory context and confirms that a rep can view their own trunk before attempting to use another rep’s trunk.

Screenshots:

step 01 logged in

step 01 own trunk inventory

Video recording:


2. Step 2: Bill-only form start — ✅ PASS

Section titled “2. Step 2: Bill-only form start — ✅ PASS”

What this step proves:

The sales rep begins a new bill-only order by selecting the manufacturer and a sales account. This step navigates through the first two stages of the bill-only form to reach the inventory source selection screen.

Screenshots:

step 02 bill only form

step 02 account selected

step 02 devices step

Video recording:


3. Step 3: Other rep trunk selection — ✅ PASS

Section titled “3. Step 3: Other rep trunk selection — ✅ PASS”

What this step proves:

The rep selects “Other Rep Trunk” as the inventory source and chooses a specific colleague’s trunk from the dropdown. The order is completed and submitted, demonstrating that the system correctly allows a rep to draw from another rep’s trunk stock when creating a bill-only order.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-04-23T03:43:59.897Z → 2026-04-23T03:44:23.150Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:44:18Zdecisionbill_only_order.enqueue_upload_classificationbob.kauffman@stellartech.comZuriMEDno
2026-04-23 03:44:19Ztransactional_emailnew_bill_onlyStellarTech Medical Solutions

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 - 4/22/2026 - ZuriMED BO-1

Template: New_Bill-Only_Order_-_4_22_2026_-_ZuriMED_BO-1

New Bill-Only Order - 4/22/2026 - ZuriMED BO-1

Screenshots:

step 03 other button clicked

step 03 rep trunk dropdown

step 03 ryan trunk selected

step 03 product from ryan

step 03 review other rep source

step 03 order submitted

Video recording:


4. Step 4: Database verification — ✅ PASS

Section titled “4. Step 4: Database verification — ✅ PASS”

What this step proves:

The billing list is opened to confirm the submitted order appears. This step provides screenshot evidence that the bill-only order is visible in the system after submission using another rep’s trunk.

Screenshots:

step 04 billing list

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 order created by Bob — ✅ PASS

Section titled “Bill-only order created by Bob — ✅ PASS”

Assertion: At least one billing order should have been created by Bob Kauffman in the last 30 minutes

SELECT bo.id, bo.order_number, bo.status, bo.sales_account_id,
bo.created_at, bo.created_by_user_id
FROM billing_orders bo
WHERE bo.created_by_user_id = $1
AND bo.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY bo.created_at DESC
LIMIT 5
idorder_numberstatussales_account_idcreated_atcreated_by_user_id
019db870-44f4-7496-a32e-e56d5f34dad2BO-1submittedfea7b8c9-d0e1-2345-0123-4567890123452026-04-23T03:44:18.654Z17b8c9d0-e1f2-3456-1234-567890123456

Order items reference other rep’s trunk — ✅ PASS

Section titled “Order items reference other rep’s trunk — ✅ PASS”

Assertion: At least one billing order item should have location_id = b7f8a9b0-c1d2-3456-1234-567890123456 (Ryan’s TRUNK-26)

SELECT boi.id, boi.billing_order_id, boi.location_id,
boi.lot_number, boi.product_id, op.title as product_name,
rwl.name as location_name, rwl.type as location_type
FROM billing_order_items boi
JOIN billing_orders bo ON boi.billing_order_id = bo.id
LEFT JOIN org_products op ON boi.product_id = op.id
LEFT JOIN real_world_locations rwl ON boi.location_id = rwl.id
WHERE bo.created_by_user_id = $1
AND bo.created_at > NOW() - INTERVAL '30 minutes'
ORDER BY bo.created_at DESC
LIMIT 10
idbilling_order_idlocation_idlot_numberproduct_idproduct_namelocation_namelocation_type
019db870-44f2-7c67-ade0-33faa1e7b3d4019db870-44f4-7496-a32e-e56d5f34dad2b7f8a9b0-c1d2-3456-1234-567890123456URS050-SP-00101989ca1-f2f8-7ab7-8269-7179342797ccFiberLocker® Instrument SNTRUNK-26trunk_stock

Assertion: Billing order item should have lot_number = URS050-SP-001

SELECT boi.lot_number, boi.location_id, rwl.name as location_name
FROM billing_order_items boi
JOIN billing_orders bo ON boi.billing_order_id = bo.id
LEFT JOIN real_world_locations rwl ON boi.location_id = rwl.id
WHERE bo.created_by_user_id = $1
AND bo.created_at > NOW() - INTERVAL '30 minutes'
AND boi.lot_number = $2
LIMIT 5
lot_numberlocation_idlocation_name
URS050-SP-001b7f8a9b0-c1d2-3456-1234-567890123456TRUNK-26

Order linked to correct sales account — ✅ PASS

Section titled “Order linked to correct sales account — ✅ PASS”

Assertion: The billing order should be linked to BOSS Surgical Account

SELECT bo.id, bo.sales_account_id, sa.name as account_name
FROM billing_orders bo
JOIN sales_accounts sa ON bo.sales_account_id = sa.id
WHERE bo.created_by_user_id = $1
AND bo.created_at > NOW() - INTERVAL '30 minutes'
AND bo.sales_account_id = $2
ORDER BY bo.created_at DESC
LIMIT 5
idsales_account_idaccount_name
019db870-44f4-7496-a32e-e56d5f34dad2fea7b8c9-d0e1-2345-0123-456789012345BOSS Surgical Account Request

Inventory history records removal from other rep’s trunk — ✅ PASS

Section titled “Inventory history records removal from other rep’s trunk — ✅ PASS”

Assertion: Inventory history should show a removal with reason=bill_only_order from TRUNK-26 (Ryan)

SELECT ih.id, ih.item_id, ih.quantity, ih.status, ih.info,
ih.created_at, ii.lot, ii.real_world_location_id, rwl.name as location_name
FROM inventory_history ih
JOIN inventory_items ii ON ih.item_id = ii.id
LEFT JOIN real_world_locations rwl ON ii.real_world_location_id = rwl.id
WHERE ii.lot = $1
AND ii.organization_id = $2
AND ih.created_at > NOW() - INTERVAL '30 minutes'
AND ih.info->>'action' = 'removed'
AND ih.info->>'reason' = 'bill_only_order'
ORDER BY ih.created_at DESC
LIMIT 10
iditem_idquantitystatusinfocreated_atlotreal_world_location_idlocation_name
019db870-44fb-7db8-9438-86f6fc04fa09019db870-44fb-7db8-9438-86f55bc9d50b1ready{"action":"removed","reason":"bill_only_order","bestEffort":true,"billingOrderId":"019db870-44f4-7496-a32e-e56d5f34dad2","shortageQuantity":1,"requestedQuantity":1}2026-04-23T03:44:18.654ZURS050-SP-001b7f8a9b0-c1d2-3456-1234-567890123456TRUNK-26

Bob’s own trunk was NOT decremented — ✅ PASS

Section titled “Bob’s own trunk was NOT decremented — ✅ PASS”

Assertion: Bob’s trunk (TRUNK-36) should not have any bill_only_order removals for the test lot

SELECT ih.id, ih.item_id, ih.info, ih.created_at, ii.lot
FROM inventory_history ih
JOIN inventory_items ii ON ih.item_id = ii.id
WHERE ii.lot = $1
AND ii.organization_id = $2
AND ih.created_at > NOW() - INTERVAL '30 minutes'
AND ih.info->>'action' = 'removed'
AND ih.info->>'reason' = 'bill_only_order'
LIMIT 5

No rows returned

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 3: Other rep trunk selectiondecision:bill_only_order.enqueue_upload_classification

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 3: Other rep trunk selectionNew 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-04-23T03:43:19.403Z

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

6 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:43:23Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:32Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:47Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:44:18Zdecisionbill_only_order.enqueue_upload_classificationbob.kauffman@stellartech.comZuriMED019db870-44f4-7496-a32e-e56d5f34dad2noNo uploaded PO documents
2026-04-23 03:44:19Ztransactional_emailnew_bill_onlyStellarTech Medical Solutions019db870-44f4-7496-a32e-e56d5f34dad2
2026-04-23 03:44:24Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions

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

1. New Bill-Only Order - 4/22/2026 - ZuriMED BO-1

Section titled “1. New Bill-Only Order - 4/22/2026 - ZuriMED BO-1”

Template: New_Bill-Only_Order_-_4_22_2026_-_ZuriMED_BO-1

New Bill-Only Order - 4/22/2026 - ZuriMED BO-1