---
id: change/bcapps/9349
type: change
title: "#9349 [master]-[ES][Cartera Bills] Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed"
summary: Fixed an issue where applying a foreign-currency payment to a bill that generates a gain-loss entry could not be reversed in the Spanish localization.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit gen. jnl.-post line
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:12:38.189Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 4e4275b47fa42213942d4525364e976312ce8589
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9349
    title: "microsoft/BCApps#9349: [master]-[ES][Cartera Bills] Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed"
    date: "2026-07-15"
    commit: 4e4275b47fa42213942d4525364e976312ce8589
    t: null
    quote: Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed
links:
  learn: []
  objects:
    - object/codeunit/12
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9349
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9349
kind: pr
base_branch: main
major: "30"
merged_at: "2026-07-15T05:21:43Z"
author: MSNehaNawal
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 162
  deletions: 11
  al: 1
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:
  - 642151
systems:
  - finance
quote: Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #9349 [master]-[ES][Cartera Bills] Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed

> Fixed an issue where applying a foreign-currency payment to a bill that generates a gain-loss entry could not be reversed in the Spanish localization.

[Pull request](https://github.com/microsoft/BCApps/pull/9349) · merged into `main` (BC30) on 2026-07-15 by MSNehaNawal (community contribution) · 2 files (+162 -11), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Reversal of foreign-currency payments with gain-loss entries now works correctly
- Issue affected the Cartera Bills functionality in Spanish localization
- Changes made to Gen. Jnl.-Post Line codeunit posting logic
- Test scenarios added to verify the fix
- Bug 642151 resolved
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#642151
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: finance
- From the description: "Applying a foreign-currency payment to a bill that leads to gain-loss entry cannot be reversed"

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