[Bug]: Incorrectly formatted amounts in e-documents
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.
The Bug is in the codeunit 6109 "E-Document Import Helper"
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
Additionally in Config. Validate Management, which is used for set the field value through E-Document Import Helper, there is another bug.
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.
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!
@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?
actually, fixed in 25.2. I guess this incident can be closed.
Indeed. Closing issue.