Case study / Automation
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.
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
Standardizes raw tax invoices (Faktur Asli) and internal DBO system transaction records
→Cross-checks Normalized Invoice #, Tax ID (NPWP), Transaction Date, and Gross Nominal Values
→Classifies records into 100% Matched, Value Variance, Missing in ERP, and Double-Processed
→Generates color-coded Excel dashboards with KPI summaries and drill-down audit tabs via Openpyxl
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.
Interactive Flow Diagram
End-to-End Reconciliation Data Flow
Raw physical PDF/CSV vendor billing & tax authority files
Internal DBO billing ledgers, purchase vouchers & settlement logs
Evaluates Invoice ID + Vendor NPWP + Transaction Date + Gross Nominal (PPN/PPh)
Zero nominal delta. Auto-approved for financial statements.
Invoice matched but nominal diverged. Flags tax adjustments.
Source exists but absent in system. Prevents tax deadline penalty.
Single invoice posted twice. Immediate reversal alert.
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:
- Source A — Original Tax & Commercial Invoices (*Faktur Asli*): Ground-truth documents issued by suppliers, payment channels, and tax authorities.
- 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
The engine parses and categorizes every transaction into one of four definitive financial audit buckets:
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 Classification | Detection Logic & Mathematical Criteria | Operational Action & Audit Routing |
|---|---|---|
| Tier 1: 100% Exact Match | Invoice ID_A = Invoice ID_B land vert Nominal_A - Nominal_B vert = 0 | Automatically cleared and marked ready for final general ledger journalization. |
| Tier 2: Value Discrepancy / Tax Diff | Invoice 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 System | Record_A ∈ Source A land Record_A notin Source B | Highlighted as unrecorded physical invoice requiring immediate ERP entry before tax filing deadlines. |
| Tier 4: Duplicate Processed / Double-Entry | Count(Invoice ID_A ∈ Source B) > 1 | Critical 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 Amount | Processed Amount | Variance (IDR) | Classification Tier |
|---|---|---|---|---|---|
INV/2023/DBO/09841 | INV-2023-DBO-09841 | Rp 45.250.000 | Rp 45.250.000 | Rp 0 | Tier 1: Exact Match |
INV/2023/DBO/09842 | INV-2023-DBO-09842 | Rp 12.800.000 | Rp 12.800.000 | Rp 0 | Tier 1: Exact Match |
INV/2023/DBO/09843 | INV-2023-DBO-09843 | Rp 88.450.000 | Rp 88.000.000 | -Rp 450.000 | Tier 2: Value Variance (Tax Diff) |
INV/2023/DBO/09844 | *Not Found in ERP* | Rp 24.150.000 | — | +Rp 24.150.000 | Tier 3: Missing in System |
INV/2023/DBO/09845 | INV-2023-DBO-09845 (Entry #1)INV-2023-DBO-09845 (Entry #2) | Rp 63.900.000 | Rp 63.900.000 Rp 63.900.000 | -Rp 63.900.000 | Tier 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:
- Executive KPI Dashboard Tab:
- Total Invoiced Gross vs Cleared Net.
- Variance Breakdown & Prevented Double-Posting Value.
- High-level summary metrics for monthly controller presentations.
- 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).
- 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 Dimension | Manual Spreadsheet Process | Automated Python Reconciliation | Enterprise ROI |
|---|---|---|---|
| Month-End Audit Cycle | 5 – 7 Business Days | < 1 Business Day | 80%+ Cycle Time Reduction |
| Execution Latency | Hours of manual VLOOKUPs | < 2 Minutes Execution | Instant Discrepancy Flagging |
| Duplicate Payment Risk | ~2.5% recurring human error | 0.00% Double-Posting Leakage | Zero Duplicate Financial Loss |
| Audit Compliance Trail | Disconnected spreadsheets | 100% Bi-Directional Lineage | Complete Audit Readiness |
06. Strategic Financial Engineering Lessons
- Bi-Directional Discrepancy Classification: Reconciling both *missing-in-system* and *missing-in-source* is essential for bulletproof tax audit compliance.
- Decouple Normalization from Rules: Separating text regex cleaning from tax matching rules allows the engine to adapt swiftly to changing invoice formats.
- 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.