Module Domains
Core Infrastructure
Finance & Accounting
Sales & Inventory
Manufacturing & Trade
E-Commerce & POS
Human Resources
Hospital Management
Support & Operations
6 modules
OrganizationCompanyUser / AuthPermission (RBAC)Company ControlCommon (Base Models)
JWT Auth MiddlewareAudit LogNotifications (WebSocket)Media Manager
4 modules
Accounting (GL)Payment & CollectionOpening BalanceReport
General JournalChart of AccountsNotes Receivable/PayableTreasury TransactionsCash In / Cash OutBank OperationsPetty Cash
12 modules
Sales InvoiceSales RefundPurchase InvoicePurchase RefundStorage TransferStorage In / OutInventory CountOver / ShortInventory LedgerCost Engine (FIFO)SpoilageClient / Supplier Bonus
5-Stage Approval WorkflowMulti-Level Unit ConversionsLedger Recalc Queue (Celery)
7 modules
ManufactureTradingImportingExportingAdvance ExportSea ShippingCustoms Clearance
Recipes & BOMsSafety Data SheetsVoyage & Vessel ManagementDeal Sheets & Brokers
5 modules
E-CommerceE-Commerce OrdersE-Commerce PublicPOSFoodics Integration
Product Catalog & PromotionsCart & WishlistReturnsPOS Shifts & Cash Drawers
16 sub-modules
EmployeesAttendancePayrollLeaveLoansDisciplinaryMedicalAppraisalsContractsOffboardingESSOrg Structure
Recruitment ModuleSoft-delete + Local ID per Tenant
12 sub-modules
Clinical (OPD/IPD)EmergencyPharmacyLaboratoryRadiologyIVFBillingAmbulanceHome CareQuality
CSSD & SurgeryInsurance Claims & Pre-authNarcotics RegisterBlood Bank
13 modules
CRMSupport TicketsChatTasksMaintenanceTransportationFixed AssetsUniversity ERPContractingDashboardBulk Import
150+ Academic ModelsWorkflow Engine
Sales Module — Transaction Lifecycle (Deep-Dive)
Sales Invoice Approval Workflow
5-stage locked approval with per-stage PATCH endpoints and RBAC.
📝
Draft / New
status = "audit"
Invoice created
Invoice created
›
🔍
Audit
Reviewed by auditor
›
✅
Confirmed
Management sign-off
›
📦
Storage Audit
Warehouse verified
Stock deducted
Stock deducted
›
📒
Entry Audit
Journal entries posted
›
🏁
Final
Locked & archived
Reversible to Entry
Reversible to Entry
Cross-Module Integration Triggers
SalesInvoicestorage_audit→Inventory Ledger · ledger_record_out()
SalesInvoiceentry_audit→General Journal (3 entries)
SalesInvoicesave()→Treasury Transaction (auto)
SalesInvoicestorage_audit→Ledger Recalc Queue (Celery)
SalesRefundrefund_invoice FK→Original Invoice · refunded_qty++
SalesInvoicenon-cash→Payment & Collection (auto-link)
All Module Transaction Lifecycles
Finance & Accountingaccounting · payment_and_collection · opening_balance
Accounting — General Journal
General Journal
new›
audit›
confirm
Triggers: Linked from Sales/Purchase invoices at entry_audit stage · Stores total_debit / total_credit · audited_by / confirmed_by tracked
Cash In / Cash Out / Bank Operation
Cash In, Cash Out, Bank Operation
new›
audit›
confirm
Triggers: Creates journal entry on confirm · Treasury balances updated · Attachments supported
Petty Cash (Individual & Branch)
Petty Cash Individual / Branch
audit›
confirm
Tracks: opening_balance → expenses → closing_balance → replenishment_amount
Notes Receivable / Payable
Notes Receivable, Notes Payable
open›
partially_collected›
collected
/ dishonoured
Types: personal_cheque · certified_cheque · banker's_draft · crossed_cheque · trust_receipt
Collection (Client Receipts)
Collection — Payment & Collection
new›
entry_audit›
final
Triggers: auto-creates Treasury Transaction on cash · Links to General Journal · Linked from Sales Invoice
Payment (Supplier Payments)
Payment — Payment & Collection
new›
entry_audit›
final
Triggers: auto-creates Treasury Transaction · Links to Purchase Invoice · Petty cash integration
Settlement (Account / Client / Supplier)
Collection Settlement, Payment Settlement
new›
final
Types: settlement_account · settlement_client · settlement_supplier | amount_type: increase / decrease
Opening Balance
Storage, Account & Client Opening Balances
new›
processing›
final
/ error
process_status tracks CSV import progress · Covers: Storage, Account, Client, Supplier, Notes Receivable
Sales & Inventorypurchase · storage · importing · exporting
Purchase Invoice
Purchase Invoice
audit›
confirm›
storage_audit›
entry_audit›
final
Mirrors Sales Invoice flow · storage_audit → stock IN to ledger · entry_audit → General Journal · Treasury Transaction auto-created
Purchase Refund
Purchase Refund
audit›
confirm›
storage_audit›
entry_audit›
final
refund_type: free (standalone) or related (linked to original PurchaseInvoice)
Storage In / Storage Out
Storage In, Storage Out
new›
confirm›
final
Auto-creates Storage Transaction (in/out) · Links to employee, approved_by · Tracks total_price, total_cost
Transfer Order (Between Storages)
Transfer Order
new›
out›
in›
audit›
confirm
Manages 4 transactions: out_out, out_in, in_out, in_in · from_storage → to_storage · Audit compares expected vs actual cost
Inventory Count
Inventory Count
new›
confirm›
final
process_status tracks CSV import · Reconciles short_qty / over_qty · Creates adjustment accounting entry
Spoilage Inventory
Spoilage Inventory
new›
confirm›
final
Auto-creates Storage Transaction (out) + GL entry for loss · Links to expense account
Import Order
Import Order
new›
final
Tracks: supplier invoices, expenses, exporter payments · expected_exchange_rate · Attachments per order
Export Order
Export Order
new›
final
Tracks: importer invoices, expenses, importer payments · expected_exchange_rate · Attachments per order
Manufacturing & Trademanufacture · trading · sea_shipping · customs_clearance · advance_export
Manufacture — Prepare Portion
Prepare Portion
new›
confirm›
final
step_2_status mirrors main flow for 2-stage production · cost_type: last / fixed / cost · Deducts raw materials from inventory
Trading — Deal Sheet
Deal Sheet
new›
trading_approve›
technical_approve›
offer›
closed
deal_type: physical / paper | type_of_deal: purchase / sales / back_to_back | stage: deal_sheet → deal_recap → final_deal | Tracks gross_profit, net_profit
Sea Shipping — Voyage Order
Voyage Order
draft›
confirmed›
in_progress›
completed
/ cancelled
voyage_type: time_charter / voyage_charter / bareboat · Tracks freight_rate, demurrage, despatch, laycan · POL → POD ports
Sea Shipping — Project
Sea Shipping Project
open›
in_progress›
closed
/ cancelled
project_type: import / export / transit / other · Links vessel, port, agent · PDA / FDA nested documents
Customs Clearance — Import
Service Consultant — Import
new›
shipment_reg›
customs_decl›
clearance_op›
release & delivery›
invoice
Tracks: declaration (draft→submitted→under_inspection→approved→released) · from_country/port → to_country/port · 41 total status values across service types
Customs Clearance — Export
Service Consultant — Export
new›
commodity_setup›
trucking›
declaration›
stuffing›
shipping & BL›
invoice
Tracks: stuffing_date, loading_date, bl_date · container_size, shipping_line · Weighbridge records
Customs Clearance — Transit
Service Consultant — Transit
new›
receiving_cargo›
release›
export_op›
shipping›
completed›
invoice
transit_type: direct / indirect · Also covers re-export phases (released → storage → processing → in_progress → completed)
Advance Export — Order
Export Order — Advance Export
draft›
pending_approval›
confirmed›
in_execution›
closed
/ cancelled / rejected
payment_terms: TT30, TT60, LC, CAD, open_account · buyer, consignee, incoterm, currency tracked · approved_by + rejected_reason
Advance Export — Shipment
Export Shipment
pending›
loaded›
in_transit›
discharged›
delivered
BL types: OBL / telex_release / sea_waybill · vessel_name, voyage_number, shipping_line · Links to multiple orders (M2M)
Advance Export — Container
Export Container
pending›
stuffed›
sealed›
loaded›
discharged
Tracks: container_number, seal_number, tare_weight, max_payload · Linked to shipment
E-Commerce & POSecommerce_order · integration (Foodics) · pos
E-Commerce Order
E-Commerce Order
pending›
confirmed›
processing›
shipped›
delivered›
final_confirmation
payment_status: pending → paid / failed / refunded · Tracks subtotal, tax, shipping, discount, total · Return requests: pending → approved → completed
E-Commerce Payment (Gateway)
Payment Gateway
initiated›
pending›
success
/ failed / cancelled
/ refunded
Gateway: Banque Misr / Mastercard · gateway_order_id, session_id, success_indicator, result_indicator · initiated_at / completed_at
Foodics Integration — Sync Log
Integration Sync Log
pending›
running›
completed
/ failed
sync_type: products / orders / customers / inventory / payments · Tracks records_processed, records_success, records_failed · Celery-driven daily
Foodics — Close Day
Foodics Close Day
new›
audit›
final
Triggers: Creates journal entries from Foodics daily sales totals · Links to General Journal · Manufacture operations reconciled
POS Day
POS Day
open›
closed›
audited
Tracks: total_sales, total_returns, total_discounts, net_amount, order_count · opening_cash vs closing_cash vs expected_cash + difference
POS Order
POS Order
draft›
pending›
active›
closed
/ void / declined
/ returned
delivery_status: sent_to_kitchen → ready → assigned → en_route → delivered · Tracks subtotal, tax, tip, change_amount · original_order FK for returns
Human Resources & Recruitmenthr · recruitment
Employee Lifecycle
Employee
PRE_HIRE›
ONBOARDING›
PROBATION›
ACTIVE›
ON_LEAVE / SUSPENDED›
EOS›
ALUMNI
hire_date, probation_end_date, confirmation_date tracked · Links to nationality, job_grade, department, direct_manager · Encrypted bank + IBAN fields
Leave Request
Leave Request
DRAFT›
PENDING_MANAGER›
PENDING_HR›
APPROVED
/ REJECTED / WITHDRAWN
approved_by_manager + approved_by_hr · from_date / to_date / days (decimal) · Leave balance auto-deducted on approval
Payroll Run
Payroll Run
DRAFT›
IN_PROGRESS›
PENDING_APPROVAL›
APPROVED›
PAID
/ CANCELLED
period_year / period_month · total_gross, total_deductions, total_net · Generates Payslip per employee (DRAFT → CALCULATED → APPROVED → PAID)
Employee Contract
Employee Contract
DRAFT›
PENDING_SIGN›
ACTIVE›
RENEWED
/ EXPIRED / TERMINATED
contract_type: FIXED / HOURLY / COMMISSION · effective_from / effective_to · version + parent_contract for amendments
Job Posting
Job Posting
DRAFT›
OPEN›
ON_HOLD›
CLOSED
/ CANCELLED
Tracks: number_of_vacancies, salary_from / salary_to, posted_date, closing_date · is_public flag · Links to department, job_position, job_grade
Recruitment Application
Application
APPLIED›
SCREENING›
SHORTLISTED›
INTERVIEW›
OFFER›
ACCEPTED›
HIRED
/ REJECTED / WITHDRAWN
InterviewSchedule: SCHEDULED → COMPLETED / NO_SHOW / CANCELLED / RESCHEDULED · ExamSession: PENDING → IN_PROGRESS → COMPLETED / EXPIRED
Hospital Management System (HMS)hms.clinical · hms.emergency · hms.billing · hms.pharmacy · hms.laboratory
Patient Appointment
Patient Appointment
scheduled›
confirmed›
waiting›
in_room›
completed
/ cancelled / no_show
/ rescheduled
type: new_patient / follow_up / emergency / telemedicine / procedure · queue_number · appointment_date + time_slot
Clinical Encounter
Clinical Encounter
draft›
open›
in_progress›
clinically_closed›
billed›
archived
encounter_type: opd / inpatient / er / telemedicine / day_surgery · opened_at / closed_at · Triggers HMS Invoice on billed
Inpatient Admission
Inpatient Admission
active›
discharged
/ transferred
/ ama / expired
source: er / opd / transfer / direct / elective · admitted_at / discharged_at · acuity_score, estimated_los_days, risk_flags (JSON)
Laboratory Order
Laboratory Order
ordered›
collected›
processing›
resulted›
approved & released
/ cancelled
priority: stat / urgent / routine · QC runs tracked · Critical value notifications · Analyzer integration
Prescription
Prescription
pending›
reviewed›
approved›
dispensed
/ cancelled
sent_to_pharmacy flag · Narcotics register integration · Drug inventory deducted on dispensing
Emergency Room Visit
Emergency Room Visit
triage›
waiting›
in_room›
observation›
discharged / admitted
/ transferred / expired / lwbs
arrival_mode: walk_in / ambulance / transfer / police · ESI triage score · LWBS (Left Without Being Seen) tracked with lwbs_at
HMS Invoice
HMS Invoice
draft›
submitted›
paid
/ partially_paid
/ cancelled / refunded
Tracks: subtotal, discount, insurance_amount, patient_due, amount_paid · insurance_plan_id, preauth_number
Insurance Claim
Insurance Claim
pending›
submitted›
approved›
paid
/ denied›
appealed›
closed
Pre-authorization: pending → approved / rejected / expired · denial_code, denial_reason · ERA date tracked
Surgery Schedule
Surgery Schedule
scheduled›
in_progress›
completed
/ cancelled
/ postponed
anesthesia_type: general / regional / local / MAC · WHO checklist · CSSD instrument counts · Intraop record
Support & Operationsmaintenance · contracting · fixed_assets · transportation · support_ticket · tasks · crm · university · chat
Maintenance Request
Maintenance Request
draft›
submitted›
approved›
converted → Work Order
/ cancelled
type: corrective / preventive / emergency / inspection · severity: low/medium/high · source: customer / employee / iot / schedule
Maintenance Work Order
Work Order
draft›
submitted›
approved›
planned›
assigned›
in_progress›
waiting_parts / waiting_approval›
completed›
verified›
closed
Tracks: total_labor_cost, total_material_cost, total_external_cost · planned vs actual dates · SLA tracking
Contracting — Contract
Contract
DRAFT›
PENDING_SIGN›
ACTIVE›
RENEWED
/ EXPIRED / TERMINATED
Workflow engine: WorkflowInstance drives approvals through configurable stages · WorkflowHistory is immutable audit trail · Milestone billing: pending → eligible → billed
Contracting — Payment Certificate
Payment Certificate
draft›
pending_approval›
approved & issued
/ revision needed
Tracks: gross_amount, retention_rate, retention_deducted, net_amount · billing_period_start/end · revision_no, is_locked for version control
Fixed Asset
Fixed Asset
active
↔
under_maintenance
›
transferred
/ disposed
DepreciationEntry: pending → posted · GL journal created on post · depreciation_method: straight_line / declining_balance · disposal_type: sale / write_off / scrap
Transport Trip
Transport Trip
pending›
approved›
loading›
in_transit›
delivered
/ cancelled
/ incident
source: sales / purchase / manual / transfer · planned_departure/arrival vs actual · POD (Proof of Delivery) tracked
Transport Hire Contract
Transport Hire Contract
draft›
pending_approval›
approved›
active›
completed
/ cancelled
billing_model: daily / hourly / monthly / per_km · rate, overtime_rate, deposit_amount · planned_km vs actual_km, odometer tracking
Transport Invoice
Transport Invoice
draft›
sent›
partially_paid›
paid
/ overdue / cancelled
invoice_type: trip / hire / hire_deposit / hire_final · subtotal + tax_amount · due_date tracked for overdue detection
Support Ticket
Support Ticket
open›
assigned›
in_progress›
resolved›
closed
Real-time chat per ticket via WebSocket · Immutable ticket status audit trail · Captures browser, OS, IP, screen resolution, locale
Task Management (Kanban)
Task / Board Status
[ Board Column 1 ]›
[ Board Column 2 ]›
[ Done Column ]
Dynamic Kanban: status is a configurable Board Column (not fixed choices) · priority: low/medium/high/critical · linked_module ties tasks to Sales, HR, Finance, etc. · Subtasks via parent_task self-FK
CRM Lead
CRM Lead
new›
contacted›
qualified›
converted → Opportunity
/ unqualified
expected_value (Decimal) · next_follow_up_date · converted_opportunity FK when qualified
CRM Opportunity
CRM Opportunity
[ Pipeline Stage 1 ]›
[ Pipeline Stage N ]›
won
/ lost
Pipeline stage is configurable · value + probability (0–100%) · won_at / lost_at · Opportunity History tracks all stage changes
University — Exam
Exam Setup
Draft›
Published›
Closed
150+ models: Admission, Registration, Enrollment, Grading, Attendance, LMS, Finance · Admission/Registration stages use configurable SimpleLookup tables · Student finance: charge → payment
Chat
Conversation / Message
active
↔
archived (is_archived)
No status machine — boolean flags only: is_archived (Conversation), is_deleted (Message) · message_type: text / voice / file / image / forward · Real-time via WebSocket
System-wide KPIs & Metrics