diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index 85b20ef81245..dab7bd2924fe 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -218,7 +218,9 @@ class PaymentService extends BaseService $account = Account::with('users')->find($invoice->client->public_id); if ($account->pro_plan_paid && $account->pro_plan_paid != '0000-00-00') { $date = DateTime::createFromFormat('Y-m-d', $account->pro_plan_paid); - $account->pro_plan_paid = $date->modify('+1 year')->format('Y-m-d'); + $date->modify('+1 year'); + $date = max($date, date_create()); + $account->pro_plan_paid = $date->format('Y-m-d'); } else { $account->pro_plan_paid = date_create()->format('Y-m-d'); }