++ campagne: "In corso" solo per territori assegnati nel periodo
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user