---
id: change/bcapps/13225
type: change
title: "#13225 Fix Bug 656636 CompAuxNum and CompAuxLib columns should be informed for Payment Discount lines on Unapplied Entries in the French Audit File"
summary: The FEC audit file export now correctly populates CompAuxNum and CompAuxLib columns for payment discount lines on unapplied entries by using a fallback lookup based on G/L entry source type and source number.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - codeunit generate file fec
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-11-11T00:57:28.137Z"
  flags: []
generated:
  at: "2026-11-28T00:12:53.289Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: d46542bef3883b9f0f55e85d7cdf99201b430348
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13225
    title: "microsoft/BCApps#13225: Fix Bug 656636 CompAuxNum and CompAuxLib columns should be informed for Payment Discount lines on Unapplied Entries in the French Audit File"
    date: "2026-11-09"
    commit: d46542bef3883b9f0f55e85d7cdf99201b430348
    t: null
    quote: CompAuxNum and CompAuxLib were blank on customer/vendor receivables or payables lines created when a payment was unapplied.
links:
  learn: []
  objects:
    - object/codeunit/10826-fr
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/France/how-to-export-general-ledger-entries-for-tax-audits
      title: Export General Ledger Entries Tax Audits [FR]
      label: possibly related
      why: Documents French audit file export format including payment discount line details for compliance.
      by: model
number: 13225
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13225
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-11-09T21:14:50Z"
author: v-praghav
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 153
  deletions: 23
  al: 1
apps:
  - FECAuditFile
objects_touched:
  - key: codeunit/10826
    page: codeunit/10826-fr
    type: codeunit
    id: 10826
    name: Generate File FEC
    app: FECAuditFile
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 656636
systems:
  - finance
quote: CompAuxNum and CompAuxLib were blank on customer/vendor receivables or payables lines created when a payment was unapplied.
joined_against:
  major: "29"
  commit: 2c932722a2917f4592f1541d4d85dc247c8942ac
---

# #13225 Fix Bug 656636 CompAuxNum and CompAuxLib columns should be informed for Payment Discount lines on Unapplied Entries in the French Audit File

> The FEC audit file export now correctly populates CompAuxNum and CompAuxLib columns for payment discount lines on unapplied entries by using a fallback lookup based on G/L entry source type and source number.

[Pull request](https://github.com/microsoft/BCApps/pull/13225) · merged into `releases/29.x` (BC29) on 2026-11-09 by v-praghav · 2 files (+153 -23), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed missing auxiliary account information (CompAuxNum and CompAuxLib) in FEC exports for unapplied payment entries
- Added fallback logic using G/L entry source type and source number when transaction-based lookup fails
- Unapplication transactions now properly match to customer and vendor information
- Added automated tests to validate correct handling of unapplied customer and vendor entries
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 10826 "Generate File FEC"](../../objects/codeunit/10826-fr.md), FECAuditFile (FR layer): modified

## Context

- Work items: AB#656636
- Labels: Team: Finance
- Systems: finance
- From the description: "CompAuxNum and CompAuxLib were blank on customer/vendor receivables or payables lines created when a payment was unapplied."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Export General Ledger Entries Tax Audits \[FR\]](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/France/how-to-export-general-ledger-entries-for-tax-audits) — possibly related: Documents French audit file export format including payment discount line details for compliance. (model-linked)

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