View Issue Details

IDProjectCategoryView StatusLast Update
0005202Talerotherpublic2020-03-31 16:04
ReporterFlorian Dold Assigned ToFlorian Dold  
PrioritynormalSeveritytextReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.7.0 
Summary0005202: clarify and document which amount format should be used where
DescriptionWe have these three:

1) The JSON format { currency, value, fraction }
2) The human-readable standard decimal form TESTKUDOS:95.00
3) The pretty-printed form, where rendering and parsing and display
might even depend on the user locale or other settings

The bank currently uses format (2) instead of (3), which probably is not what we want.
TagsNo tags attached.

Activities

Marcello Stanisci

2019-05-30 14:56

reporter   ~0014465

We spoke about splitting our glossary as user -vs- devs. So this must belong to devs'.

Christian Grothoff

2019-07-14 11:55

manager   ~0014670

Meta-question: do we want to preserve the JSON format? The string format is more compact, and we could avoid the entire issue by just having always the CURRENCY:value.fraction format instead of having two.

Christian Grothoff

2019-07-14 11:55

manager   ~0014671

Reminder sent to: Marcello Stanisci

Marcello Stanisci

2019-07-15 18:34

reporter   ~0014677

About the meta-question: I remeber someone suggested to *drop* the currency component from our amounts at some point. In that case, I would keep the JSON amount since it feels more "structured". If instead we keep the currency around, then I agree in dropping the JSON format and only have the stringified version.

Marcello Stanisci

2019-07-15 18:39

reporter   ~0014678

About the report: the bank communicates amounts to their customers with this format (just checked on a profile page and on public histories page on 'test'): 100.00 TESTKUDOS.

So no semicolon used and not very unfriendly.

Christian Grothoff

2019-07-15 19:31

manager   ~0014684

Eh, I am thinking of dropping the currency in the database schema, but that's for a different reason. Other than _inside_ of the database, we'll keep the currency around.

Christian Grothoff

2019-07-15 19:31

manager   ~0014685

Oh, and how we show things to users in the user interface should not be affected at all, that should ideally be controlled by the locale.

Florian Dold

2020-01-07 18:49

manager   ~0015239

As far as I can see this is completely resolved:

* public APIs always use the "EUR:2.50" format
* when displayed to the user, we do "2.50 EUR", potentially with variations based on locale or currency-specific changes, such as "€2.500,50" for "EUR:2500.50" with a German locale
* internally, each component uses what it wants, the C component uses an amount struct, the TypeScript wallet the { currency, value, fraction } object.

Issue History

Date Modified Username Field Change
2017-12-09 01:53 Florian Dold New Issue
2017-12-09 11:07 Christian Grothoff Severity minor => text
2017-12-09 11:07 Christian Grothoff Status new => confirmed
2017-12-09 11:07 Christian Grothoff Product Version => git (master)
2019-05-30 14:56 Marcello Stanisci Note Added: 0014465
2019-07-14 11:55 Christian Grothoff Note Added: 0014670
2019-07-14 11:55 Christian Grothoff Note Added: 0014671
2019-07-15 18:34 Marcello Stanisci Note Added: 0014677
2019-07-15 18:39 Marcello Stanisci Note Added: 0014678
2019-07-15 19:31 Christian Grothoff Note Added: 0014684
2019-07-15 19:31 Christian Grothoff Note Added: 0014685
2020-01-07 18:49 Florian Dold Assigned To => Florian Dold
2020-01-07 18:49 Florian Dold Status confirmed => resolved
2020-01-07 18:49 Florian Dold Resolution open => fixed
2020-01-07 18:49 Florian Dold Note Added: 0015239
2020-01-07 18:50 Florian Dold Target Version => 0.7.0
2020-03-31 16:04 Christian Grothoff Status resolved => closed