fixed errors in event and tenant resources

This commit is contained in:
Codex Agent
2025-10-15 21:43:24 +02:00
parent 1a4bdb1fe1
commit 58d9ef34ab
8 changed files with 116 additions and 106 deletions

View File

@@ -69,13 +69,13 @@ class EventPackage extends Model
public function getRemainingPhotosAttribute(): int
{
$max = $this->package->max_photos ?? 0;
return max(0, $this->max_photos - $this->used_photos);
return max(0, $max - $this->used_photos);
}
public function getRemainingGuestsAttribute(): int
{
$max = $this->package->max_guests ?? 0;
return max(0, $this->max_guests - $this->used_guests);
return max(0, $max - $this->used_guests);
}
protected static function boot()