From 377ad1ad2a94db0b2bea894d660ee31237520a10 Mon Sep 17 00:00:00 2001 From: Jan Giebels Date: Sat, 12 Jul 2025 14:53:43 +0200 Subject: [PATCH] changed decimal precision in details dialog to display fractions for lower quantities, specially for CRYPTOCURRENCIES, ETF, MUTUAL_FUND as with 'Sparplaene' you mostly get small fractions of a full piece. --- .../holding-detail-dialog.component.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts index 105ddfe13..dd5976980 100644 --- a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts +++ b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts @@ -352,16 +352,11 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { this.quantity = quantity; - if (Number.isInteger(this.quantity)) { - this.quantityPrecision = 0; - } else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { - if (this.quantity < 1) { - this.quantityPrecision = 7; - } else if (this.quantity < 1000) { - this.quantityPrecision = 5; - } else if (this.quantity >= 10000000) { - this.quantityPrecision = 0; - } + this.quantityPrecision = 0; + if (this.quantity < 10) { + this.quantityPrecision = 5; + } else if (this.quantity < 1) { + this.quantityPrecision = 8; } this.reportDataGlitchMail = `mailto:hi@ghostfol.io?Subject=Ghostfolio Data Glitch Report&body=Hello%0D%0DI would like to report a data glitch for%0D%0DSymbol: ${SymbolProfile?.symbol}%0DData Source: ${SymbolProfile?.dataSource}%0D%0DAdditional notes:%0D%0DCan you please take a look?%0D%0DKind regards`;