asdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 37s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-08-21 01:36:41 +02:00
parent 01ef5127b1
commit b3b3a27257
3 changed files with 13 additions and 9 deletions

View File

@@ -471,11 +471,14 @@ final class AnalyticsService
? (float) ($totalHoldingsValue ?? 0.0) + (float) ($settledCryptoSpendValue ?? 0.0)
: null;
$currentDailyRevenue = is_numeric($latest['theoretical_daily_revenue'] ?? null) ? (float) $latest['theoretical_daily_revenue'] : null;
$breakEvenRemainingAmount = ($cashInvestedCapital !== null && $totalHoldingsValue !== null)
? max(0.0, $cashInvestedCapital - $totalHoldingsValue)
: $cashInvestedCapital;
$totalInvestedCapital = ($cashInvestedCapital !== null || $reinvestedCapital !== null)
? (float) ($cashInvestedCapital ?? 0.0) + (float) ($reinvestedCapital ?? 0.0)
: null;
$breakEvenRemainingAmount = ($totalInvestedCapital !== null && $totalHoldingsValue !== null)
? max(0.0, $totalInvestedCapital - $totalHoldingsValue)
: $totalInvestedCapital;
$breakEvenProjection = (
$cashInvestedCapital !== null &&
$totalInvestedCapital !== null &&
$breakEvenRemainingAmount !== null
) ? $this->projectBreakEvenDate(
is_array($settings['cost_plans'] ?? null) ? $settings['cost_plans'] : [],
@@ -505,6 +508,7 @@ final class AnalyticsService
'invested_capital' => $this->roundOrNull($cashInvestedCapital, 8),
'cash_invested_capital' => $this->roundOrNull($cashInvestedCapital, 8),
'reinvested_capital' => $this->roundOrNull($reinvestedCapital, 8),
'total_invested_capital' => $this->roundOrNull($totalInvestedCapital, 8),
'wallet_balance_current_asset' => $this->roundOrNull($walletBalanceCurrentAssetEquivalent, 6),
'wallet_balance_current_asset_direct' => $this->roundOrNull($walletBalanceCurrentAssetDirect, 6),
'holdings_current_asset' => $this->roundOrNull($holdingsCurrentAsset, 6),