New Contract Management application with a clause library, contract templates, full contract lifecycle management, and X.509-based digital signatures for Purchase Orders and contracts.
Digital Signature – PDF Rendering Issues Fixed
Resolved edge cases where the signature stamp was misaligned on multi-page PDFs and where certificate loading failed for certain key formats. Stamp now consistently appears on the last page.
Purchase Order PDF – Auto T&C Assembly from Clause Library
Purchase Order PDF now pulls T&C clauses from the Contract Management clause library (when configured) rather than plain text. Clauses are auto-numbered and variable-substituted. Falls back to the legacy plain-text terms_conditions field if no clause library is configured.
Digital Signature – X.509 Certificate Generation
Generate RSA-2048 signing certificates per user directly from the Digital Signature page. Certificates are encrypted with AES-GCM and stored securely. Each certificate records the issuer, validity period, and fingerprint.
Digital Signature – PDF Signing & Verification
Sign Purchase Orders and contract PDFs with a visible signature stamp overlay (name, timestamp, certificate fingerprint). Signed PDFs are verifiable — any tampering after signing invalidates the signature. Uses reportlab for stamp rendering and PyPDF2 for PDF merging.
Contract Management – RBAC Permissions
Six new permissions: cm.view_contract, cm.add_contract, cm.change_contract, cm.delete_contract, cm.approve_contract, cm.manage_signing.
Contract Management App – Clause Library
Centralised library of reusable legal clauses organised into categories (Payment, Delivery, Warranty, Confidentiality, Dispute Resolution, etc.). Each clause supports:
- Version history with change tracking
- Variable substitution (e.g.
{{payment_days}},{{governing_law}}) - Applicability rules (by document type and industry)
- Seed command: 21 standard clauses across 10 categories
Contract Management App – Templates & Contracts
Build contract templates by selecting and ordering clauses from the library. Create contracts from templates with auto-numbered clauses, variable substitution, and lifecycle management (DRAFT → ACTIVE → EXPIRED).
A default Purchase Order T&C template is seeded automatically on installation.