0%
balqalam Logo
balqalam
FeaturesCommunityPricingDocumentation
Login
  • Introduction
  • Help center
  • Common questions
  • Get Started
  • Localhost
  • Architecture
  • Structure
  • Pattern
  • Page
  • Layout
  • Content
  • Types
  • Config
  • Actions
  • Queries
  • Authorization
  • Validation
  • Form
  • Table
  • Detail
  • Card
  • Util
  • Hooks
  • List Params
  • Views
  • README.md
  • ISSUE.md
  • Technology Stack
  • Database
  • File
  • CDN Assets
  • Entry Points
  • Dashboard
  • Authentication
  • Credentials
  • OAuth
  • Flow Diagrams
  • Multi-Tenancy
  • Offline
  • Onboarding
  • Onboarding Videos
  • Add Values
  • Admission
  • Application
  • Attendance
  • Compliance
  • Profile
  • Exams
  • Exam Wizard
  • Timetable
  • Classrooms
  • Notifications
  • Conference
  • LMS (Lumos)
  • Finance
  • Fee Management
  • Invoice
  • Wallet
  • Salary
  • Payroll
  • Timesheet
  • Expenses
  • Budget
  • Receipt
  • Accounts
  • Banking
  • Reports
  • Dashboard
  • Permissions
  • Messages
  • Integration Flow
  • Provision
  • AI Document Processing
  • Document Intelligence
  • Internationalization
  • Translation
  • Translation Guide
  • Icons
  • Docs Factory
  • Inspiration
  • Listings
  • Teachers
  • Students
  • Catalog
  • Library
  • Contributing
  • Code of conduct
  • GitHub Workflow
  • Database Seeds
  • Database Safety
  • Test Accounts
  • Bulk import
  • Playwright
  • Prettier
  • Block Rebound
  • Transportation

Receipt

PreviousNext

Expense-receipt capture with AI extraction (merchant, date, amount, line items) and Schematic.io plan gating. Distinct from the fees payment-receipt PDF. Upload, extraction, and retry work; an edit-extracted-data UI and receipt-to-expense linking are pending.

Receipt is an expense-receipt capture tool: upload a photo or PDF of a receipt and an AI pipeline extracts the merchant, date, amount, and line items for expense tracking. It is not the payment-receipt generator — the receipt issued for a fee payment is rendered by fees/receipt-pdf.tsx (a working @react-pdf/renderer document).

Flow

Upload image / PDF  →  AI extraction (pending → processing → processed | error)
  →  retry on failure  →  (manual) attach to an expense record

Plan gating runs through Schematic.io (receipt/manage-plan route); entitlements come from receipt/schematic/.

Status

FeatureStatus
Upload (image / PDF)Production
AI extraction pipelineProduction
Status state machine + retryProduction
Schematic.io plan / entitlement gatingReady
"Edit extracted data" UIPlanned (user must delete + retry on misread)
Receipt-to-expense linkingPlanned (currently manual)
OCR fallback for low-quality imagesPlanned
Duplicate detection / batch uploadPlanned

Routes

RoutePageStatus
/{lang}/finance/receiptReceipt listReady
/{lang}/finance/receipt/[id]Receipt detailReady
/{lang}/finance/receipt/manage-planSchematic plan managementReady

Server actions

ActionPurpose
uploadReceiptUpload + kick off AI extraction
getReceipts / getReceiptByIdList / read receipts
retryReceiptExtractionRe-run extraction after an error
deleteReceiptDelete (cleans up storage + DB)

Ledger / accounting

Not a money-mover — receipts are evidence attached to expenses; they do not post journal entries.

Schema

prisma/models/finance-invoices.prisma: Receipt, ExpenseReceipt — schoolId-scoped. No lang field (extracted merchant text is stored as-captured).

Stubs

  • receipt/schematic/client.ts:7 — process.env.SCHEMATIC_API_KEY || "placeholder-api-key" build-time fallback.
  • receipt/upload-form.tsx:72 — // This is a TODO for Phase 4 completion.
  • validation.ts:44,51 — hardcoded validation messages.

Tests

None.

Key files

ComponentPath
Server actionssrc/components/school-dashboard/finance/receipt/actions.ts
AI extractionsrc/components/school-dashboard/finance/receipt/ai/extract-receipt-data.ts
Schematicsrc/components/school-dashboard/finance/receipt/schematic/
Upload formsrc/components/school-dashboard/finance/receipt/upload-form.tsx
Payment receipt PDF (in fees)src/components/school-dashboard/finance/fees/receipt-pdf.tsx

See also

  • Finance — block overview
  • Expenses — receipts attach to expense records
  • Fees — the working payment-receipt PDF
BudgetAccounts

On This Page

FlowStatusRoutesServer actionsLedger / accountingSchemaStubsTestsKey filesSee also

Built by Databayt ·

Welcome to balqalam.

A great journey is about to begin.