Decimal type does not allow to store some ISO20022 fields
See original GitHub issueWe’re having a hard time with differences in Decimal
between DAML and other environments. In particular the usage of it in ISO20022 (yes - a big subject area, but stick with me here…). ISO20022 uses decimals in many contexts, but they are specializations of the most general xsd definition for the type DecimalNumber
:
<xs:simpleType name="DecimalNumber">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="17"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
Example: https://www.iso20022.org/sites/default/files/documents/messages/sese/schemas/sese.023.001.09.xsd
- How do we deal with scenarios that need > 10 decimal places
- Less bounded decimals / dependent types like Decimal[28,8]? 😃
- Should we consider using Sci notation instead
- Note that the above XSD notation is different from SQL, in that the latter has a fixed fractional digits
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
MT541: (49) Field 90a: Price: Book/Lot Price - ISO 15022
The number of decimal digits in Price is not validated against the currency specified. Sign must be present when Price is negative. MT541:...
Read more >ISO20022 standard Message Implementation
This mandatory field stores the transaction charges to be paid by the charge bearer. The data type is amount. 39. How to use...
Read more >FINplus Standards Release 2022 Updated High-Level ...
This document describes the requested changes for messages in FINplus that may be updated for the next. Standards Release.
Read more >ISO 20022-1:2013(en), Financial services
ISO shall not be held responsible for identifying any or all such patent rights. ISO 20022-1 was prepared by Technical Committee ISO/TC 68, ......
Read more >Amendment – ISO20022.PLUS
Fields specifying a monetary amount with an implied currency should use a decimal type. Note that ISO20022-4:2013 disallows any currency in contradiction, and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IIUC the schema means that their
DecimalNumber
has a max precision of 18, and max scale of 17, so we’d need to support.This has been fixed by #2289.