← All work

Revenue Reconciliation Automation

An enterprise financial reconciliation engine in Python that cross-checks raw original tax invoices against processed ERP records for PT. Depoguna Bangunan Online (DBO), slashing month-end audit turnaround from 1 week to 1 day.

PythonPandasOpenpyxlData ReconciliationProcess AutomationExcel Reporting

Problem

Finance teams at PT. Depoguna Bangunan Online faced severe month-end bottlenecks manually reconciling thousands of original invoices (Faktur Asli) against internal processed system records in spreadsheets, risking double-processing, tax variances, and an exhaustive 1-week manual checking cycle.

Data

The working records and data signals are described in the local project narrative below.

Approach

Engineered a modular Python reconciliation pipeline featuring regex string normalization, composite multi-key transaction pairing, a 4-tier discrepancy categorization engine (Exact Match, Value Discrepancy, Missing in System, Double Processed), and automated Openpyxl executive audit reporting.

System

Interactive Financial Engineering Console

4-Tier Revenue Reconciliation & Audit Engine

Interactive visualization of the DBO automated revenue audit pipeline. Explore the multi-layer string normalization, composite key matching, anomaly categorization, and automated Openpyxl executive workbook generation.

TOTAL RECONCILED GMVRp 265.750.000Ground-truth tax invoices
100% CLEAN MATCH RATE50.0%Direct to General Ledger
DOUBLE-PAYMENT PREVENTEDRp 63.900.000Zero duplicate leakage
AUDIT TRACEABILITY100%Bi-directional source lineage

Interactive Flow Diagram

End-to-End Reconciliation Data Flow

Click any tier node below to inspect logic
INPUT SOURCE AOriginal Tax Invoices (Faktur Asli)

Raw physical PDF/CSV vendor billing & tax authority files

INPUT SOURCE BProcessed ERP System Records

Internal DBO billing ledgers, purchase vouchers & settlement logs

↓ Vectorized Ingestion & Regex Sanitizer
CORE MATCHING ENGINEComposite 4-Key Pairing & Tax Boundary Verifier

Evaluates Invoice ID + Vendor NPWP + Transaction Date + Gross Nominal (PPN/PPh)

↓ Automated 4-Tier Classification Triage
TIER 01 • EXACT MATCH100% Cleared (Rp 0 Diff)

Zero nominal delta. Auto-approved for financial statements.

👉 View 3 Invoices
TIER 02 • VALUE VARIANCETax / Rounding Delta

Invoice matched but nominal diverged. Flags tax adjustments.

👉 View Flagged Items
TIER 03 • MISSING IN ERPUnrecorded Physical Doc

Source exists but absent in system. Prevents tax deadline penalty.

👉 View Missing Queue
TIER 04 • DOUBLE PROCESSEDDuplicate ERP Voucher

Single invoice posted twice. Immediate reversal alert.

👉 View Critical Alert
NOTE

Executive Summary & Operational Impact:

- Core Challenge: Finance teams at PT. Depoguna Bangunan Online (DBO) spent 5–7 business days every month-end manually cross-referencing thousands of original supplier tax invoices (*Faktur Asli*) against processed ERP ledger records.

- Technical Solution: Built a modular Python financial reconciliation engine (Pandas, Openpyxl) with vectorized string cleaning, composite multi-key transaction pairing, and an automated 4-tier discrepancy classification engine.

- Quantified Impact: Cut month-end audit turnaround by 80%+ (from 1 full week down to 1 day), eliminated 100% of double-processing payment risks, and generated color-coded executive audit workbooks with full bi-directional data lineage.


01. Operational Friction & Month-End Reconciliation Challenges

At PT. Depoguna Bangunan Online (DBO Group), managing nationwide building material marketplace commerce requires continuous cross-verification between two critical financial data sources:

  1. Source A — Original Tax & Commercial Invoices (*Faktur Asli*): Ground-truth documents issued by suppliers, payment channels, and tax authorities.
  2. Source B — Processed System Records (*Faktur Terproses di ERP DBO*): Digital transaction entries logged in internal accounting and billing systems.

Operational Bottlenecks:

  • Exhaustive Manual Checking Cycle: Financial auditors spent 5–7 days per month manually executing VLOOKUP formulas across tens of thousands of transaction lines.
  • Double-Processing & Revenue Leakage Risks: Duplicate invoice entries—where an invoice was recorded or paid twice across different ERP modules—created serious audit liabilities.
  • Tax Variance Discrepancies: Subtle rounding differences, partial credit adjustments, and tax nominal variations (*PPN / PPh*) led to ledger imbalances.

02. The 4-Tier Discrepancy Categorization Engine

MERMAID
9 LINES
flowchart TD
    A["Source A: Original Tax Invoices<br/>(Faktur Asli Records)"] & B["Source B: Processed System Entries<br/>(ERP DBO Ledger Records)"] --> C["Vectorized String Sanitization & Normalization"]
    C --> D["Composite 4-Key Pairing Algorithm<br/>(Invoice ID, NPWP, Date, Nominal)"]
    D --> E{"4-Tier Classification Engine"}
    E -->|"Delta = 0"| F1["Tier 1: 100% Cleared<br/>(Auto-Cleared for General Ledger)"]
    E -->|"Delta > 0"| F2["Tier 2: Tax & Rounding Diff<br/>(Credit / Adjustment Review)"]
    E -->|"Missing in ERP"| F3["Tier 3: Missing in System<br/>(Pre-Tax Filing Entry Queue)"]
    E -->|"Duplicate Found"| F4["Tier 4: Duplicate Processed<br/>(Reversal Alert: Zero Double Pay)"]
    F1 & F2 & F3 & F4 --> G["Automated Openpyxl Executive Workbook<br/>(Turnaround Cut from 1 Wk to 1 Day)"]

The engine parses and categorizes every transaction into one of four definitive financial audit buckets:

TIP

Audit Routing Protocol: Ingested transactions from *Faktur Asli* and *Faktur Terproses* pass through vectorized string sanitization and a composite 4-key matching algorithm before triage into one of four definitive tiers:

- 🟢 Tier 1 (100% Cleared): Exact match (Delta = 0). Auto-cleared for ledger journalization.

- 🟡 Tier 2 (Tax & Rounding Diff): Value mismatch. Generates targeted credit/tax adjustment notes.

- 🔵 Tier 3 (Missing in ERP): Unrecorded invoice. Dispatched to immediate accounting entry queue.

- 🔴 Tier 4 (Double Processed): Dual-posted voucher. Immediate reversal alert to stop payment leakage.

Tier ClassificationDetection Logic & Mathematical CriteriaOperational Action & Audit Routing
Tier 1: 100% Exact MatchInvoice ID_A = Invoice ID_B land vert Nominal_A - Nominal_B vert = 0Automatically cleared and marked ready for final general ledger journalization.
Tier 2: Value Discrepancy / Tax DiffInvoice ID_A = Invoice ID_B land vert Nominal_A - Nominal_B vert > εFlagged with exact delta variance (e.g. tax rounding, partial discount) for targeted finance review.
Tier 3: Missing in SystemRecord_A ∈ Source A land Record_A notin Source BHighlighted as unrecorded physical invoice requiring immediate ERP entry before tax filing deadlines.
Tier 4: Duplicate Processed / Double-EntryCount(Invoice ID_A ∈ Source B) > 1Critical high-priority alert identifying duplicate billing or dual-posted transactions.

03. Real-World Financial Reconciliation Matrix

Sample production transformations demonstrating how the engine normalizes and reconciles complex transaction pairs at PT. Depoguna Bangunan Online:

Source A (Faktur Asli)Source B (Faktur Terproses DBO)Original AmountProcessed AmountVariance (IDR)Classification Tier
INV/2023/DBO/09841INV-2023-DBO-09841Rp 45.250.000Rp 45.250.000Rp 0Tier 1: Exact Match
INV/2023/DBO/09842INV-2023-DBO-09842Rp 12.800.000Rp 12.800.000Rp 0Tier 1: Exact Match
INV/2023/DBO/09843INV-2023-DBO-09843Rp 88.450.000Rp 88.000.000-Rp 450.000Tier 2: Value Variance (Tax Diff)
INV/2023/DBO/09844*Not Found in ERP*Rp 24.150.000—+Rp 24.150.000Tier 3: Missing in System
INV/2023/DBO/09845INV-2023-DBO-09845 (Entry #1)
INV-2023-DBO-09845 (Entry #2)
Rp 63.900.000Rp 63.900.000
Rp 63.900.000
-Rp 63.900.000Tier 4: Duplicate Processed

04. Automated Openpyxl Executive Audit Workbook

The Python engine compiles audit deliverables into an automated Microsoft Excel workbook designed for executive review:

  1. Executive KPI Dashboard Tab:
  • Total Invoiced Gross vs Cleared Net.
  • Variance Breakdown & Prevented Double-Posting Value.
  • High-level summary metrics for monthly controller presentations.
  1. Four Specialized Drill-Down Tabs:
  • Tab 1: *Cleared Exact Matches* (Archive audit trail).
  • Tab 2: *Value Variances* (Color-coded orange for tax rounding investigation).
  • Tab 3: *Missing Invoices* (Immediate queue for accounting journalization).
  • Tab 4: *Critical Duplicate Entries* (Color-coded red for immediate double-posting reversal).
  1. Automated Styling & Formatting:
  • Programmatically sets auto-fitted column widths, freeze-panes, custom accounting formatting (Rp #,##0), and high-contrast conditional alerts.

05. Measurable Enterprise Business Impact

Financial Audit DimensionManual Spreadsheet ProcessAutomated Python ReconciliationEnterprise ROI
Month-End Audit Cycle5 – 7 Business Days< 1 Business Day80%+ Cycle Time Reduction
Execution LatencyHours of manual VLOOKUPs< 2 Minutes ExecutionInstant Discrepancy Flagging
Duplicate Payment Risk~2.5% recurring human error0.00% Double-Posting LeakageZero Duplicate Financial Loss
Audit Compliance TrailDisconnected spreadsheets100% Bi-Directional LineageComplete Audit Readiness

06. Strategic Financial Engineering Lessons

  1. Bi-Directional Discrepancy Classification: Reconciling both *missing-in-system* and *missing-in-source* is essential for bulletproof tax audit compliance.
  2. Decouple Normalization from Rules: Separating text regex cleaning from tax matching rules allows the engine to adapt swiftly to changing invoice formats.
  3. Executive-Friendly Output Formats: Delivering styled, conditional-formatted Excel workbooks drives faster finance team adoption than raw database queries.

Impact

Reduced month-end financial reconciliation from 1 full week down to 1 day, achieved zero-error double-processing detection across tens of thousands of transaction lines, and provided 100% bi-directional audit traceability back to source files.

Lessons

  • Bi-directional discrepancy classification (identifying both missing-in-system and missing-in-source) is essential for bulletproof audit compliance.
  • Decoupling ingestion normalization from reconciliation rules allows the pipeline to adapt quickly to evolving tax regulations and invoice formats.
  • Automated Excel generation with pre-styled conditional formatting accelerates finance team adoption far more effectively than raw database tables.