Features
Transactions
Payment transaction management
Transactions record all payment activities in the system. Each time an invoice is marked as paid, a transaction record is created.
Transaction Fields
| Field | Description |
|---|---|
| Reference | Payment reference number |
| Amount | Transaction amount in LKR |
| Entity Type | NEW or EXISTING student |
| Stage | Transaction status |
| Notes | Optional payment notes |
| Invoice | Linked invoice record |
Transaction Stages
| Stage | Description |
|---|---|
| Completed | Payment successfully processed |
| Pending | Payment awaiting confirmation |
| Failed | Payment failed |
| Refunded | Payment was refunded |
Creating Transactions
Transactions are created when marking invoices as paid:
- Navigate to an invoice
- Click "Mark as Paid"
- Enter payment reference (required)
- Add notes (optional)
- Confirm payment
The system creates:
- A
Transactionrecord - A
Transactablelink to the invoice
Viewing Transactions
Navigate to Platform → Transactions to view all transactions.
Features
- Search - Find by reference number, student
- Sort - By date, amount, status
- Filter - By transaction stage
Transaction Details
Click on a transaction to see:
- Transaction reference
- Amount and currency
- Entity type
- Status
- Associated invoice
- Student information
- Creation timestamp
- Payment notes
Database Schema
Transactions Table
transactions
├── id (primary key)
├── reference (string)
├── amount (decimal)
├── entity_type (enum: NEW/EXISTING)
├── stage (enum)
├── notes (text, nullable)
├── created_at
└── updated_atTransactables Table
Links transactions to various entities:
transactables
├── id (primary key)
├── transaction_id (foreign key)
├── transactable_type (morphs) -- e.g., Invoice
├── transactable_id (morphs)
├── branch_id (foreign key, optional)
├── grade_id (foreign key, optional)
└── created_atTransaction Flow
Invoice "Mark as Paid"
↓
Create Transaction:
- reference: from user input
- amount: from invoice
- entity_type: from invoice
- stage: COMPLETED
- notes: from user input
↓
Create Transactable:
- transaction_id: new transaction
- transactable_type: Invoice
- transactable_id: invoice ID
↓
Update Invoice:
- stage: PAIDRelated
- Invoice Management - Managing invoices
- Credit Notes - Credit note system