Back to ER Diagram
Contract Lifecycle

Contract Lifecycle Logic

Contract creation, clause management, amendments, price escalation, milestone tracking, correspondence, and compliance monitoring.

PostgreSQL
9 Tables
Schema: contract
Legal Compliance

Overview

Contract Lifecycle manages all aspects of construction contracts — from drafting with clause library templates through execution, amendments, price escalation claims, milestone-based payments, and formal correspondence. Each contract links to a project, client, and BOQ. Amendments track scope changes with financial impact. Price escalation uses published indices for formula-based adjustments.


Draft Contract

Negotiate

Execute

Amend/Escalate

Close-out
9
Contract Tables
Multi
Clause Library
Formula
Price Escalation
Milestone
Payment Tracking

Status States

StatusDescriptionAllowed ActionsNext States
DraftContract being prepared from templateEdit Clauses, Add MilestonesUnder Review
Under ReviewLegal/Management review in progressApprove, Return, CommentApproved
ExecutedContract signed by both partiesCreate Amendment, Track MilestonesActive
ActiveContract in execution phaseSubmit Claims, Log CorrespondenceSuspended, Completed
SuspendedContract temporarily haltedResume, TerminateActive, Terminated
CompletedAll milestones achieved, defects liability overIssue Completion CertificateClosed
TerminatedContract ended before completionCalculate SettlementClosed

Database Schema

contract.contract_master

  • contract_id — PK, unique contract record
  • project_id — FK → project.project
  • contract_number, contract_type — ID and category (EPC/Item Rate/Lump Sum)
  • client_name, contractor_name — Counterparties
  • contract_value, currency — Financial value
  • start_date, end_date, defects_liability_period — Key dates
  • status — Lifecycle state

contract.clause_library

  • clause_id — PK, reusable clause template
  • clause_code, clause_title — Standard clause identifier
  • clause_text — Full legal text with placeholders
  • category — general | payment | variation | termination | dispute
  • is_mandatory — Required in all contracts of type

contract.contract_amendment

  • amendment_id — PK
  • contract_id — FK → contract.contract_master
  • amendment_number, amendment_date — Sequential tracking
  • scope_change_desc — Description of changes
  • financial_impact, revised_contract_value — Cost impact
  • approved_by — FK → admin.user

contract.price_escalation

  • escalation_id — PK
  • contract_id — FK → contract.contract_master
  • base_index, current_index — Published price index values
  • formula — Escalation formula reference (e.g., IEEMA/WPI)
  • escalation_amount, period — Calculated adjustment per period
  • status — Draft → Submitted → Approved → Paid

contract.contract_milestone

  • milestone_id — PK
  • contract_id — FK → contract.contract_master
  • milestone_desc, planned_date — Milestone details
  • payment_pct, payment_amount — Milestone-linked payment
  • actual_date, ld_applicable — Completion and LD flag

Contract Lifecycle Steps

1

Contract Drafting

Legal team creates contract using clause library templates. Standard clauses auto-populated based on contract type. Custom clauses added for project-specific requirements.

2

Negotiation & Review

Contract reviewed by legal, finance, and project teams. Comments and red-line changes tracked. Multiple review cycles until consensus reached.

3

Execution

Contract signed by authorized signatories. System records execution date and creates milestone payment schedule. Contract value feeds commitment accounting.

4

Amendment Management

Scope changes documented as numbered amendments. Each amendment records financial impact (increase/decrease) and updates revised contract value. Requires multi-level approval.

5

Price Escalation

Monthly/quarterly price adjustment calculated using published indices (WPI, CPI, IEEMA). Formula-based computation with base month and current month indices. Auto-generates claim for approval.

6

Completion & Close-out

All milestones achieved, punch list cleared, defects liability period completed. Final account statement prepared. Completion certificate issued. Retention released per schedule.

Contract Queries

Contract Financial Summary

-- Contract value with amendments and escalation
SELECT c.contract_number,
       c.contract_value AS original_value,
       COALESCE(SUM(ca.financial_impact), 0) AS amendment_value,
       COALESCE(SUM(pe.escalation_amount), 0) AS escalation_value,
       c.contract_value + COALESCE(SUM(ca.financial_impact), 0)
         + COALESCE(SUM(pe.escalation_amount), 0) AS revised_value
FROM contract.contract_master c
LEFT JOIN contract.contract_amendment ca ON ca.contract_id = c.contract_id
LEFT JOIN contract.price_escalation pe ON pe.contract_id = c.contract_id
WHERE c.contract_id = :contract_id
GROUP BY c.contract_id;

Validation Rules

Business Rules

  • Amendment Approval: Amendments above 10% of original value require Director approval
  • Escalation Formula: Base index cannot be modified after contract execution
  • Milestone Total: Sum of milestone payment percentages must equal 100%
  • LD Calculation: LD amount capped at contract-defined maximum (typically 5-10% of contract value)

Integration Points

Connected Modules

  • Project: Contract linked to project for scope and timeline
  • Finance: Contract value feeds commitment accounting; milestone payments trigger AP
  • Claims: Delay events reference contract clauses for EOT/cost claims
  • Document: Contract documents stored with revision control

Best Practices

Recommended

  • Use clause library to standardize contract terms
  • Track all correspondence with formal letter numbering
  • Review price escalation calculations with independent verification
  • Maintain contract risk register linked to project risk module