---
id: change/bcapps/12051
type: change
title: "#12051 [Peppol] Fix Remittance Advice XML line count, Note order and invoice reference"
summary: The Peppol remittance advice XML export now correctly reports the actual line count, orders note elements according to XSD requirements, and uses the vendor invoice number for invoice references.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit export remit. advice peppol30
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:02:50.402Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: ee19b131a8f51220a050fd3bc03c5583d4dc2a52
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12051
    title: "microsoft/BCApps#12051: [Peppol] Fix Remittance Advice XML line count, Note order and invoice reference"
    date: "2026-10-01"
    commit: ee19b131a8f51220a050fd3bc03c5583d4dc2a52
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/37208
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 12051
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12051
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-01T09:25:35Z"
author: GediminasGaubys
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 85
  deletions: 9
  al: 1
apps:
  - PEPPOL
objects_touched:
  - key: codeunit/37208
    page: codeunit/37208
    type: codeunit
    id: 37208
    name: Export Remit. Advice PEPPOL30
    app: PEPPOL
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 648724
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #12051 [Peppol] Fix Remittance Advice XML line count, Note order and invoice reference

> The Peppol remittance advice XML export now correctly reports the actual line count, orders note elements according to XSD requirements, and uses the vendor invoice number for invoice references.

[Pull request](https://github.com/microsoft/BCApps/pull/12051) · merged into `main` (BC30) on 2026-10-01 by GediminasGaubys (community contribution) · 2 files (+85 -9), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- LineCountNumeric element now reflects the actual number of lines instead of always showing zero
- Line-level Note elements are positioned immediately after ID elements to match XSD schema requirements
- Invoice references now prioritize the vendor's external document number, falling back to the system document number
- InvoicingPartyReference element is no longer emitted from the export
- New test validates all three corrections
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 37208 "Export Remit. Advice PEPPOL30"](../../objects/codeunit/37208.md), PEPPOL: modified

## Context

- Work items: AB#648724
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Integrations
- Systems: development

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).
