ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Bug]: Incorrectly formatted amounts in e-documents

Open DanielSeiler opened this issue 2 years ago • 5 comments

Describe the issue

When importing e-Documents in the German version, the amounts over 1000€ that have a thousand separator “.” are incorrect in the system. In the following example, the amount value 3461,15 is imported (In US its 3461.15) The double conversion turns the local format into 346.115, which corresponds to 346,115 (346115€) in US format.

Bild1

Bild2

The Bug is in the codeunit 6109 "E-Document Import Helper" Bild4

Bild3

The function Format(..,0,9) is unnecessary in my opinion. The formating was already done in the import Codeunit and the double formatting results in this error with local values.

Expected behavior

The formatting of the imported amounts should not change.

Steps to reproduce

Use german localisation and import any E-Document with Line Amouts greater than 1000. 1.000€ turns into 100.000€ (100000€)

Additional context

No response

I will provide a fix for a bug

  • [X] I will provide a fix for a bug

DanielSeiler avatar Jul 18 '24 13:07 DanielSeiler

Additionally in Config. Validate Management, which is used for set the field value through E-Document Import Helper, there is another bug. Image

EvaluateValueWithValidate has a parameter XMLValue, to indicate the value needs to be evaluated with XML format or not. XMLValue is set to false, but it's not passed to EvaluateValueToDecimal procedure.

sirhc101 avatar Oct 31 '24 09:10 sirhc101

Hello We encountred the exact same issue on BC25.1. E-document Line Discount Amount was not converted correctly. Is there already a solution planned to fix this issue? If yes, in which version it's planned? Thanks already for your feedback!

AmineAbdouli avatar Dec 10 '24 15:12 AmineAbdouli

@DanielSeiler Is there a plan to fix the issue? As far as I can tell the problem is still present when a line discount is used.

Would it be ok if I would fix the issue and create a PR?

miljance avatar Jan 19 '25 12:01 miljance

actually, fixed in 25.2. I guess this incident can be closed.

miljance avatar Jan 19 '25 21:01 miljance

Indeed. Closing issue.

JesperSchulz avatar Feb 25 '26 13:02 JesperSchulz