verschieben des sofortigen verzichts auf das Widerrrufsrecht zum Anlegen des Events

This commit is contained in:
Codex Agent
2025-12-22 13:11:16 +01:00
parent 84234bfb8e
commit c947e638eb
29 changed files with 877 additions and 374 deletions

View File

@@ -10,6 +10,15 @@ class PackageLimitEvaluator
{
public function assessEventCreation(Tenant $tenant): ?array
{
$hasEndcustomerPackage = $tenant->tenantPackages()
->where('active', true)
->whereHas('package', fn ($query) => $query->withTrashed()->where('type', 'endcustomer'))
->exists();
if ($hasEndcustomerPackage) {
return null;
}
if ($tenant->hasEventAllowance()) {
return null;
}