﻿# 13 â€“ Customer portal

Tested live as the QA customer (qa.customer.crm@example.com) and, for the other half of each flow, as the company admin Â· Pages: Dashboard, Quotations, Load Requests, Orders (All / Pending / Paid / Delivered), Invoices (Not paid / Paid), Invoice Report, Order Report, Settings, Agreement, Profile, RFQ and Order-RFQ (list + create + approve)

## Works fine

- All 20 pages open; the customer sees **only their own orders and invoices** (ORDER-001, -002), and other companies' order / invoice PDFs by id give "not found".
- Order PDF, Invoice PDF, order *View* panel (no carrier price or profit shown to the customer) and *Tracing History* work.
- **Order request, full round trip works:** customer "Create Order" â†’ company's *Order RFQ List* â†’ admin **Update Order** with the price (1,200) â†’ customer sees "Approved â€¦ INR 1200" and approves it â†’ the order **ORDER-003** appears in the admin's *Order List* and *Pending Orders*.
- **Profile:** password mismatch / too short are refused with a clear message.

## Issues

| # | Sev | What the user experiences | Steps | Evidence |
|---|-----|---------------------------|-------|----------|
| CP1 | ~~High~~ **Fixed locally 13 Oct 2026 (needs upload)** | **A customer can change their own credit limit** (and the credit status, payment terms and mode shown beside it): I raised the limit from 100,000 to 999,999 and it was saved ("Settings updated successfully!"). These should be company-only. | Customer â†’ General Setting â†’ change Limit â†’ Update Settings | `screens/cp_customer_General_Setting2.png` |
| CP2 | Medium - **list part fixed locally 13 Oct 2026 (fixed types + the company's own types); the first-save "required" message is unchanged** | **"Customer Type" is empty on the customer's own settings, so the first save is refused** ("The customer type field is required."); the list offered (Manufacturer, Trader â€¦) is not the company's own Customer Type master (Shipper). | Customer â†’ General Setting â†’ Update | â€“ |
| CP5 | Low (re-assessed 12 Oct 2026 - mostly by design) | Order status and payment status are separate columns, so one order can read "Delivered" and "Paid" at once. The only real oddity is naming: the **"Pending Orders" page lists every order that has been dispatched** (any status, even delivered or paid), not only pending ones. No screenshot was taken for this one. | Customer â†’ Orders vs Pending Orders | â€“ |
| CP7 | Low | Company and Customer name drop-downs on the RFQ / Order-request forms show **blank labels** (value 1536). | Customer â†’ Make Request | â€“ |
| CP8 | Low | **Slow pages:** RFQ and order-request forms take 8â€“9 s, other pages 4â€“5 s. | â€“ | â€“ |
| CP9 | Low | Dashboard "Performance Analysis â€“ Accuracy 99.99%" looks like fixed text; "Total Orders 2" includes the cancelled order. | Customer â†’ Dashboard | `screens/cp_customer_dashboard.png` |
| CP10 | Low | Script errors on most portal pages. | Open pages, console | â€“ |
| CP12 | Medium | **The customer's request is not tied to the customer:** the form stores the login number (1536) instead of the customer record (the company-side effect is listed under CO2 below). Same for the Order request form. | Customer â†’ Make Request â†’ company RFQ List | `screens/cp_after_rfq.png` |
| CP13 | Low | After the customer approves an order price there is no message (only the status changes to Approved). **Agreement** page just says "Company Agreement Not Available". | Customer â†’ Order RFQ â†’ Approve | â€“ |

## Company-side issues found while testing the customer flow

These are NOT customer-portal pages; they are the company admin screens used for the other half of the customer flow.

| # | Sev | What the user experiences | Steps | Evidence |
|---|-----|---------------------------|-------|----------|
| CO1 | ~~High~~ **Fixed locally 12 Oct 2026 (needs upload)** | **A customer's quote request (RFQ) cannot be turned into a quote:** the company's *RFQ List â†’ Update Quote* page crashes ("Undefined variable $loadOrder"). Because of this a quote request cannot be completed. | Customer â†’ Make Request â†’ company â†’ RFQ List â†’ Update Quote | `screens/rfq_edit_page.png` |
| CO2 | **Probably not an issue - please check on live** | The company's RFQ List shows the customer as "N/A" (or just "Customer") because the request is saved with the login number instead of the customer record (see CP12). | Customer â†’ Make Request â†’ company â†’ RFQ List | â€“ |

## Not part of the real customer panel (hidden pages / withdrawn - kept for the record)

These were noted during testing but a customer cannot see them (hidden menu items, URL-only pages) or they turned out to work. They are NOT customer-panel issues.

| # | Status | What was noted | Steps | Evidence |
|---|--------|----------------|-------|----------|
| CP3 | ~~Medium~~ Not a visible issue | ~~Load Request and Assigned Load Request pages show made-up sample rows~~ - **the "Load Request" menu item is hidden in the customer sidebar (`hidden` in customerP/includes/sidebar.blade.php), so customers cannot reach these pages from the menu; only by typing the URL. Sample rows exist only in those unused pages.** | (URL only) /customer/loadR_list | `screens/cp_customer_loadR_list.png` |
| CP4 | ~~Medium~~ Not reproducible | ~~After "RFQ created successfully!" the RFQ list stays empty~~ - **your live test (12 Oct 2026): RFQ #397 shows in Customer â†’ RFQ List, so this works.** | Customer â†’ Make Request â†’ RFQ list | `screens/cp_after_rfq.png` |
| CP6 | ~~Medium~~ Not a visible issue (12 Oct 2026) | ~~Cancelled order offers View Invoice, Send Invoice and Review~~ - **in the page code the "View Invoice", "Send Invoice" and "Review" menu items are all hidden (`<li hidden>`), so the customer cannot see or click them.** Only the normal "Invoice" item shows, and only when the order has an invoice. | Customer â†’ Orders â†’ Action | `screens/cp_review.png` |

## Not tested (and why)

- Customer confirmation upload, Send Invoice from the customer side (email does not work on live), picture upload on Profile, customer-side notifications, approving a normal quotation (blocked by CO1).
- The **Carrier portal** is in its own report (14).

## Test data added

- Two quote requests (#396, #397, stuck â€“ see CO1) and order **ORDER-003** (Pending, INR 1,200, approved by the customer); customer type of "QA Customer One" is now *Manufacturer* (changed by the settings save); credit limit restored to 100,000.
