diff --git a/custom/apps/mining-checker/assets/js/app.js b/custom/apps/mining-checker/assets/js/app.js index 2dde2239..74a13cd8 100644 --- a/custom/apps/mining-checker/assets/js/app.js +++ b/custom/apps/mining-checker/assets/js/app.js @@ -3191,6 +3191,10 @@ const totalHoldingsValue = latest ? convertMeasurementMoney(latest, latest.total_holdings_value, reportCurrency) : null; const earnedValue = latest ? convertMeasurementMoney(latest, latest.earned_value, reportCurrency) : null; const settledCryptoSpendValue = latest ? convertMeasurementMoney(latest, latest.settled_crypto_spend_value, reportCurrency) : null; + const fixedFiatSpendValue = investedCapital; + const totalSpendValue = (settledCryptoSpendValue !== null || fixedFiatSpendValue !== null) + ? (Number(settledCryptoSpendValue) || 0) + (Number(fixedFiatSpendValue) || 0) + : null; const fixedCryptoSpendCurrentAsset = latest && latest.fixed_crypto_spend_current_asset !== null && latest.fixed_crypto_spend_current_asset !== undefined ? Number(latest.fixed_crypto_spend_current_asset) : null; @@ -3254,11 +3258,13 @@ }), h(StatCard, { key: 'spent-overall', - label: `Krypto-Ausgaben fix ${reportCurrency}`, - value: settledCryptoSpendValue !== null ? fmtMoney(settledCryptoSpendValue, reportCurrency) : 'n/a', + label: `Ausgaben gesamt ${reportCurrency}`, + value: totalSpendValue !== null ? fmtMoney(totalSpendValue, reportCurrency) : 'n/a', sub: [ + settledCryptoSpendValue !== null ? `Krypto fix ${fmtMoney(settledCryptoSpendValue, reportCurrency)}` : null, + fixedFiatSpendValue !== null ? `FIAT ${fmtMoney(fixedFiatSpendValue, reportCurrency)}` : null, fixedCryptoSpendCurrentAsset !== null ? `Entspricht ${fmtNumber(fixedCryptoSpendCurrentAsset, 6)} ${currentCoinCurrency}` : null, - 'Kurs aus gespeichertem fx-rates-Snapshot', + settledCryptoSpendValue !== null ? 'Krypto-Kurs aus gespeichertem fx-rates-Snapshot' : null, ].filter(Boolean).join(' ยท '), }), h(StatCard, {