HOCO B2B
Team tasksAnis

DSH-07 — Back-office finance pages (V1)

Invoices, payments and declaration verification, credit accounts, finance dashboard.

FieldDetails
Task codeDSH-07
PhaseP1 — V1 build & integration
Product scopeV1
StatusPlanned
StartSun 22 Nov 2026
DueSun 22 Nov 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort0.5 person-day(s) planned · 2 from scratch · size XS
Area · appBack-office · dashboard
Depends onDSH-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

#SubtaskOwner
1BO-08 finance dashboard: unpaid and overdue totals, payments to verify, collections by PaymentMethod, credit used vs ceilingsAnis
2BO-44 invoices list: FAC number, date, reseller, order, total TTC, paid, balance, InvoiceStatus pill; filters status, period, wilaya, reseller; exportAnis
3Invoice detail: lines, allocations, credit notes, PDF, « Annuler » with reason (finance.administer)Anis
4BO-45 « Paiements à vérifier » queue with proof viewer (image/PDF via signed URL), « Confirmer » / « Rejeter » with PAYMENT_REJECT_REASONAnis
5Record-payment form (method, amount, reference, date, reseller) and allocation editor (auto oldest-first, manual split)Anis
6BO-46 credit accounts: ceiling, exposure, available, history of limit changes; edit ceiling with reasonAnis
7Finance gating: navigation, columns and widgets hidden without finance.viewAnis

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

RequirementTitleRelease
FIN-01Invoices generated from orders with legal mentions and PDF; statuses unpaid, partially paid, paid, overdue, cancelledV1
FIN-03Payment recording in the back-office and payment declaration with proof by the resellerV1
FIN-04Partial payments and allocation to invoices (reconciliation)V1
FIN-05Basic credit control: ceiling, used and available credit checked at checkoutV1
ACL-04Least privilege by default; financial data (purchase prices, margins, credit) strictly limitedV1

Screens

ScreenNameApp
BO-08Finance dashboardBO
BO-44InvoicesBO
BO-45Payments & declarationsBO
BO-46Credit accountsBO

API surface

Endpoint groupOperations
Finance12

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.

On this page