fix: export daily change dates transposition

reference #148
This commit is contained in:
hackerESQ
2025-11-04 19:59:33 -06:00
parent bb0a0ef928
commit 5f583de857
3 changed files with 20 additions and 3 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ class DailyChange extends Model
->groupBy('portfolio_id', 'date');
return $query
->select(['daily_change.portfolio_id', 'daily_change.date'])
->select(['daily_change.date', 'daily_change.portfolio_id'])
->selectRaw('daily_change.total_market_value * COALESCE(cr.rate, 1) AS total_market_value')
->selectRaw('SUM(COALESCE(ccb.cumulative_cost_basis, 0)) AS total_cost_basis')
->selectRaw('daily_change.total_market_value * COALESCE(cr.rate, 1)