Skip to main content

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 CodeTypeDescription
ASSET_CASHAssetCash on hand
ASSET_BANKAssetBank account
ASSET_FEE_RECEIVABLEAssetTuition/ fees owed by students
LIABILITY_FEE_ADVANCELiabilityFees paid in advance
REVENUE_TUITIONRevenueTuition fees received
REVENUE_TRANSPORTRevenueTransport fees received
REVENUE_LABRevenueLab fees received
EXPENSE_SCHOLARSHIPExpenseFee waivers/scholarships
EXPENSE_CONCESSIONExpenseDiscounts 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

ReportEndpointDescription
Day BookGET /school-admin/fee/report/day-bookAll transactions for a date
LedgerGET /school-admin/fee/report/ledger/:studentIdPer-student fee history
CollectionGET /school-admin/fee/report/collectionDaily/weekly/monthly collection summary
OutstandingGET /school-admin/fee/report/outstandingAll students with pending fees
ConcessionGET /school-admin/fee/report/concessionTotal 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}`,
});