---
id: change/bcapps/10541
type: change
title: "#10541 [Master] - Slice 641375: [Sustainability] Collect Amount from G/L Entries: track collected entries to prevent double counting"
summary: Sustainability Journal's collect amount function now tracks which G/L entries have been collected to prevent double-counting emissions when running collection over overlapping or adjacent periods.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - page collect amount from g/l entry
  - codeunit sustainability calc. mgt.
  - table sust. jnl. line g/l entry
  - table sustainability jnl. line
  - codeunit sust. entry reverse mgt.
  - page sust. g/l - sust. ledger rel.
system: sustainability
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:04:49.872Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 9c49abbc71f42a6d1497cec3a90315c1619e4a56
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10541
    title: "microsoft/BCApps#10541: [Master] - Slice 641375: [Sustainability] Collect Amount from G/L Entries: track collected entries to prevent double counting"
    date: "2026-09-16"
    commit: 9c49abbc71f42a6d1497cec3a90315c1619e4a56
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/page/6224
    - object/codeunit/6218
    - object/table/6260
    - object/table/6214
    - object/codeunit/6243
    - object/page/6339
    - object/table/6261
    - object/page/6220
    - object/table/6216
    - object/permissionset/6213
    - object/permissionset/6210
    - object/permissionset/6211
    - object/codeunit/6212
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10541
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10541
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-16T17:21:19Z"
author: ViditGupta1277
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 15
  additions: 1267
  deletions: 7
  al: 13
apps:
  - Sustainability
objects_touched:
  - key: page/6224
    page: page/6224
    type: page
    id: 6224
    name: Collect Amount from G/L Entry
    app: Sustainability
    status: modified
  - key: codeunit/6218
    page: codeunit/6218
    type: codeunit
    id: 6218
    name: Sustainability Calc. Mgt.
    app: Sustainability
    status: modified
  - key: table/6260
    page: table/6260
    type: table
    id: 6260
    name: Sust. Jnl. Line G/L Entry
    app: Sustainability
    status: added
  - key: table/6214
    page: table/6214
    type: table
    id: 6214
    name: Sustainability Jnl. Line
    app: Sustainability
    status: modified
  - key: codeunit/6243
    page: codeunit/6243
    type: codeunit
    id: 6243
    name: Sust. Entry Reverse Mgt.
    app: Sustainability
    status: modified
  - key: page/6339
    page: page/6339
    type: page
    id: 6339
    name: Sust. G/L - Sust. Ledger Rel.
    app: Sustainability
    status: added
  - key: table/6261
    page: table/6261
    type: table
    id: 6261
    name: Sust. G/L - Sust. Ledger Rel.
    app: Sustainability
    status: added
  - key: page/6220
    page: page/6220
    type: page
    id: 6220
    name: Sustainability Ledger Entries
    app: Sustainability
    status: modified
  - key: table/6216
    page: table/6216
    type: table
    id: 6216
    name: Sustainability Ledger Entry
    app: Sustainability
    status: modified
  - key: permissionset/6213
    page: permissionset/6213
    type: permissionset
    id: 6213
    name: Sustainability Edit
    app: Sustainability
    status: modified
  - key: permissionset/6210
    page: permissionset/6210
    type: permissionset
    id: 6210
    name: Sustainability - Objects
    app: Sustainability
    status: modified
  - key: permissionset/6211
    page: permissionset/6211
    type: permissionset
    id: 6211
    name: Sustainability Read
    app: Sustainability
    status: modified
  - key: codeunit/6212
    page: codeunit/6212
    type: codeunit
    id: 6212
    name: Sustainability Post Mgt
    app: Sustainability
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 641375
systems:
  - sustainability
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10541 [Master] - Slice 641375: [Sustainability] Collect Amount from G/L Entries: track collected entries to prevent double counting

> Sustainability Journal's collect amount function now tracks which G/L entries have been collected to prevent double-counting emissions when running collection over overlapping or adjacent periods.

[Pull request](https://github.com/microsoft/BCApps/pull/10541) · merged into `main` (BC30) on 2026-09-16 by ViditGupta1277 · 15 files (+1267 -7), 13 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New relation table links collected G/L entries to their corresponding sustainability entries
- Collect function excludes previously collected entries based on the relation table
- Indexed collected marker maintains fast exclusion filtering on large ledgers
- Reversing sustainability entries removes their links, making entries collectable again
- Follows the existing G/L to Item Ledger Relation model
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 6224 "Collect Amount from G/L Entry"](../../objects/page/6224.md), Sustainability: modified
- [Codeunit 6218 "Sustainability Calc. Mgt."](../../objects/codeunit/6218.md), Sustainability: modified
- [Table 6260 "Sust. Jnl. Line G/L Entry"](../../objects/table/6260.md), Sustainability: added
- [Table 6214 "Sustainability Jnl. Line"](../../objects/table/6214.md), Sustainability: modified
- [Codeunit 6243 "Sust. Entry Reverse Mgt."](../../objects/codeunit/6243.md), Sustainability: modified
- [Page 6339 "Sust. G/L - Sust. Ledger Rel."](../../objects/page/6339.md), Sustainability: added
- [Table 6261 "Sust. G/L - Sust. Ledger Rel."](../../objects/table/6261.md), Sustainability: added
- [Page 6220 "Sustainability Ledger Entries"](../../objects/page/6220.md), Sustainability: modified
- [Table 6216 "Sustainability Ledger Entry"](../../objects/table/6216.md), Sustainability: modified
- [Permission set 6213 "Sustainability Edit"](../../objects/permissionset/6213.md), Sustainability: modified
- [Permission set 6210 "Sustainability - Objects"](../../objects/permissionset/6210.md), Sustainability: modified
- [Permission set 6211 "Sustainability Read"](../../objects/permissionset/6211.md), Sustainability: modified
- [Codeunit 6212 "Sustainability Post Mgt"](../../objects/codeunit/6212.md), Sustainability: modified

## Context

- Work items: AB#641375
- Labels: AL: Apps (W1), Team: Finance
- Systems: sustainability

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