improve import
This commit is contained in:
@@ -31,7 +31,7 @@ class DailyChangesSheet implements ToCollection, WithHeadingRow, WithValidation,
|
|||||||
'total_market_value' => $dailyChange['total_market_value'],
|
'total_market_value' => $dailyChange['total_market_value'],
|
||||||
'total_cost_basis' => $dailyChange['total_cost_basis'],
|
'total_cost_basis' => $dailyChange['total_cost_basis'],
|
||||||
'total_gain' => $dailyChange['total_gain'],
|
'total_gain' => $dailyChange['total_gain'],
|
||||||
'total_dividends' => $dailyChange['total_dividends'],
|
'total_dividends_earned' => $dailyChange['total_dividends'],
|
||||||
'realized_gains' => $dailyChange['realized_gains'],
|
'realized_gains' => $dailyChange['realized_gains'],
|
||||||
'annotation' => $dailyChange['annotation'],
|
'annotation' => $dailyChange['annotation'],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class Transaction extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get the holding for a symbol and portfolio (or create one)
|
// get the holding for a symbol and portfolio (or create one)
|
||||||
$holding = Holding::firstOrNew([
|
$holding = Holding::firstOrCreate([
|
||||||
'portfolio_id' => $this->portfolio_id,
|
'portfolio_id' => $this->portfolio_id,
|
||||||
'symbol' => $this->symbol
|
'symbol' => $this->symbol
|
||||||
], [
|
], [
|
||||||
|
|||||||
Reference in New Issue
Block a user