-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify units of currency to be used for the AmountString field type #652
Comments
I think where we got to as a suggestion was to tweak this as:
Additionally add a clarifying statement to state where dollar values are mentioned they are assumed to be in |
Any particular reason for not including the clarifying "main currency units" or the negative value "prefix" in the proposal? |
Mainly to work around potentially non AUD values questions (ie. should it be translated to AUD or not). Sorry negative is included in my alignment just wasn't discussed too much. |
Ahh, ok, because "main" could be construed as "AUD"? Currencies have a "main" portion (eg dollars, pound, sterling) and a "fractional" portion (eg cents, penny), and the original proposal was in this context. Maybe we drop "main", eg "... a monetary amount in currency units..." just so it explicitly references units still. |
Based on the discussion and feedback on this issue thus far, the DSB is proposing to update the description of
The three updates specifically are:
The changes would be considered non-breaking. Feedback on the proposed change is welcome. |
The proposed change has been staged for review. |
Incorporated into Standards v1.32.0. |
Description
As referenced in issue #644, there is currently ambiguity as to the units of currency to be used for the
AmountString
type. This ambiguity is exposed within the Energy sector that frequently quotes amounts in fractional units (i.e. cents) rather than main units (i.e. dollars). As a result, some DHs are populating Energy sector payload values with main units (e.g. dollars) while others are populating with fractional units (e.g. cents).While main units makes intuitive sense within the Banking sector and there are suggestions based on the field type of
CurrencyString
that perhaps all amounts are to be in main units of the currency being used, it is sufficiently ambiguous within a sector that frequently uses fractional units for there to be incongruence between implementations.Intention and Value of Change
Explicitly specifying the units of currency as part of the standards will help with consistency and quality of data for a number of payloads within the Energy sector. This will subsequently ensure accuracy for data recipient producing consumer products who otherwise currently need to rely on heuristics to best-guess the units of currency in payloads.
Area Affected
The
AmountString
definition in https://consumerdatastandardsaustralia.github.io/standards/#common-field-types, is currently:Within this definition there is no explicit reference to currency units to be used. There is no other explicit reference in the standards outside of the field type that I can find, either.
Change Proposed
There may be more appropriate places for the specification of unit of currency, but it logical and has some precedence with
RateString
to specify this as part of the type definition forAmountString
. For example:The two updates to the definition in this example are:
A string representing a monetary amount in main currency units with fractional units after a decimal point (e.g., if working with Australian dollars: "123.45" for one hundred twenty-three dollars and forty-five cents).
and
- Negative numbers identified with a ‘-‘ prefix
DSB Proposed Solution
The current DSB proposal for this issue is in #652 (comment)
The text was updated successfully, but these errors were encountered: