Urgent.News

What's breaking now, across thousands of outlets.

Tech

Three-Way Invoice Matching: Automating AP in Custom ERP

Accounts payable is where a growing distributor quietly loses money: a supplier bills 500 units when 480 arrived, a price creeps up two percent, an invoice gets paid twice because it came in by email and by post. Three-way matching (purchase order, goods receipt, invoice) is the control that stops this, and in a custom ERP it is a small, well-defined piece of software. Built badly, it becomes a…

Three-way invoice matching is an essential control mechanism for preventing errors in accounts payable, such as overcharging or incorrect quantities. It involves comparing three pieces of data before approving an invoice: the purchase order, goods receipt, and invoice. The process ensures that the prices, items, and quantities align properly, with some acceptable tolerances to accommodate normal business fluctuations.

In a custom ERP system, implementing three-way matching is a focused piece of software that helps maintain control over this critical aspect of finance. However, building it poorly can create a backlog of exceptions that no one clears. The author, Loop Origin, has spent nine years developing order, inventory, and finance modules in Laravel, Vue, Nuxt, and PostgreSQL, and this guide aims to cover all aspects of three-way invoice matching.

The data model is structured around individual lines rather than document totals. There are three main tables: purchase order lines (po_lines), goods receipt lines (grn_lines), and invoice lines (invoice_lines). Each line includes essential information like SKU, quantity, and unit price. The PO line table supports multiple match types, including two-way and three-way matching. Goods receipt and invoice lines track received quantities and approved invoices, respectively.

A crucial detail is the prevention of duplicate invoice numbers, as the same invoice number should never be submitted by a supplier. Additionally, the system must account for partial deliveries that might otherwise lead to double payments.

Matching rules and tolerances are essential to adapt to various business policies. These rules are typically defined per supplier or category, with a company-wide default in case no specific rule exists. The author emphasizes that hard-coding tolerance values like 2% is a frequent mistake found in inherited AP code. The exact values for each rule, such as price and quantity comparisons, must be carefully considered to prevent overbilling or under-receipting.

By following this structured approach to three-way invoice matching, mid-market importers and distributors can maintain financial integrity while accommodating the unique needs of their business.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Eliminating Server Costs and Latency with Browser-Native Image Processing

As developers, our default instinct for deterministic data transformations is often spinning up a Node.js backend, configuring an S3 bucket, and managing temporary storage cron jobs.

  • Developers perform data transformations on server-side, causing overhead.
  • Browser-native image processing eliminates infrastructure costs and ensures data privacy.
  • JavaScript pipeline converts WebP to PNG locally, providing zero latency and privacy.

Barracuda ESG Exploited: Patch vs Admin UI Lockdown

Barracuda ESG exploited is no longer a theoretical risk. Barracuda Networks confirmed on 9 November 2026 that attackers are chaining CVE-2026-116606 and CVE-2026-111560 against its Email Security…

  • Barracuda confirms vulnerabilities CVE-2026-116606 and CVE-2026-111560 in ESG.
  • Exploits allow pre-authentication authorisation bypass and command injection.
  • Patching alone insufficient; immediate UI restriction recommended.

Free GST Billing Software in India (2026): What Actually Works for Small Businesses

The GST Billing Problem Most Indian MSMEs Ignore If you run a small business in India, you already know that GST billing is not just about printing an invoice.

  • GST invoicing requires 16 mandatory fields, non-compliance renders invoice invalid
  • Interstate supplies need IGST, not CGST plus SGST, to allow ITC claim
  • HSN code requirements vary by turnover; 4-digit for up to Rs 5 crore, 6-digit above

More from Saturday 14 November →