diff --git a/app/Jobs/Host/DispatchHostCostQueueJob.php b/app/Jobs/Host/DispatchHostCostQueueJob.php index 92836cf..2a8c071 100644 --- a/app/Jobs/Host/DispatchHostCostQueueJob.php +++ b/app/Jobs/Host/DispatchHostCostQueueJob.php @@ -60,7 +60,7 @@ public function handle(): void }); }); } else { - if (! $this->host->isHourly() && ! $this->host->isNextMonthCancel() && ! $this->host->isTrial()) { + if (! $this->host->isNextMonthCancel() && ! $this->host->isTrial()) { $this->host->cost($this->host->getPrice()); } } diff --git a/app/Models/Host.php b/app/Models/Host.php index 346ab85..20b9d60 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -201,7 +201,15 @@ public function isHourly(): bool public function isNextMonthCancel(): bool { - return $this->cancel_at_period_end; + if ($this->isHourly()) { + return false; + } + + if ($this->isMonthly()) { + return $this->cancel_at_period_end; + } + + return false; } public function cost(