Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

XRechnung - FormatDecimal with Two Decimal Places - #29846

Merged
Jesper Schulz-Wedde (JesperSchulz) merged 4 commits into
microsoft:mainfrom
pri-kise:29717-xrechnung-format-amount-optional-with-all-two-decimals
Apr 8, 2026
Merged

Jesper Schulz-Wedde (JesperSchulz) merged 4 commits into
microsoft:mainfrom
pri-kise:29717-xrechnung-format-amount-optional-with-all-two-decimals

Conversation

@pri-kise

@pri-kise Kilian Seizinger (pri-kise) commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Provide an intergration Event in XRechnung Export to always include two decimals for Amount fields

Work Item(s)

Fixes #29717

Fixes AB#626471

@github-actions

Copy link
Copy Markdown
Contributor

Issue #29717 is not valid. Please make sure you link an issue that exists, is open and is approved.

@pri-kise
Kilian Seizinger (pri-kise) marked this pull request as ready for review March 20, 2026 08:00
@pri-kise
Kilian Seizinger (pri-kise) requested a review from a team as a code owner March 20, 2026 08:00
@miljance

Copy link
Copy Markdown
Contributor

Kilian Seizinger (@pri-kise)
Overall, I like the direction of this change. That said, I think it may be incomplete.
The flag name AlwaysIncludeTwoDecimalPlacesForAmountFields makes it clear this only applies to amount fields - which is fine. My concern is a potential inconsistency: while an amount would now correctly render as 5,00, the Unit Price could still render as 5, since it's not covered by this flag. Do you see that as a problem or you that is not perceived as a problem?

@pri-kise

Copy link
Copy Markdown
Contributor Author

Kilian Seizinger (@pri-kise)
Overall, I like the direction of this change. That said, I think it may be incomplete.
The flag name AlwaysIncludeTwoDecimalPlacesForAmountFields makes it clear this only applies to amount fields - which is fine. My concern is a potential inconsistency: while an amount would now correctly render as 5,00, the Unit Price could still render as 5, since it's not covered by this flag. Do you see that as a problem or you that is not perceived as a problem?

That's good input. I'll discuss this with my colleague

@JesperSchulz Jesper Schulz-Wedde (JesperSchulz) added processing-PR The PR is currently being reviewed linked Issue is linked to a Azure Boards work item Finance GitHub request for Finance area and removed processing-PR The PR is currently being reviewed labels Mar 23, 2026
@pri-kise

Copy link
Copy Markdown
Contributor Author

Miljan Milosavljević (@miljance) I've updated the PR to include at least two decimals for unit price too.

@miljance

Copy link
Copy Markdown
Contributor

Miljan Milosavljević (@miljance) I've updated the PR to include at least two decimals for unit price too.

Looks much better, thanks. One question though. Why do you pass the global variable to all the functions? Is it because the functions FormatDecimalUnlimited and FormatDecimal can also be called from outside? AI agrees with this :).
In my eyes I was thinking if that many changes in the codeunit are needed in order to achieve reacting to a global flag on two places in the code.

The function name CheckShouldIncludeTwoDecimalPlacesForAmountFields sounds weird. Nothing is being checked with it, right? Suggestions: InitializeDecimalFormatFlags or SetDecimalPlacesFlags (suggestions from AI).

@JesperSchulz Jesper Schulz-Wedde (JesperSchulz) added the processing-PR The PR is currently being reviewed label Apr 7, 2026
@JesperSchulz

Copy link
Copy Markdown
Contributor

Let me process this one.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Processing this PR. The branch is now locked 🔒 Please don't push updates unless otherwise agreed.

@JesperSchulz
Jesper Schulz-Wedde (JesperSchulz) merged commit 3edc0c8 into microsoft:main Apr 8, 2026
11 of 12 checks passed
@JesperSchulz Jesper Schulz-Wedde (JesperSchulz) added the ships-in-future-update Fix ships in a future update label Apr 9, 2026
@JesperSchulz

Copy link
Copy Markdown
Contributor

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 48689.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Finance GitHub request for Finance area linked Issue is linked to a Azure Boards work item processing-PR The PR is currently being reviewed ships-in-future-update Fix ships in a future update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DE] [Event Request] E-Documents for Germany - Export XRechnung - OnAfterFormatDecimal, OnAfterFormatFourDecimal

4 participants