Browse Source

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.

pull/5160/head
Jan Giebels 2 weeks ago
parent
commit
377ad1ad2a
  1. 15
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

15
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; this.quantity = quantity;
if (Number.isInteger(this.quantity)) { this.quantityPrecision = 0;
this.quantityPrecision = 0; if (this.quantity < 10) {
} else if (SymbolProfile?.assetSubClass === 'CRYPTOCURRENCY') { this.quantityPrecision = 5;
if (this.quantity < 1) { } else if (this.quantity < 1) {
this.quantityPrecision = 7; this.quantityPrecision = 8;
} else if (this.quantity < 1000) {
this.quantityPrecision = 5;
} else if (this.quantity >= 10000000) {
this.quantityPrecision = 0;
}
} }
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`; 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`;

Loading…
Cancel
Save