DSH-07 — Back-office finance pages (V1)
Invoices, payments and declaration verification, credit accounts, finance dashboard.
| Field | Details |
|---|---|
| Task code | DSH-07 |
| Phase | P1 — V1 build & integration |
| Product scope | V1 |
| Status | Planned |
| Start | Sun 22 Nov 2026 |
| Due | Sun 22 Nov 2026 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 0.5 person-day(s) planned · 2 from scratch · size XS |
| Area · app | Back-office · dashboard |
| Depends on | DSH-01, SRV-18 |
| Unblocks | — |
| Milestones | — |
Summary
Invoices, payments and declaration verification, credit accounts, finance dashboard.
Description
Finance staff manage invoices, payments, declarations and credit from these pages (cahier §4.7; FIN-01, FIN-03…FIN-05, ACL-04), on top of SRV-18. It delivers the finance dashboard (BO-08), invoices list and detail with allocations, credit notes and PDF (BO-44), payments and declarations with the verification queue and proof viewer, payment recording and allocation (BO-45), and credit accounts with ceilings and history (BO-46). The pages and every finance figure elsewhere are visible only to users with finance permissions (ACL-04). Out of scope: overdue reminders and accounting exports (V2, DSH-20).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | BO-08 finance dashboard: unpaid and overdue totals, payments to verify, collections by PaymentMethod, credit used vs ceilings | Anis |
| 2 | BO-44 invoices list: FAC number, date, reseller, order, total TTC, paid, balance, InvoiceStatus pill; filters status, period, wilaya, reseller; export | Anis |
| 3 | Invoice detail: lines, allocations, credit notes, PDF, « Annuler » with reason (finance.administer) | Anis |
| 4 | BO-45 « Paiements à vérifier » queue with proof viewer (image/PDF via signed URL), « Confirmer » / « Rejeter » with PAYMENT_REJECT_REASON | Anis |
| 5 | Record-payment form (method, amount, reference, date, reseller) and allocation editor (auto oldest-first, manual split) | Anis |
| 6 | BO-46 credit accounts: ceiling, exposure, available, history of limit changes; edit ceiling with reason | Anis |
| 7 | Finance gating: navigation, columns and widgets hidden without finance.view | Anis |
Deliverables
- apps/dashboard/src/app/[locale]/(app)/finance/{page.tsx,invoices/…,payments/…,credit/…}
- apps/dashboard/src/features/finance/ (proof viewer, allocation editor)
Acceptance criteria
- Confirming a declared payment updates the invoice status (PARTIALLY_PAID or PAID) and the reseller is notified (FIN-03, FIN-04)
- A manual allocation cannot exceed the payment amount or an invoice balance
- Changing a credit ceiling requires a reason and appears in the history (FIN-05)
- A COMMERCIAL_ADMIN without finance.view does not see the finance menu or credit figures (ACL-04)
- Invoice PDFs open from the list and the detail (FIN-01)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| FIN-01 | Invoices generated from orders with legal mentions and PDF; statuses unpaid, partially paid, paid, overdue, cancelled | V1 |
| FIN-03 | Payment recording in the back-office and payment declaration with proof by the reseller | V1 |
| FIN-04 | Partial payments and allocation to invoices (reconciliation) | V1 |
| FIN-05 | Basic credit control: ceiling, used and available credit checked at checkout | V1 |
| ACL-04 | Least privilege by default; financial data (purchase prices, margins, credit) strictly limited | V1 |
Screens
| Screen | Name | App |
|---|---|---|
| BO-08 | Finance dashboard | BO |
| BO-44 | Invoices | BO |
| BO-45 | Payments & declarations | BO |
| BO-46 | Credit accounts | BO |
API surface
| Endpoint group | Operations |
|---|---|
| Finance | 12 |
Test measures
- Playwright e2e: declaration from the reseller web → verify → allocation → invoice paid
- Component tests for the allocation editor
KPI
- Delivered by Sun 22 Nov 2026 within 0.5 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.
DSH-13 — Back-office returns & after-sales pages
Returns queue and detail (approve, reject, receive with automatic restock, credit note) and the after-sales claims workflow (diagnosis, resolution) linked to orders.
DSH-09 — Back-office promotions & banners pages
Promotions list, promotion editor with targeting/stacking/preview, banners and daily offers.