https://chatgpt.com/s/t_6ace1783d0d48191bc7acef8021993cc
# Manual test flow – one order from request to payment

Use the company admin, the new customer and the new carrier (both created from the registration link).
**"Known" = already in my reports, you will probably meet it – tell me only if it behaves differently.**
The fixes from today are not on live yet, so the isolation leaks (steps 2 and 8) will still show on live.

## 0. Set-up (company admin) – do once
1. Master: add **Equipment**, **Mode of Transport**, **Unit**, **Expense Category**, **Bank** (needed later for payments). *Known: nothing tells a new company it needs these (C1/K1/E2/I5).*
2. Master → **Currency** → set the rate for your currency and press **Update** (otherwise paying an expense crashes). *Known: E1.*
3. HRM → **Role** → create a role (e.g. "Sales", My Data) → HRM → **Add User** with it. *Known: Add User fails on live until `routes/web.php` is uploaded (H1).*

## 1. Registration results (admin)
- Customer List / Carrier List: do the two new people appear, with the right email and phone?
- Register the **same email again** as the same type → must be refused; as the other type (customer ↔ carrier ↔ user) → must work.
- Carrier: open **Edit** → documents must stay, not be asked again. *(fixed, upload pending)*

## 2. First look as the NEW customer and NEW carrier (isolation)
- Log in as each. The dashboard and every list must be **empty** – nothing from other companies.
- Customer: try **Settings** – you should not be able to change *credit limit / credit status* (known: you can – CP1). Carrier: **Settings** – *Approved / Rating* must not be editable (known: CA2).
- Carrier → **Delivered Orders** and **Load Board** must show nothing foreign (known leak, fixed locally).

## 3. Request (customer)
- Customer → **Make Request (RFQ)** → fill, save. Check it appears in the customer's own RFQ list *(works - confirmed on live, CP4 withdrawn)*.
- Customer → **Create Order** request → appears as Pending.

## 4. Quote (admin)
- Admin → **RFQ List** → open the request → create / edit the **Quotation** → set **Approved**.
- Check the PDF and "Send Email" window. *Known: Customer Name list shows numbers (Q1).*

## 5. Load board (admin ↔ carrier)
- Admin: Approved quotation → **Send to Load Board** → set **Bid Limit** → **Publish** (days).
- Carrier: Load Board → the load must appear → **Add Quote** (try empty, too high, valid, a second time).
- Admin: Carrier Bids → View Bids → approve the bid (the red "Pending" label is the button – L3). Check **Approved Bids**.

## 6. Order and dispatch (admin)
- Create the order (from the quotation, or **Create Order**) → **Dispatch** it to the carrier: carrier, equipment, rate, truck / trailer unit.
- Carrier: **Pending / Running Orders** must show it. *Known: Pending Orders crashes (CA3).*
- Carrier: add a **Driver** and a **Truck** (try an empty driver form – known: saves blank, CA4). Admin: assign the driver.
- Admin: **Tracing → Update Tracing** (try empty save – known: closes silently, O3) → Pickup → In Route → **Delivered + POD (use a real PDF)**.
- Check: Order PDF, Rate Confirmation, BOL, Delivered list (carrier name shows N/A – O7).

## 7. Money
- Admin → Invoice → Customer Invoice → **Review & Send Invoice** (email fails on live – I3). Use the tick-box + **Send Invoice** to move it to Receivable *(row menu "Send Invoice" does nothing – I2)*.
- **Receive Payment**: a part payment, then the rest. Try an amount **bigger than the invoice** *(known: accepted, I1 – High)*.
- Carrier Invoice → **Receive Invoice** → **Make Payment**. Check Paid lists, Deposite Slip, Receivable / Payable Age.
- Expenses: add category → expense → vendor expense → **Payment**. Try a **negative amount** and a **duplicate invoice no.** *(known: accepted – E3/E4)*.

## 8. Staff on "My Data" (isolation)
- Admin: assign the new customer to the staff user (CRM → Assign). Log in as the staff user.
- He must see **only** that customer's leads, quotes, orders, invoices – check the **dashboard, every filter drop-down, grouped payments, Closed Bids**. Admin-created orders for that customer must appear for him.
- Role page: Users / Carriers / Expenses should have My Data / All Data (needs the upload).

## 9. Reports (admin)
- Compare the numbers with what you entered: **Profit & Loss**, **Accounts Receivable / Payable**, **All Revenue** are correct. Watch **Profitability** (profit amount wrong – R1), **Carrier Dispatch** (invoice price wrong – R2), **Order report** (counts the cancelled order – R3).

## 10. Cancel / repeat
- Order List → **Cancel** (works). Pending Orders page → Cancel (known: does nothing – O1). **Repeat Order** works.

For each problem please send: **page, what you did, what you expected, what happened** (a screenshot helps). I will tell you if it is already known.
