---
id: change/bcapps/9958
type: change
title: '#9958 [Main] -Detail Trial Balance - Running Balance Incorrect When "Include Closing Entries" Is Disabled'
summary: Fixed the Detail Trial Balance report so that excluded closing entries no longer incorrectly accumulate into the running balance column, ensuring displayed balances reconcile with visible entries.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report detail trial balance
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:55.797Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: f6877f69cdd6648fe82daef92875f81cfa234f6c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9958
    title: 'microsoft/BCApps#9958: [Main] -Detail Trial Balance - Running Balance Incorrect When "Include Closing Entries" Is Disabled'
    date: "2026-08-07"
    commit: f6877f69cdd6648fe82daef92875f81cfa234f6c
    t: null
    quote: Reordered the trigger to compute ClosingEntry and perform CurrReport.Skip() before the GLBalance := GLBalance + Amount line
links:
  learn: []
  objects:
    - object/report/4
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9958
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9958
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-07T10:14:14Z"
author: DhavalMore88
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: 7
  additions: 405
  deletions: 22
  al: 2
apps:
  - Base Application
objects_touched:
  - key: report/4
    page: report/4
    type: report
    id: 4
    name: Detail Trial Balance
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Finance/GeneralLedger/Reports/DetailTrialBalance.Report.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 645090
systems:
  - finance
quote: Reordered the trigger to compute ClosingEntry and perform CurrReport.Skip() before the GLBalance := GLBalance + Amount line
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9958 [Main] -Detail Trial Balance - Running Balance Incorrect When "Include Closing Entries" Is Disabled

> Fixed the Detail Trial Balance report so that excluded closing entries no longer incorrectly accumulate into the running balance column, ensuring displayed balances reconcile with visible entries.

[Pull request](https://github.com/microsoft/BCApps/pull/9958) · merged into `main` (BC30) on 2026-08-07 by DhavalMore88 (community contribution) · 7 files (+405 -22), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Closing entries that are skipped from printing were still contributing to the running balance calculation
- Reordered the trigger to check and skip closing entries before accumulating amounts into GLBalance
- Running balance now accurately reflects only the entries actually displayed on the report
- Matches existing pattern used for reversed entries and corrections-only filters
- Added test cases across multiple localization layers to verify the fix
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 4 "Detail Trial Balance"](../../objects/report/4.md), Base Application: modified
- `src/Layers/BE/BaseApp/Finance/GeneralLedger/Reports/DetailTrialBalance.Report.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#645090
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: finance
- From the description: "Reordered the trigger to compute ClosingEntry and perform CurrReport.Skip() before the GLBalance := GLBalance + Amount line"

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