# 11 – Reports (all 19 reports)

Tested in the QA company (company admin), date range 2025–2026 · Checked every report's numbers against the real records (ORDER-001 delivered and fully paid – customer 1,000 / carrier 700; ORDER-002 cancelled; expenses 4,760; no staff users yet)

## Works fine

- **All 19 reports open** (9 PDF reports from the Report page + 10 on-screen reports), without an error page. **Export Excel and Export PDF work** on all 9 on-screen reports.
- These **agree with the real data**: *Profit & Loss* (revenue 1,000, carrier cost 700, gross profit 300 = 30%, expenses 4,760), *Company Performance*, *All Revenue* (1,000 collected, nothing pending), *Accounts Receivable* and *Accounts Payable* (nothing outstanding), *Invoice* report (1 invoice, 1,000, paid), *Expense* report (4 expenses, 4,760), *Tax*, *Commission*, *Claims & Disputes* and *Cheque Payment* (empty, correct for this company).

## Issues

| # | Sev | What the user experiences | Steps | Evidence |
|---|-----|---------------------------|-------|----------|
| R1 | **High** | **The "Profitability" report shows wrong profit.** ORDER-001 (order 1,000, carrier 700) shows profit **1,000.00** with 30% (should be 300). The top box "Order Amount" shows **0** although orders total 2,000, and the **cancelled** ORDER-002 is listed as 100% profit. The newer *Profit & Loss* report shows the right 300. | Report → Profitability Report | `screens/rep_Profitability.png` |
| R2 | Medium | **Carrier Dispatch report: wrong invoice price, empty paid amount.** ORDER-001 shows *Invoice Price* **1,700** (the carrier invoice is 700) and *Paid Amount* blank, although it is Paid. | Report → Carrier Dispatch Report | `screens/rep_CarrierDispatch.png` |
| R3 | Medium | **Order report counts a cancelled order** in "Total Orders 2,000" (and shows its payment as *Pending*), and the *Delivered Orders* box says **0** although ORDER-001 was delivered (it shows only as Paid). | Report → Order Report | `screens/rep_Order.png` |
| R4 | Low | **Bad Debt report contradicts itself:** 0 overdue invoices but "Oldest overdue (days): 1". | Report → Bad Debt Report | `screens/rep_BadDebt.png` |
| R5 | Low | **Expense report treats the −50 expense as Paid**, so *Total Paid 4,800* is more than *Total Expenses 4,760* (follows from the negative amount, E4 in the Expenses report). | Report → Expense Report | `screens/rep_Expense.png` |
| R6 | Low | **Quotation report** lists the two Post Shipments (#394, #395) under the heading "Order List" together with the quotation, and shows customer numbers, not names. | Report → Quotation Report | `screens/rep_Quotation.png` |
| R7 | Low | **Slow:** Profitability report takes about 17 seconds, Order and Carrier Dispatch about 7–8 seconds, even with 2 orders. | Open them | – |
| R8 | Low | Every on-screen report page logs a script error (`Cannot read properties of null`). | Open `/reports/...`, look at the console | – |

## Not tested (and why)

- Filters and column pickers, month/year switches, Quick Pay report with Quick-Pay orders, Employee Performance with real staff data, Cheque and Claims reports with data, My Data / All Data limits for staff.
- **Financial Year** – creating and closing a year freezes a snapshot (not undone easily), so only the page was checked.
- Excel file contents and PDF layout details.

## Test data

No data was added or changed in this module.
