Merchant Portal — Invoice Use Cases
A. Document controlA. Kiểm soát tài liệu
| Doc ID | CPG-UC-CPG-MP_UC_Invoice |
|---|---|
| VersionPhiên bản | 1.0 |
| StatusTrạng thái | Draft |
| Owner | CPG BA / Architecture |
| AudienceĐối tượng | BA, QA, Product, Frontend, Backend |
| ClassificationPhân loại | Internal |
| Effective dateNgày hiệu lực | 01/12/2026 |
| Related docs | MP Invoice TC · MP Invoice FSD |
B. Version historyB. Lịch sử phiên bản
| Version | Date | Author | ChangesThay đổi |
|---|---|---|---|
| 1.0 | 01/12/2026 | Khoa Trinh | Version 1.0 |
C. Table of contentsC. Mục lục
D. ContentD. Nội dung
Catalog
| UC ID | Name | Linked TC count | Categories |
|---|---|---|---|
| UC-INV-01 | Invoices landing shows breadcrumb and title | 5 | Function |
| UC-INV-02 | Filter invoices by Invoice Id | 8 | Function |
| UC-INV-03 | Create invoice succeeds for USDT | 7 | Function, Validation |
| UC-INV-04 | Open invoice detail from Invoice Id | 5 | Function, Security |
| UC-INV-05 | Export invoices as CSV | 3 | Function |
| UC-INV-06 | View-only user cannot create or export | 2 | Security |
Use cases
UC-INV-01 — Invoices landing shows breadcrumb and title
- Actor: Merchant Portal user (role per RBAC)
- Goal: Invoices landing shows breadcrumb and title
- Primary BR (from TC): BR-MP-INV-01
Linked test cases
TC-MP-INV-001— Invoices landing shows breadcrumb and title (Function)TC-MP-INV-002— Manage user sees Create and Export actions (Function)TC-MP-INV-003— Invoice table shows expected columns (Function)TC-MP-INV-004— Pagination defaults to 10 rows per page (Function)TC-MP-INV-005— Empty filter result shows no invoices message (Function)
Representative preconditions
User with invoice:view and invoice:manage is logged in.
Representative main flow
Open /invoices.
Expected outcome
Breadcrumb Home / Invoices and heading Invoices are visible.
UC-INV-02 — Filter invoices by Invoice Id
- Actor: Merchant Portal user (role per RBAC)
- Goal: Filter invoices by Invoice Id
- Primary BR (from TC): BR-MP-INV-02
Linked test cases
TC-MP-INV-006— Filter invoices by Invoice Id (Function)TC-MP-INV-007— Filter invoices by Order Id (Function)TC-MP-INV-008— Filter invoices by Customer Email (Function)TC-MP-INV-009— Filter invoices by Product Code (Function)TC-MP-INV-010— Filter invoices by Status Pending (Function)TC-MP-INV-011— Filter invoices by Network TRON (Function)TC-MP-INV-012— Filter invoices by amount range (Function)TC-MP-INV-013— Search with unchanged filters still refreshes list (Function)
Representative preconditions
jane@example.com exists.
Representative main flow
Enter email. Search.
Expected outcome
Only invoices for jane@example.com are listed.
UC-INV-03 — Create invoice succeeds for USDT
- Actor: Merchant Portal user (role per RBAC)
- Goal: Create invoice succeeds for USDT
- Primary BR (from TC): BR-MP-INV-03
Linked test cases
TC-MP-INV-014— Create invoice succeeds for USDT (Function)TC-MP-INV-015— Create invoice discount reduces total (Function)TC-MP-INV-016— Create invoice rejects negative discount (Validation)TC-MP-INV-017— Create invoice rejects discount above subtotal plus tax (Validation)TC-MP-INV-018— Create invoice requires future expiry (Validation)TC-MP-INV-019— Create invoice requires product id and name (Validation)TC-MP-INV-020— Create invoice refresh shows new code on page 1 (Function)
Representative preconditions
invoiceAdmin.
Representative main flow
Create invoice successfully.
Expected outcome
List returns to page 1 and includes the new invoice code from toast.
UC-INV-04 — Open invoice detail from Invoice Id
- Actor: Merchant Portal user (role per RBAC)
- Goal: Open invoice detail from Invoice Id
- Primary BR (from TC): BR-MP-INV-04
Linked test cases
TC-MP-INV-021— Open invoice detail from Invoice Id (Function)TC-MP-INV-022— Detail shows subtotal tax discount and total (Function)TC-MP-INV-023— Close invoice detail dialog (Function)TC-MP-INV-024— Download invoice PDF for manage user (Function)TC-MP-INV-025— View-only user cannot download PDF (Security)
Representative preconditions
Detail dialog open.
Representative main flow
Click Close.
Expected outcome
Dialog closes.
UC-INV-05 — Export invoices as CSV
- Actor: Merchant Portal user (role per RBAC)
- Goal: Export invoices as CSV
- Primary BR (from TC): BR-MP-INV-05
Linked test cases
TC-MP-INV-026— Export invoices as CSV (Function)TC-MP-INV-027— Export invoices as Excel (Function)TC-MP-INV-028— Export invoices as PDF (Function)
Representative preconditions
invoiceAdmin. Filters applied or default.
Representative main flow
Click Export CSV.
Expected outcome
CSV download starts. Toast Export ready.
UC-INV-06 — View-only user cannot create or export
- Actor: Merchant Portal user (role per RBAC)
- Goal: View-only user cannot create or export
- Primary BR (from TC): BR-MP-INV-06
Linked test cases
TC-MP-INV-029— View-only user cannot create or export (Security)TC-MP-INV-030— Manage user can create and export (Security)
Representative preconditions
invoiceViewer logged in.
Representative main flow
Open /invoices.
Expected outcome
Create Invoice and Export CSV/Excel/PDF buttons are hidden.