code change · fixFinanceofficial - Microsoftreviewed - checked by Opus

#12696 Fix Norwegian SAF-T 1.30 debit and credit totals

Norwegian SAF-T 1.30 export now correctly calculates debit and credit totals from actual G/L entry amounts instead of stored columns, ensuring totals match exported line amounts even with reversals or negative entries.

Pull request · merged into main (BC30) on 2026-10-28 by AleksanderGladkov · 5 files (+248 -8), 3 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Debit and credit totals in SAF-T 1.30 now calculated from G/L Amount using SQL aggregation instead of stored debit/credit columns
  • Fixes discrepancies when exports contain reversals or negative entries
  • Complete selection totals are repeated in every split file for consistency
  • SAF-T 1.20 behavior remains unchanged
  • Extensive test coverage added for reversals, negative entries, multiple journals, and split scenarios
  • Behaviour changes for users or extensions.

AL objects touched

Also merged into

  • #12899 into releases/29.x on 2026-10-21

Context

  • Work items: AB#653928
  • Labels: Team: Finance
  • Systems: finance
  • From the description: “Calculate debit and credit totals from positive and negative G/L Amount using SQL aggregation and the exporter’s journal filters.”

No source states these links: they share an object, a model read them, or a person found the same subject.

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