Lyceum Guardian
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

FieldDescription
ReferencePayment reference number
AmountTransaction amount in LKR
Entity TypeNEW or EXISTING student
StageTransaction status
NotesOptional payment notes
InvoiceLinked invoice record

Transaction Stages

StageDescription
CompletedPayment successfully processed
PendingPayment awaiting confirmation
FailedPayment failed
RefundedPayment was refunded

Creating Transactions

Transactions are created when marking invoices as paid:

  1. Navigate to an invoice
  2. Click "Mark as Paid"
  3. Enter payment reference (required)
  4. Add notes (optional)
  5. Confirm payment

The system creates:

  • A Transaction record
  • A Transactable link 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_at

Transactables 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_at

Transaction 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: PAID

On this page