OP-TED / eForms-SDK

eForms is the notification standard for public procurement procedures in the EU. The eForms SDK is a collection of resources providing the foundation for building eForms applications.
Creative Commons Attribution 4.0 International
59 stars 30 forks source link

Sum of criterias validation error #906

Closed sne-vvz closed 5 months ago

sne-vvz commented 6 months ago

Hello,

we are experiencing a problem with form validation. Customer has a form with more than 50 criteria and most of them are decimal numbers. There is a validation rule which says the sum of these criteria must be exactly 100. Although the sum of data is 100, the schematron validation fires the error. Please could you check why this form is firing the error? Please find the form as an attachment.

Thank you in advance for helping us with this issue.

cbc:CalculationExpressionrule|text|BR-BT-00539-0200

xml file of the said form: https://gist.github.com/sne-vvz/3b3ba83172ea71be62dd2dbc24eec7eb

YvesJo commented 6 months ago

Hi, This a calculation precision issue. An similar issue has already been reported for another calculation and both will get fixed with SDK 1.11. The XML instance is an SDK 1.8 one, given the number of criteria, the use of whole numbers won't be possible without loosing information. Using "poi-exa" instead of "per-exa" could help as the rules wouldn't then get applied.