# Section 3 – System Requirements Gap Analysis

## 3.1 Vendor Management
- Vendor entities lack performance scores, feedback history, or status flags for qualification/offboarding, so only static profile data is captured (`models/vendors.php:6-22`).
- Capability records do not include weighting or evaluation logic; they are passive text fields that are never surfaced in workflows (`models/vendor_capabilities.php:6-11`).
- No workflow service references vendors, so onboarding/qualification steps are not automated (`api/services/WorkflowEngine.php:625`). // TODO: Add vendor-specific workflow steps for onboarding and periodic reviews.

## 3.2 RFQ Management
- RFQs have no template definitions or linkage to reusable forms; fields are limited to IDs and timestamps (`models/rfqs.php:5-11`).
- There are no notification jobs or reminder schedulers for non-responding vendors; RFQ records lack reminder flags entirely (`models/rfqs.php:5-11`).

## 3.3 Bid Collection & Comparison
- Quotes capture only a single amount and optional attachment path, without term breakdowns or lead-time columns, preventing structured comparisons (`models/vendor_quotes.php:6-10`).
- No UI or service aggregates multiple quotes for side-by-side scoring; the dashboard has no procurement comparison view (`FrontEnd/js/router.js:5-27`).

## 3.4 Communication & Collaboration
- There are no messaging tables or controllers attaching comments to RFQs or procurement requests, so clarifications and negotiations remain outside the system (`models/procurement_requests.php:5-17`).
- Notification helpers never target vendors; the workflow engine only integrates with PHPMailer for generic email without RFQ context (`api/services/WorkflowEngine.php:625`).

## 3.5 Approval Workflow
- Procurement requests hold a single `status` string and no approval tiers, preventing multi-level routing (`models/procurement_requests.php:5-17`).
- The deprecated workflow step that should route approvals depends on a missing `ProcurementService`, so digital sign-off paths are broken (`api/services/workflow_steps/CreateProcurementRequestStep.php:51-55`). // TODO: Rebuild approval routing with the current workflow primitives.
- There is no audit trail specific to procurement approvals; GenericController writes directly without step metadata (`api/controllers/GenericController.php:47-118`).

## 3.6 Compliance & Documentation
- Document tables store raw file URLs and validity dates but lack compliance rules, verification flags, or version lineage (`models/vendor_documents.php:6-10`).
- No automated compliance checks run against procurement records; no cron, workflow, or validation references procurement-specific policies (`api/services/WorkflowEngine.php:625`).

## 3.7 Integration Capabilities
- Procurement data models do not expose outbound hooks or API clients for ERP, CM10, or Entra ID; the codebase contains no connector classes (`models/procurements.php:6-12`).
- Authentication remains local—there is no Entra ID/OIDC configuration in the auth layer (`api/controllers/GenericController.php:23-26`). // TODO: Evaluate identity provider requirements and add OIDC support.

## 3.8 Reporting & Analytics
- IndexedDB schema registers procurement tables but no analytics stores or KPI aggregations, blocking dashboard metrics (`FrontEnd/js/core/schema.js:38-46`).
- There are no procurement reports or widgets on the front-end; no charting modules reference procurement data (`FrontEnd/js/router.js:5-27`).

## 3.9 Automation & AI
- The repository has no AI utilities or summarization services; RFQ handling is entirely manual (`models/rfqs.php:5-11`).
- Vendor recommendation logic is absent—no scoring models or ML integrations exist in PHP or JS (`models/vendor_capabilities.php:6-11`).
- Expiry alerts are not wired for procurement assets; no cron or workflow emits smart notifications for quotes/contracts (`api/services/WorkflowEngine.php:625`).
