Story 2: Invoice Generation & Management
Overview​
| Field | Value |
|---|---|
| Story ID | NGE-14-2 |
| Story Points | 13 |
| Sprint | Sprint 11 |
| Language | Node.js (NestJS) |
User Story​
As a School Admin
I want to generate invoices for students automatically
So that I can collect fees efficiently
Acceptance Criteria​
- Generate invoice based on student's fee structure
- Apply applicable concessions automatically
- Calculate taxes if applicable
- Generate PDF with school letterhead
- Support bulk invoice generation
- Track invoice status (Pending, Paid, Overdue)
API Endpoints​
| Method | Endpoint | Description |
|---|---|---|
| POST | /invoices | Generate invoice |
| POST | /invoices/bulk | Bulk generation |
| GET | /invoices | List invoices |
| GET | /invoices/:id | Get invoice details |
| GET | /invoices/:id/pdf | Download PDF |
Invoice Number Format​
INV/YYYYMM/00001
Example: INV/202504/00001
Tasks​
| Task | Title | Estimate |
|---|---|---|
| T1 | Create invoice tables | 3h |
| T2 | Implement InvoiceService | 8h |
| T3 | PDF generation with PDFKit | 6h |
| T4 | Bulk generation with BullMQ | 4h |
| T5 | Invoice list/detail UI | 6h |
| T6 | Integration tests | 4h |