# Module 2 Remediation TODOs Action items derived from `docs/references/gap-analysis-module-2.md`. Track each task until the requirement transitions to ✅ in the gap analysis. ## 2.1 Purchase Requisition - [x] Extend PR DTOs/entities/UI to capture supplier, VAT type, procurement method, company code, contract number (`piam-api` PR DTOs & `piam-web` form). - [x] Surface last purchase price, stock on hand, and packaging units in the PR item picker (`piam-web` procurement form + item services). - [x] Remove automatic approve-on-submit flow; route submissions to workflow reviewers only (`piam-web` purchase-requisition form logic). - [x] Add PR search filters for company/vendor and expose those columns in the workspace list. - [x] Support manual PR numbering and contract metadata persistence (`piam-api` domain + repository). - [x] Enforce editable-price permissions, automated vendor pricing guardrails, and inventory threshold controls. ## 2.2 Request for Quotation - [x] Block supplier bids submitted after `submissionDeadlineUtc` in portal services (`SupplierPortalService`). - [x] Deliver side-by-side bid comparison UI with automatic best-price highlighting (`piam-web` RFQ detail component). ## 2.3 Purchase Orders - [x] Introduce VAT type/department fields in PO header DTOs and Angular form. - [x] Add VAT modes (gross/net toggles) and per-line tax splits to item grid (`PurchaseOrderItemDto` + UI). - [x] Implement manual/templated PO numbering and VAT schema configuration (`PurchaseOrderRepository` + UI). - [x] Add support for multi-schedule milestones, freebies, discounts, and per-line tax calculations (PO domain model & UI). - [x] Require explicit approval workflow steps in the UI instead of auto-submit, and implement spend-based controls/gates (`purchase-order-form` component + approval routing). - [x] Provide PDF/email distribution workflows and e-signature capture for approved POs. - [x] Persist change-order history and expose PO revision logs (revision tracking and document versioning). - [x] Enhance PO inquiries with PO-type filters and due-date alerting. - [x] Create financial postings (AP, GL, withholding tax, deposit tracking) and attachment storage for PO documents. ## 2.4 Goods Receipt Note - [x] Build real procurement UI for GRN drafts tied to backend services (replace placeholder component in `procurement-goods-receipts.component`). - [x] Allow non-PO receiving paths and add receiving warehouse/delivery note fields (header capture). - [x] Capture packaging conversions, freebies, discounts, and VAT values per received item (item grid enhancements). - [x] Add role-based permissions/audit logging for GRN operations (beyond generic API authorization). - [x] Support direct-to-department receipts that bypass inventory storage. - [x] Provide GRN print/export endpoints and barcode label generation. - [x] Persist and calculate receipt-level VAT/discount totals (financial calculations on GRN). ## 2.5 Return to Supplier - [x] Implement complete return-to-supplier backend workflow (API, repository, domain models). - [x] Replace mock UI data in `return-to-supplier-workspace.component` with live integrations. ## 2.6 Procurement Documents & Reports - [ ] Deliver canned PR/PO/GRN reports with PDF/Excel export in the procurement workspace. - [ ] Surface module-specific procurement dashboards (not just generic analytics) summarizing pipeline by method/status as described in the spec. - [ ] Create dedicated UI to slice and filter procurement results by procurement method in real-time. ## 2.7 Integrations & Automation - [ ] Integrate procurement events with GL and asset capitalization modules for financial postings. - [ ] Provide cross-module audit workspace consolidating budget, procurement, accounting, and inventory data. ## 2.8 Additional Features - [ ] Add configurable reorder points/alerts and UI around AI requisition suggestions. - [ ] Enrich PO data with VAT breakdowns, deposits, guarantees, and discount aggregates. - [ ] Capture procurement timeline metadata (submission deadlines, officials, automatic workday calendars, and payment scheduling) with holiday-aware calculations.