SRV-32 — V2 — Detailed credit, reminders, credit notes, accounting export
Payment terms and due dates, blocking/approval policy, automatic reminders, credit notes and receipts, accounting export formats.
| Field | Details |
|---|---|
| Task code | SRV-32 |
| Phase | P4 — V2 evolutions |
| Product scope | V2 |
| Status | Planned |
| Start | Sun 31 Jan 2027 |
| Due | Tue 2 Feb 2027 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 2.5 person-day(s) planned · 6 from scratch · size M |
| Area · app | Server · server |
| Depends on | SRV-31 |
| Unblocks | SRV-34, DSH-20 |
| Milestones | — |
Summary
Payment terms and due dates, blocking/approval policy, automatic reminders, credit notes and receipts, accounting export formats.
Description
Detailed credit, reminders and accounting exports are V2 (cahier §4.7, §11, §14.2; FIN-06…FIN-09, INT-06). This task adds payment terms and due dates per reseller, overdue detection, the over-limit policy with automatic blocking or an approval workflow, automatic reminders and unpaid alerts (PaymentReminder), payment receipts and standalone credit notes for commercial gestures — V1 already issues credit notes from returns and after-sales (SRV-20) — and accounting exports in file formats agreed with HOCO's accountant (admin.finance.overdue, admin.finance.export). Out of scope: ERP API integration and the V2 finance pages (DSH-20).
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Payment terms per reseller (e.g. comptant, 15, 30 jours) and due dates on invoices | Anis |
| 2 | Overdue detection job and aging buckets (0–30, 31–60, 61–90, 90+) for admin.finance.overdue | Anis |
| 3 | Over-limit policy BLOCK or APPROVAL with an approval request workflow for orders over credit | Anis |
| 4 | Reminder scheduler (before due date, after due date, escalation) with PaymentReminder history over push, SMS and email | Anis |
| 5 | Payment receipt PDFs and standalone credit notes (commercial gesture) on the V1 credit-note base | Anis |
| 6 | Accounting export (journal of invoices, credit notes, payments) in CSV/XLSX formats agreed with HOCO's accountant | Anis |
| 7 | Reseller finance additions: due dates and reminders in finance.summary | Anis |
Deliverables
- apps/server/src/modules/billing/{terms,overdue,reminders,receipts,accounting-export}.ts
- packages/contracts V2 additions for admin.finance.overdue and admin.finance.export
- Accounting export format specification agreed with HOCO
Acceptance criteria
- An invoice past its due date becomes OVERDUE and enters the aging report (FIN-06)
- Under APPROVAL policy an over-limit order waits for an approver instead of being refused (FIN-06)
- Reminders are sent on schedule and listed in the reminder history (FIN-07)
- The accounting export of a month contains every invoice, credit note and payment of that month with totals matching the finance reports (FIN-09)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| FIN-06 | Detailed credit: payment terms, due dates, automatic blocking or approval when exceeded | V2 |
| FIN-07 | Automatic reminders and unpaid alerts | V2 |
| FIN-09 | Accounting exports and financial reports | V2 |
| INT-06 | ERP / accounting import-export (files in V1, API in V2) | V2 |
API surface
| Endpoint group | Operations |
|---|---|
| Finance | 12 |
| Reseller finance | 6 |
Test measures
- Job tests for overdue and reminders with a fake clock
- Reconciliation test between the export and the database totals
Risks
- Export format unknown until HOCO's accounting software is identified — agree a sample file before implementation
KPI
- Delivered by Tue 2 Feb 2027 within 2.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.
SRV-31 — V2 — Profitable packs
Pack definitions, pack pricing and stock, add-pack-to-cart, interaction with promotions.
SRV-34 — V2 — Carrier API & WhatsApp Business integrations
Shipment creation and tracking webhooks with the selected carrier(s); WhatsApp Business templates for confirmations and reminders.