---
id: change/bcapps/14437
type: change
title: "#14437 Bugs/659500 NO SAF-T: ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions"
summary: Fixed inverted exchange rate and incorrect currency amount calculations for customer and vendor transactions in Norwegian SAF-T export, plus improved account mapping to include all accounts as required by tax regulations.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit generate saf-t 1.3 file
  - codeunit generate saf-t 1.4 file
  - codeunit saf-t mapping helper
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-11-28T01:07:02.453Z"
  flags: []
generated:
  at: "2026-12-01T00:17:57.990Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 91043eda034d08425a99cab7b9d3f560e5d98d6e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14437
    title: "microsoft/BCApps#14437: Bugs/659500 NO SAF-T: ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions"
    date: "2026-11-27"
    commit: 91043eda034d08425a99cab7b9d3f560e5d98d6e
    t: null
    quote: ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions
links:
  learn: []
  objects:
    - object/codeunit/10692-no
    - object/codeunit/10695-no
    - object/codeunit/10672-no
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Norway/ui-extensions-setup-and-generate-saf-t-files-no
      title: Set Up and Export Norwegian SAF-T Files
      label: possibly related
      why: Documents Norwegian SAF-T file export setup and processing
      by: model
number: 14437
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14437
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-27T21:00:03Z"
author: AndersLarsenMicrosoft
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 7
  additions: 520
  deletions: 120
  al: 3
apps:
  - NorwegianSAFT
objects_touched:
  - key: codeunit/10692
    page: codeunit/10692-no
    type: codeunit
    id: 10692
    name: Generate SAF-T 1.3 File
    app: NorwegianSAFT
    status: modified
  - key: codeunit/10695
    page: codeunit/10695-no
    type: codeunit
    id: 10695
    name: Generate SAF-T 1.4 File
    app: NorwegianSAFT
    status: modified
  - key: codeunit/10672
    page: codeunit/10672-no
    type: codeunit
    id: 10672
    name: SAF-T Mapping Helper
    app: NorwegianSAFT
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 659500
systems:
  - finance
quote: ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions
joined_against:
  major: "30"
  commit: 4d60d10920084a35a6231e5a0ffbd0577b0c399e
---

# #14437 Bugs/659500 NO SAF-T: ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions

> Fixed inverted exchange rate and incorrect currency amount calculations for customer and vendor transactions in Norwegian SAF-T export, plus improved account mapping to include all accounts as required by tax regulations.

[Pull request](https://github.com/microsoft/BCApps/pull/14437) · merged into `main` (BC30) on 2026-11-27 by AndersLarsenMicrosoft · 7 files (+520 -120), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Corrected exchange rate inversion causing wrong CurrencyAmount calculations in SAF-T 1.30 and 1.40 files
- Updated account mapping logic to include all chart of accounts in export regardless of period activity
- Aligns with Norwegian Tax Administration requirements for complete account visibility in SAF-T files
- Enhanced test coverage with additional validation for currency calculations and account handling
- Changes affect both SAF-T 1.3 and 1.4 file generation
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 10692 "Generate SAF-T 1.3 File"](../../objects/codeunit/10692-no.md), NorwegianSAFT (NO layer): modified
- [Codeunit 10695 "Generate SAF-T 1.4 File"](../../objects/codeunit/10695-no.md), NorwegianSAFT (NO layer): modified
- [Codeunit 10672 "SAF-T Mapping Helper"](../../objects/codeunit/10672-no.md), NorwegianSAFT (NO layer): modified

## Context

- Work items: AB#659500
- Labels: Team: Finance
- Systems: finance
- From the description: "ExchangeRate is inverted and calculated CurrencyAmount is wrong for customer/vendor transactions"

## Possibly related

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

- [Set Up and Export Norwegian SAF-T Files](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Norway/ui-extensions-setup-and-generate-saf-t-files-no) — possibly related: Documents Norwegian SAF-T file export setup and processing (model-linked)

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