Back to ER Diagram
Accounts Receivable

Accounts Receivable Logic

Client billing, IPA certification, AR invoice generation, receipt vouchers, client ageing tracking, and revenue recognition.

PostgreSQL
7 Tables
Schema: accounts_receivable
Client Billing

Overview

Accounts Receivable manages the revenue side — from progress-based client billing through IPA (Interim Payment Application) certification, AR invoice generation, and receipt tracking. Billing is milestone-based or measurement-based per contract terms. IPA certification by the Engineer creates the billable amount after applying retention. Client ageing tracks outstanding receivables. Revenue recognition follows percentage-of-completion method.


Measure Progress

Submit IPA

Engineer Certify

Invoice Client

Receive Payment
7
AR Tables
IPA
Certification
Retention
Auto-deduction
POCM
Revenue Recognition

Status States

StatusDescriptionAllowed ActionsNext States
DraftIPA being prepared with measurementsEdit, Add ItemsSubmitted
SubmittedIPA submitted to Engineer for certificationReview, Certify, QueryCertified
CertifiedEngineer certified billable amountGenerate InvoiceInvoiced
InvoicedAR invoice sent to clientTrack PaymentPartially Paid, Paid
Partially PaidPart payment receivedApply Receipt, Follow UpPaid
PaidFull payment receivedReconcileReconciled

Database Schema

accounts_receivable.ipa_certification

  • ipa_id — PK, Interim Payment Application
  • project_id, contract_id — FK references
  • ipa_number, billing_period — Sequential IPA and period
  • gross_amount — Total measured work value
  • previous_certified — Cumulative previously certified
  • current_certified — This IPA certified amount
  • retention_pct, retention_amount — Retention deduction
  • net_amount — Amount payable after deductions
  • certified_by, certified_date — Engineer certification

accounts_receivable.ar_invoice

  • invoice_id — PK
  • ipa_id — FK → accounts_receivable.ipa_certification
  • client_id — FK → accounts_receivable.client_master
  • invoice_number, invoice_date, due_date — Document details
  • gross_amount, gst_amount, tds_receivable, net_amount — Financial breakdown
  • status — Draft → Sent → Partially Paid → Paid

accounts_receivable.receipt_voucher

  • rv_id — PK, receipt voucher
  • client_id — FK → accounts_receivable.client_master
  • receipt_date, amount, payment_mode — Receipt details
  • bank_account_id — FK → treasury.bank_account
  • reference_number — UTR/cheque reference

accounts_receivable.client_ageing

  • ageing_id — PK
  • client_id — FK → accounts_receivable.client_master
  • current_due, days_30, days_60, days_90, over_90 — Ageing buckets
  • total_outstanding — Sum of all receivables
  • snapshot_date — As-of date

AR Process Steps

1

Progress Measurement

Quantity surveyors measure completed work quantities at site. Measurements recorded per BOQ item with supporting sketches and photos.

2

IPA Preparation

Accounts team prepares IPA with measured quantities × rates. Previous certified amounts deducted to get current-period value. Retention percentage applied.

3

Engineer Certification

Independent Engineer reviews IPA, verifies measurements, and certifies billable amount. May reduce quantities or apply interim deductions.

4

Invoice Generation

AR invoice generated from certified IPA. GST calculated based on place of supply rules. TDS receivable noted (client deducts TDS at source).

5

Receipt Tracking

Payments received matched against AR invoices. Part payments allocated proportionally or to specific invoices. Retention release tracked separately.

AR Queries

Client Receivable Summary

-- Outstanding receivables per project
SELECT p.project_name, cm.client_name,
       SUM(ai.net_amount) AS total_billed,
       SUM(rv.amount) AS total_received,
       SUM(ai.net_amount) - COALESCE(SUM(rv.amount), 0) AS outstanding
FROM accounts_receivable.ar_invoice ai
JOIN accounts_receivable.ipa_certification ipa ON ipa.ipa_id = ai.ipa_id
JOIN project.project p ON p.project_id = ipa.project_id
JOIN accounts_receivable.client_master cm ON cm.client_id = ai.client_id
LEFT JOIN accounts_receivable.receipt_voucher rv ON rv.client_id = ai.client_id
GROUP BY p.project_id, cm.client_id;

Validation Rules

Business Rules

  • IPA Sequence: IPA number must be sequential per project; no gaps allowed
  • Certified ≤ Gross: Certified amount cannot exceed gross measured amount
  • Retention Cap: Retention deduction capped at contract-defined limit (typically 5%)
  • Revenue Recognition: Revenue recognized proportional to certified work vs total contract value

Integration Points

Connected Modules

  • Contract: Billing terms and retention rates from contract
  • Project: Progress measurements linked to WBS and BOQ
  • Finance: AR invoices create journal entries; revenue recognition posts to P&L
  • Treasury: Receipts update bank balance and cash flow actuals

Best Practices

Recommended

  • Submit IPA within 5 days of measurement completion
  • Follow up on unpaid invoices at 30/60/90-day intervals
  • Track retention release schedule separately from regular billing
  • Reconcile TDS certificates received with TDS receivable ledger