diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 640ba7f43acc..17169b85b157 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -238,6 +238,8 @@ class SubscriptionService */ private function calculateProRataRefund($invoice) :float { + if(!$this->invoice->date) + return 0; $start_date = Carbon::parse($invoice->date);