mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove statistics when creating a new journal.
This commit is contained in:
@@ -74,4 +74,9 @@ class PeriodStatisticRepository implements PeriodStatisticRepositoryInterface
|
||||
{
|
||||
return $model->primaryPeriodStatistics()->where('start', '>=', $start)->where('end', '<=', $end)->get();
|
||||
}
|
||||
|
||||
public function deleteStatisticsForModel(Model $model, Carbon $date): void
|
||||
{
|
||||
$model->primaryPeriodStatistics()->where('start', '<=', $date)->where('end', '>=', $date)->delete();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user