++ 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 6ef301cb14
commit 097aa4ff30
3 changed files with 6 additions and 6 deletions

View File

@@ -66,12 +66,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);
}