---
id: change/bcapps/11941
type: change
title: "#11941 Bug 651577 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 populates CompAuxNum and CompAuxLib columns for payment discount lines on unapplied entries by using G/L entry source type and number as a fallback when customer/vendor ledger entries are unavailable.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit generate file fec
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:02:52.626Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 7de00b421562ccc6e4e88e73981112c89938b981
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11941
    title: "microsoft/BCApps#11941: Bug 651577 CompAuxNum and CompAuxLib columns should be informed for Payment Discount lines on Unapplied Entries in the French Audit File."
    date: "2026-10-01"
    commit: 7de00b421562ccc6e4e88e73981112c89938b981
    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: []
number: 11941
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11941
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-01T12:10:32Z"
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:
  - 651577
systems:
  - finance
quote: CompAuxNum and CompAuxLib were blank on customer/vendor receivables or payables lines created when a payment was unapplied.
joined_against:
  major: "30"
  commit: a4406cfa9e57437fedc49c53c327a199a854491e
---

# #11941 Bug 651577 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 populates CompAuxNum and CompAuxLib columns for payment discount lines on unapplied entries by using G/L entry source type and number as a fallback when customer/vendor ledger entries are unavailable.

[Pull request](https://github.com/microsoft/BCApps/pull/11941) · merged into `main` (BC30) on 2026-10-01 by v-praghav · 2 files (+153 -23), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Unapplication creates G/L entries without corresponding customer/vendor ledger entries, causing missing auxiliary account information
- Added fallback logic using G/L entry source type and source number to identify the party for receivables/payables accounts
- Improved FEC export completeness for unapplied payment scenarios
- Added automated tests for both customer and vendor unapplication cases
- 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#651577
- 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."

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