Ver código fonte

update: fix order capacity

tokumeikoi 2 anos atrás
pai
commit
44b2d56db9
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      app/Http/Controllers/User/OrderController.php

+ 1 - 1
app/Http/Controllers/User/OrderController.php

@@ -85,7 +85,7 @@ class OrderController extends Controller
             abort(500, __('Subscription plan does not exist'));
         }
 
-        if (!$planService->haveCapacity() && $request->input('period') !== 'reset_price') {
+        if ($user->plan_id !== $plan->id && !$planService->haveCapacity() && $request->input('period') !== 'reset_price') {
             abort(500, __('Current product is sold out'));
         }