---
id: change/bcapps/11657
type: change
title: "#11657 Fix VIES integrity check: tolerate country-code prefix on echoed VAT number (uptake fix)"
summary: The VIES integrity check for VAT numbers now tolerates country-code prefixes in echoed responses, normalizing both sides before comparison to prevent false rejection of valid VAT numbers during registration.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit vat registration log mgt.
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:04:18.300Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a9db39960cf2b3ded339e41c4e68fc6b1254a8e1
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11657
    title: "microsoft/BCApps#11657: Fix VIES integrity check: tolerate country-code prefix on echoed VAT number (uptake fix)"
    date: "2026-09-21"
    commit: a9db39960cf2b3ded339e41c4e68fc6b1254a8e1
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/249
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11657
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11657
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-21T19:46:21Z"
author: dcenic
author_type: User
community_contribution: false
labels:
  - "Ownership: Manual"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 1
  additions: 18
  deletions: 1
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/249
    page: codeunit/249
    type: codeunit
    id: 249
    name: VAT Registration Log Mgt.
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 650565
systems:
  - finance
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11657 Fix VIES integrity check: tolerate country-code prefix on echoed VAT number (uptake fix)

> The VIES integrity check for VAT numbers now tolerates country-code prefixes in echoed responses, normalizing both sides before comparison to prevent false rejection of valid VAT numbers during registration.

[Pull request](https://github.com/microsoft/BCApps/pull/11657) · merged into `main` (BC30) on 2026-09-21 by dcenic · 1 file (+18 -1), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed a regression where VIES responses that echo the VAT number with its country-code prefix were wrongly rejected as mismatches
- Both the request and response numbers are stripped of the prefix before the integrity check compares them
- Removes the hard block on saving a VAT Registration No., because the check runs in its OnValidate
- Numbers or countries that really differ are still rejected
- Fixes 10 failing tests in codeunit 134192, which run only in NAV uptake with a mock service
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 249 "VAT Registration Log Mgt."](../../objects/codeunit/249.md), Base Application: modified

## Context

- Work items: AB#650565
- Labels: Ownership: Manual, Team: Finance
- Systems: finance

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
