|
01 |
app/models/HomeModel.php
Intelligence & Analytics
|
HomeController |
invoices, invoice_items, payments, expenses, inventory_items, recurring_invoices |
Computes executive dashboard KPIs across custom date presets, 12-month revenue vs. expense cashflow series, MRR/ARR subscription projections, and Top 5 customer/item leaderboards. |
|
02 |
app/models/CustomerModel.php
Sales & Receivables
|
CustomerController, PortalController |
customers, invoices, credit_notes, payments |
Manages debtor CRM profiles, credit limit checks, 360° client transaction history, and the 6-bucket FIFO Age Analysis engine (Current, 30, 60, 90, 120, 180+ days). |
|
03 |
app/models/QuoteModel.php
Sales & Receivables
|
QuoteController, PortalController |
quotes, quote_items |
Handles sales quote creation, line-item margin calculations, validity expiration sweeps, client portal approval/decline state transitions, and 1-click conversion into Tax Invoices. |
|
04 |
app/models/InvoiceModel.php
Sales & Receivables
|
InvoiceController, RecurringInvoiceController, PortalController |
invoices, invoice_items, inventory_serials, inventory_movements |
Core billing engine for VAT & Non-VAT Tax Invoices, multi-currency base ledger normalization, historical WAC COGS snapshotting, serial number allocation, and real-time stock deduction. |
|
05 |
app/models/RecurringInvoiceModel.php
Sales & Receivables
|
RecurringInvoiceController, CronController |
recurring_invoices, recurring_invoice_items |
Manages subscription billing schedules (Weekly to Annually), drift-free next-billing-date advancement, automated invoice spawning, and MRR/ARR revenue metrics. |
|
06 |
app/models/CreditNoteModel.php
Sales & Receivables
|
CreditNoteController |
credit_notes, credit_note_items, invoices, inventory_movements |
Processes invoice-linked and standalone credit notes, Output VAT reversals, debtor balance deductions, and optional physical stock return restoration. |
|
07 |
app/models/PaymentModel.php
Sales & Receivables
|
PaymentController, PortalController |
payments, invoices, document_attachments |
Records customer remittances across payment methods, normalizes foreign currency receipts, updates invoice settlement statuses, and manages Client Portal POP verification. |
|
08 |
app/models/VendorModel.php
Procurement & Inventory
|
VendorController, PurchaseOrderController, ExpenseController |
vendors, purchase_orders |
Maintains supplier directory dossiers, tax/VAT compliance metadata, banking references, and lifetime vendor procurement totals. |
|
09 |
app/models/PurchaseOrderModel.php
Procurement & Inventory
|
PurchaseOrderController |
purchase_orders, purchase_order_items, goods_received_notes, goods_received_items |
Drives supplier Purchase Orders and Goods Received Note (GRN) check-ins, partial delivery tracking, batch/expiry capture, serial intake, and WAC cost updates. |
|
10 |
app/models/ExpenseModel.php
Procurement & Inventory
|
ExpenseController |
expenses, expense_categories |
Tracks operational overhead expenditures, Input VAT tax claims, vendor associations, and period expense aggregations for P&L and VAT201 reporting. |
|
11 |
app/models/ExpenseCategoryModel.php
Procurement & Inventory
|
ExpenseController |
expense_categories |
Manages chart-of-expense categories, custom category descriptions, and active/archived state guards for operational cost classification. |
|
12 |
app/models/InventoryModel.php
Procurement & Inventory
|
InventoryController, InvoiceController, PurchaseOrderController |
inventory_items, inventory_movements, inventory_batches, inventory_serials, inventory_price_history |
Master warehouse engine handling Weighted Average Cost (WAC) valuation, manual stock adjustments, FEFO batch allocations, 360° bi-directional serial traceability, and price history logs. |
|
13 |
app/models/InventoryItemModel.php
Procurement & Inventory
|
InventoryController |
inventory_items, inventory_units |
Manages SKU catalog definitions, physical vs. service item flags, reorder alert thresholds, warranty duration months, and Units of Measure (UOM). |
|
14 |
app/models/InventoryCategoryModel.php
Procurement & Inventory
|
InventoryController |
inventory_categories |
Organizes inventory SKUs into structured product groups with SKU count telemetry and safe deletion guards. |
|
15 |
app/models/ReportModel.php
Intelligence & Analytics
|
ReportController |
All 28 Schema v3 Tables |
High-precision analytical query engine powering all 15+ financial, statutory (SARS VAT201), aged debtor, COGS, inventory valuation, FEFO expiry, and Year-End Accountant reports. |
|
16 |
app/models/PortalModel.php
Client Portal & Search
|
PortalController |
customers, quotes, invoices, credit_notes, payments |
Provides tenant-isolated data queries for the Client Self-Service Portal, including client authentication, dashboard metrics, quote approvals, and POP submissions. |
|
17 |
app/models/SearchModel.php
Client Portal & Search
|
SearchController |
customers, invoices, quotes, credit_notes, payments, vendors, purchase_orders, inventory_items, inventory_serials, expenses |
Executes indexed cross-ledger Omnibox searches across all 10 operational modules simultaneously with instant serial number and document deep-linking. |
|
18 |
app/models/AttachmentModel.php
Client Portal & Search
|
InvoiceController, QuoteController, CreditNoteController, PurchaseOrderController, ExpenseController, PaymentController |
document_attachments |
Polymorphic file management model binding uploaded PDFs, receipts, and Proofs of Payment to any financial document with MIME validation and disk cleanup. |
|
19 |
app/models/SettingsModel.php
Admin, Security & Automation
|
AdminController |
settings |
Key-value configuration store managing company identity, theme color tokens, VAT rates, banking details, document sequence counters, SMTP credentials, and OTA license state. |
|
20 |
app/models/UserModel.php
Admin, Security & Automation
|
UserController, AccountController, AuthController |
users, password_resets |
Handles staff authentication, RBAC role assignments (admin/staff), Bcrypt password hashing, password reset tokens, and personal account security updates. |
|
21 |
app/models/EmailTemplateModel.php
Admin, Security & Automation
|
AdminController |
email_templates |
Stores and renders all 14 customizable HTML email templates with dynamic placeholder interpolation for invoices, quotes, statements, reminders, and portal alerts. |
|
22 |
app/models/CronLogModel.php
Admin, Security & Automation
|
AdminController, CronController |
cron_logs |
Records automated background job executions, execution duration in milliseconds, processed record counts, and status telemetry for the System Control Center. |
|
23 |
app/models/AuditLogModel.php
Admin, Security & Automation
|
AuditLogController |
audit_logs |
Immutable security ledger logging every state-changing action (CREATE, UPDATE, DELETE, EMAIL, AUTH, IMPERSONATE) with actor metadata, IP address, and forensic payload. |