---
id: change/bcapps/9686
type: change
title: "#9686 [Master] Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications."
summary: Foreign currency unrealized gain/loss posting now selects the correct payables account when multiple posting groups are used, fixing an issue where wrong accounts were chosen during multi-posting group transactions.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit gen. jnl.-post line
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:53.353Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 7968b439f4685300bed6721150890a041f34555c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9686
    title: "microsoft/BCApps#9686: [Master] Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications."
    date: "2026-08-21"
    commit: 7968b439f4685300bed6721150890a041f34555c
    t: null
    quote: Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications
links:
  learn: []
  objects:
    - object/codeunit/12
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9686
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9686
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-21T15:41:08Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 12
  additions: 506
  deletions: 99
  al: 11
apps:
  - Base Application
objects_touched:
  - key: codeunit/12
    page: codeunit/12
    type: codeunit
    id: 12
    name: Gen. Jnl.-Post Line
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 643355
systems:
  - finance
quote: Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9686 [Master] Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications.

> Foreign currency unrealized gain/loss posting now selects the correct payables account when multiple posting groups are used, fixing an issue where wrong accounts were chosen during multi-posting group transactions.

[Pull request](https://github.com/microsoft/BCApps/pull/9686) · merged into `main` (BC30) on 2026-08-21 by Shikhverma · 12 files (+506 -99), 11 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixes selection of the payables account for unrealized gain/loss in FCY applications that involve multiple posting groups
- Changes codeunit 12 Gen. Jnl.-Post Line
- Same change applied to W1 and the APAC, BE, CH, ES, FI, FR, IT, NA, NO and RU layers
- Adds tests in the Test Bank Payment Application codeunit
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 12 "Gen. Jnl.-Post Line"](../../objects/codeunit/12.md), Base Application: modified

## Context

- Work items: AB#643355
- Labels: Team: Finance
- Systems: finance
- From the description: "Incorrect Payables Account Selected for Unrealized Gain/Loss in Multi-Posting Group FCY Applications"

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