insonl
← journal

Duplicate Supplier Invoice Detection in ERP

date
20 November 2026
by
Insonl
read
7 min read

Duplicate supplier invoices can arrive in different forms—such as a PDF reminder after an e-invoice, a reissued bill with a suffix, a number keyed without a separator, or an invoice under a duplicate vendor card.

Three-way invoice matching compares invoice prices to purchase orders and quantities to matched receipts, while separate duplicate supplier invoice detection in ERP also covers non-PO intake, recurring services, and partial PO billings before posting. After payment, resolving a duplicate may require a vendor credit or refund.

This guide covers why raw invoice numbers fail as keys, how to design a composite identity key, which near matches belong in review queues, how to route credits and corrections, and where AI extraction fits beside deterministic ERP rules.

Why raw invoice numbers fail as a unique key

Checking an invoice number string alone misses duplicates and blocks unrelated bills.

In Peppol BIS Billing 3.0, cbc:ID (BT-1) uniquely identifies an invoice “within the business context, time-frame, operating systems and records of the Seller,” with no identification scheme attached. The identifier is scoped to the seller’s numbering context; if a seller reuses numbers across documented series or periods, account for that when matching. Two suppliers can legitimately issue INV-1001 the same week.

Three ERP settings shape raw-number checks:

  • Mandatory external document numbers. In Business Central’s purchase invoice guide, Ext. Doc. No. Mandatory on Purchases & Payables Setup requires an external number in Vendor Invoice No. (purchase invoices and PO invoicing), Vendor Cr. Memo No. (credit memos and return orders), and External Document No. on nonrecurring general journal lines (Account Type = Vendor; Document Type = Invoice, Credit Memo, Finance Charge Memo, or Reminder). Vendor Order No. and Your Reference do not satisfy the rule, and Find Entries excludes Your Reference from external-document-number searches.
  • Field length limits. Per Dynamics 365 Finance’s vendor invoices overview, version 10.0.40 added Extend the length of invoice number for vendor invoice to raise the limit from 20 to 50 characters in the vendor invoice and invoice journal (after a Lifecycle Services ticket enables the EnableEdtStringDatabaseStringLengthAttributeInComputation flight). If intake truncates long references, distinct numbers can collapse to the same value.
  • Validation timing. Under Accounts payable > Setup > Accounts payable parameters > Invoice, Check the invoice number used supports Reject duplicate and Reject duplicates within fiscal year (using the posting date during posting, per Microsoft’s vendor invoice dates guide). Enable the duplicate-invoice workflow prohibition in Feature management and set Check the invoice number used to Reject duplicate; Finance then blocks workflow submission when the number exists on a posted invoice.

Define a supplier-and-invoice identity key

Beyond native ERP settings, build a custom composite-key control across unposted drafts and posted vendor ledger entries across every channel (PDFs, portals, Peppol/EDI, journals):

  1. Legal entity. Scopes uniqueness to the paying company while supporting cross-entity audits.
  2. Canonical supplier identity. Display names (such as a name with and without “Ltd.”) hide duplicate vendor cards. In Peppol BIS Billing 3.0, cbc:EndpointID (BT-34) holds the seller’s electronic address; separately, BR-CO-26 requires at least one of Seller ID BT-29 (cac:PartyIdentification/cbc:ID, excluding SEPA creditor references), legal registration ID BT-30 (cac:PartyLegalEntity/cbc:CompanyID), or Seller VAT ID BT-31 (cac:PartyTaxScheme/cbc:CompanyID, scheme VAT). Business Central’s e-documents purchase guide matches incoming e-documents in order: GLN, VAT Registration No., Participation Identifier (from Service Participant via E-Document Service Participation on the vendor card), then Name and Address. Apply a similar registry-ID-first custom policy across channels.
  3. Document class. Separate invoices from credit memos so adjustments deduplicate on their own document number while citing an invoice for application when available.
  4. Original identifier and scope. Preserve the original supplier identifier for traceability. Enforce uniqueness within the agreed numbering scope, adding a verified series or period only for legitimate reuse. Compute a separate normalized string (case, whitespace, punctuation) for candidate matching.

Pair native intake rules with custom checks. Business Central’s e-documents purchase process blocks batch-import duplicates sharing vendor, external document number, and date, and lets admins remove unprocessed duplicates via Delete Related Document (processed e-documents linked to purchase documents cannot be deleted). That stops identical batch replays; a custom cross-channel check can flag a reformatted or redated copy when intake resolves the same supplier and invoice identity.

Account for reversals explicitly. From Posted Purchase Invoices, Business Central’s correction and cancellation guide states that Correct and Cancel post a corrective purchase credit memo and set Canceled to Yes (Correct also creates an editable purchase invoice), while paid or combined-receipt invoices require a manual credit memo. As custom policy, keep canceled entries for audit, supersede an unposted original, verify reversal of a posted unpaid original, and for a paid original require AP to verify the credit, refund, or net adjustment and confirm the remaining payable before releasing a replacement.

Hard blocks vs. near-match review queues

In a custom control layer, hard-block exact matches on (legal_entity, canonical_vendor_id, document_class, original_inv_no) within the agreed numbering scope against active pending or posted bills.

Route matches created only by stripping punctuation or zeros, or fixing OCR swaps (0/O, 1/I), to review unless a documented supplier rule defines those variants as equivalent. Route soft matches (same vendor, amount, date) to review rather than auto-rejecting.

Signal class Custom trigger Action Owner Resolution
Exact key Same entity, vendor, class, exact number in scope (active) Hard block AP Ops Reject duplicate or confirm reversal
Format / OCR drift Match only after stripping separators/zeros or 0/O swap Hold AP Clerk Compare files; fix or discard
Cross-vendor-card Distinct vendor IDs sharing VAT/registry ID or bank; same number or amount+date Hold Vendor Master Merge or block duplicate card
Same vendor, total, date Different numbers, same vendor, currency, total, date Hold AP + Requester Verify separate bill vs. renumber
Explicit correction Replacement ref or code 384 (including same-number 384) Route first AP Specialist Supersede unposted; verify reversal if unpaid; if paid, verify the credit, refund, or net adjustment and confirm the remaining payable
Credit / negative bill Credit note or negative invoice (dedup on own document number) Credit queue AP Specialist Apply via eligible preceding ref; hold missing, ambiguous, or ineligible refs for AP review

Attach a reason code and links to both files so reviewers clear holds without email searches.

Routing credits, negative invoices, and corrected bills

Peppol BIS Billing 3.0 models adjustments explicitly:

  • Type codes. The invoice type code list separates commercial invoices (380) from corrected invoices (384, revised information differing from an earlier submission of the same invoice); the credit note type code list defines credit notes (381, 81 goods/services, 83 financial adjustments).
  • Negative invoices. Section 5.6 requires receivers to support credit notes (381) and negative invoices (380, showing a negative grand total in Peppol’s example, where reversed line quantities and amounts can make a previously negative line positive while unit prices stay unchanged). Use document type and amounts together.
  • Preceding references. Under section 11.4, a credit note or negative invoice can cite preceding invoices via BG-3 (cac:BillingReference), supplying the invoice number and—when non-unique—the issue date.

For PDFs, Business Central’s e-documents purchase guide notes that built-in analysis can recognize credit notes and cancellation invoices from content—not negative amounts or the word “credit” alone—since credit notes can show positive amounts, while receipts, remittance advices, and statements are not credit notes merely for mentioning credits. On drafts, Business Central suggests Applies-to Doc. No. only when exactly one open posted invoice of the pay-to vendor matches in an applicable currency (checking ERP and vendor numbers; cross-currency uses Appln. between Currencies); PDFs citing multiple invoices get no automatic selection, and finalization stops if a selected invoice closes or its currency becomes ineligible.

In custom ERP pipelines, route explicit corrections—including same-number 384 bills—before duplicate checks: supersede unposted originals, verify reversal of posted unpaid originals, and for paid originals require AP to verify the credit, refund, or net adjustment and confirm the remaining payable before releasing a replacement. Deduplicate each credit note or negative invoice on its own document number, apply via the preceding reference when it identifies an eligible target, and send missing, ambiguous, or ineligible references to AP review.

Illustrative worked example: four independent scenarios

(Illustrative example—not a real company or an Insonl client.)

Vendor V-2041 has one active posted, unpaid invoice FRT-008412 (2026-10-05, $4,250.00). Consider four independent incoming scenarios evaluated against that same open invoice:

Incoming file Extracted header Custom rule triggered Outcome
Reminder PDF FRT-008412, 2026-10-05, $4,250.00 Exact abbreviated key V-2041|INV|FRT-008412 (same entity) matches active bill Hard block — reject duplicate
Rescan PDF FRT008412 or FRT-OO8412 Exact key misses; normalized/OCR near-match fires Hold -> AP Clerk — compare to FRT-008412
Revised PDF FRT-008412-R1, 2026-10-09, $4,100.00, “Replaces FRT-008412” Explicit correction routed before duplicate check Route -> AP Specialist — verify reversal of unpaid original first
Credit memo CN-00119, 2026-10-10, $150.00, cites FRT-008412 Deduplicated on CN-00119; applies if FRT-008412 remains open and eligible Route -> Credit queue — apply to FRT-008412

Where AI extraction fits beside deterministic ERP checks

Keep duplicate blocking deterministic. Composite uniqueness, normalization lookups, open-and-posted scans, registry-ID matching, and workflow blocks belong in ERP rules and database constraints—never in an LLM judging similarity.

AI fits upstream where PDFs starve rules of structured fields, as examined in AI document and order processing operations:

  • Schema-bound extraction. Pulling VAT/registry IDs, raw invoice numbers, dates, currencies, totals, and preceding references before validation.
  • Pre-ledger classification. Separating invoices from credit notes, corrections, statements, reminders, and remittance advices.
  • Review packets. Bundling incoming files, candidate matches, PO/receipt links, and payment status onto one screen.

Evaluate extraction on a labeled sample of historical PDFs—scans, statements, credit notes—tracking invoice-number and VAT/registry-ID error rates before automating routing.

Audit your AP intake before adding AI

Insonl is a Ho Chi Minh City engineering studio building ERP systems and operational AI. If duplicate bills, mixed PDF and e-invoice intake, or manual AP checks create rework, start with our free AI workflow audit.

The audit is free. Insonl charges for implementation work you choose afterward.

Sources