Accounts — Double-Entry Fee Accounting
Overview
The accounts module implements double-entry bookkeeping for school fee management. Every transaction creates two entries: one debit, one credit.
Account Types
| Account Code | Type | Description |
|---|---|---|
ASSET_CASH | Asset | Cash on hand |
ASSET_BANK | Asset | Bank account |
ASSET_FEE_RECEIVABLE | Asset | Tuition/ fees owed by students |
LIABILITY_FEE_ADVANCE | Liability | Fees paid in advance |
REVENUE_TUITION | Revenue | Tuition fees received |
REVENUE_TRANSPORT | Revenue | Transport fees received |
REVENUE_LAB | Revenue | Lab fees received |
EXPENSE_SCHOLARSHIP | Expense | Fee waivers/scholarships |
EXPENSE_CONCESSION | Expense | Discounts given |
Transaction Flow
Record a Fee Payment
Student pays ₹10,000 tuition:
DR Fee Receivable (Student A) ₹10,000
CR Cash / Bank ₹10,000
// School Admin API
POST /school-admin/fee/collection/record
{
"data": {
"studentId": "uuid",
"academicYearId": "uuid",
"entries": [
{ "account": "ASSET_BANK", "entryType": "CR", "amount": 10000 },
{ "account": "ASSET_FEE_RECEIVABLE", "entryType": "DR", "amount": 10000 }
],
"narration": "Tuition fee Q1 2024"
}
}
Record a Concession
50% scholarship granted to Student B (₹5,000):
DR Revenue Scholarship ₹5,000
CR Fee Receivable (Student B) ₹5,000
Record a Refund
₹2,000 refund to parent:
DR Cash / Bank ₹2,000
CR Liability Fee Advance ₹2,000
Fee Ledger View
{
"data": {
"studentId": "uuid",
"academicYear": "2024-25",
"openingBalance": 30000,
"transactions": [
{ "date": "2024-04-01", "voucherNo": "FEE/2024/001", "narration": "Tuition Q1", "dr": 10000, "cr": 0, "balance": 20000 },
{ "date": "2024-04-15", "voucherNo": "FEE/2024/002", "narration": "Transport Apr", "dr": 2000, "cr": 0, "balance": 18000 },
{ "date": "2024-05-10", "voucherNo": "FEE/2024/003", "narration": "Payment received", "dr": 0, "cr": 8000, "balance": 10000 }
]
}
}
Reports
| Report | Endpoint | Description |
|---|---|---|
| Day Book | GET /school-admin/fee/report/day-book | All transactions for a date |
| Ledger | GET /school-admin/fee/report/ledger/:studentId | Per-student fee history |
| Collection | GET /school-admin/fee/report/collection | Daily/weekly/monthly collection summary |
| Outstanding | GET /school-admin/fee/report/outstanding | All students with pending fees |
| Concession | GET /school-admin/fee/report/concession | Total concessions given |
Fee Reminders
Automated reminders sent via SNS → SMS:
// Scheduled job runs daily
const overdueStudents = await db.query.FeeLedger.findMany({
where: and(
lt(sumBalance, 0), // outstanding > 0
lt(dueDate, today)
),
});
// Send reminder SMS
await snsClient.publish({
PhoneNumber: parentPhone,
Message: `Reminder: ₹${Math.abs(balance)} fee due for ${studentName}. Please pay at earliest. - ${schoolName}`,
});