IFRS-Compliant Multi-Level Approval Workflows
The CNPERP Workflow System provides a flexible, role-based approval mechanism for critical business transactions.
| State Machine | Configurable states per workflow |
| Role-Based | Actions restricted by user role |
| Threshold Escalation | Auto-routing based on amount |
| Notifications | Real-time in-app alerts |
| Documentation | Required comments/attachments |
Navigate to Settings → Workflow & Approvals and click "Seed Phase 1 Workflows" or use the API:
/api/v1/workflows/seed/phase1
In Settings → Workflow & Approvals, set your approval thresholds:
Ensure users have appropriate roles assigned in Settings → Users:
Configure notification preferences in Settings to receive alerts for pending approvals.
| Level | Role | Code | Typical Authority |
|---|---|---|---|
| L0 | Any User | * |
Create drafts, submit |
| L1 | Supervisor | supervisor |
Up to $5,000 |
| L2 | Manager | manager |
$5,001 - $25,000 |
| L3 | Finance Manager | finance_manager |
$25,001 - $50,000 |
| L4 | CFO | cfo |
$50,001 - $500,000 |
| L5 | CEO | ceo |
Above $500,000 |
| L5+ | Board | board |
Material items, policy changes |
Phase 1 implements the five most critical approval workflows required for IFRS compliance.
| Amount | Required Approval |
|---|---|
| < $50,000 | Finance Manager |
| $50,000 - $250,000 | CFO |
| > $250,000 | CEO |
Critical: ALL credit notes require approval (revenue reduction risk)
| Amount | Required Approval |
|---|---|
| < $10,000 | Finance Manager |
| $10,000 - $100,000 | CFO |
| > $100,000 | Board (CEO as representative) |
Requirements:
| Period Type | Required Approval |
|---|---|
| Month-End | Finance Manager |
| Quarter-End | CFO |
| Year-End | CFO + External Audit |
Controls:
| Status | Code | Description | Terminal? |
|---|---|---|---|
| Draft | draft |
Initial state, editable | No |
| Submitted | submitted |
Awaiting routing | No |
| Pending Approval | pending_approval |
Awaiting approver action | No |
| Approved | approved |
Approved, awaiting completion | No |
| Completed | completed |
Fully processed | Yes |
| Rejected | rejected |
Declined by approver | Yes |
Configure thresholds in Settings → Workflow & Approvals:
| Setting | Default Value | Description |
|---|---|---|
| Manager Approval Limit | $25,000 | Maximum amount manager can approve |
| Finance Manager Limit | $50,000 | Maximum amount finance manager can approve |
| CFO Approval Limit | $250,000 | Maximum amount CFO can approve |
| CEO Approval Limit | $500,000 | Maximum amount CEO can approve alone |
| Auto-Submit Threshold | $1,000 | Items below this skip workflow |
| Approval Pending | Item assigned to you for approval |
| Approved | Your item was approved |
| Rejected | Your item was rejected |
| Status Update | General status change |
/api/v1/workflows/definitions - List all workflow definitions
/api/v1/workflows/definitions/{id} - Get single workflow definition
/api/v1/workflows/seed/phase1 - Seed Phase 1 workflows
/api/v1/workflows/instances - List workflow instances
/api/v1/workflows/instances/{id}/approve - Approve item
/api/v1/workflows/instances/{id}/reject - Reject item
/api/v1/workflows/my-pending-approvals - Get user's pending items
/api/v1/workflows/dashboard - Get workflow dashboard stats
/api/v1/workflows/entity-types - Get all entity type definitions
purchase_requisitionpurchase_ordergoods_receiptvendor_paymentsales_quotationsales_ordersales_invoicesales_credit_notecustomer_credit_limitinventory_adjustmentstock_writeoffstock_transferinventory_revaluationjournal_entryaccrualbad_debt_writeoffperiod_closecoa_changeintercompanyasset_acquisitionasset_disposalasset_impairmentdepreciation_policybank_recon_adjcash_transferpetty_cashNavigate to Settings → Workflow & Approvals to configure:
from app.database.seed_workflows import seed_phase1_workflows from app.core.database import SessionLocal db = SessionLocal() seed_phase1_workflows(db) db.close()
allowed_roles array. Verify role assignment in Settings → Users.
GET /api/v1/workflows/instances/{id}/available-actions to see valid transitions. Check if required approvers are assigned.
notified_roles are configured for the target state. Check notification settings in Settings → Workflow & Approvals.
/api/v1/workflows/definitions/{id} - Get workflow with all states/transitions
/api/v1/workflows/instances/{id}/history - Get full action history
| Phase | Entity Types | Status |
|---|---|---|
| Phase 1 | journal_entry, vendor_payment, sales_credit_note, bad_debt_writeoff, period_close | ✅ Complete |
| Phase 2 | purchase_order, inventory_adjustment, stock_writeoff, asset_acquisition, asset_disposal | 📋 Planned |
| Phase 3 | sales_order, production_order, bom_change, expense_claim, payroll_run | 📋 Planned |
| Phase 4 | purchase_requisition, sales_quotation, stock_transfer, bank_recon_adj, budget_transfer | 📋 Planned |