UPOS 1.15.1 RTF Avatar
  1. OMG Issue

UPOS1151 — EVRW: _Currency_ type format makes no sense for OPOS and POS for .NET

  • Key: UPOS1151-30
  • Status: open  
  • Source: Free Software Developer ( Martin Conrad)
  • Summary:

    Even if this description is clear, it makes no sense to pass decimal values in a 64-bit integer format with four implicit decimals.
    For JavaPOS, this might be meaningful because type long shall be used to represent currency values with four implicit decimals.
    For OPOS, a CURRENCY is internally implemented as 64-bit integer with four implicit decimals as well, but it will be converted to a string with decimal point whenever converted to a BSTR using OLE conversion methods.
    For POS for .NET, a decimal represents currency values, and a decimal has more than 64 bit and no integer representation.
    Since currently services using the current description for data exchange via retrieveResultInformation and setParameterInformation might be present, I would recommend to specify that currency values can either be passed as 64-bit-Integer with 4 implicit decimals, converted to a string (e.g 12.34 converts to "123400") or as decimal string with decimal point (e.g. 12.34 converts to "12.34"). The decimal point in the second representation must not be omitted.
    Alternative: An additional property, e.g. CurrencyStringFormat, can be used to specify which kind of string representation shall be used. To be compatible to the current specification, the default can be EVRW_AMOUNT_AS_INTEGER. For decimal string representation, the application can set it to EVRW_AMOUNT_AS_DECIMAL. In this case, a trailing decimal point can be omitted.

  • Reported: UPOS 1.15 — Mon, 23 Jan 2023 13:13 GMT
  • Updated: Tue, 24 Jan 2023 16:28 GMT