++ campagne: "In corso" solo per territori assegnati nel periodo

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Francesco Picone
2026-10-19 10:33:07 +02:00
parent 223d44300c
commit 2f0a24bca4
3 changed files with 6 additions and 6 deletions

View File

@@ -61,12 +61,12 @@ class Campagna extends Model
}
/**
* Assignments still open that were out during this campaign (assigned
* on or before its end): they can be counted for it when they come back.
* Assignments made during this campaign and not yet returned.
*/
public function assegnazioniInCorso()
{
return Assegnazione::whereNull('returned_at')
->where('assigned_at', '>=', $this->start_date)
->where('assigned_at', '<=', $this->end_date);
}