Add POS Pro subscription billing and free-tier limits.
Deploy Ladill POS / deploy (push) Successful in 43s
Deploy Ladill POS / deploy (push) Successful in 43s
Wallet-backed Pro unlocks unlimited products, restaurant mode, catalog imports, and ecosystem sync features. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,7 +18,10 @@ class SettingsController extends Controller
|
||||
{
|
||||
use ScopesToAccount;
|
||||
|
||||
public function __construct(private PosLocationService $locations) {}
|
||||
public function __construct(
|
||||
private PosLocationService $locations,
|
||||
private \App\Services\Pos\SubscriptionService $subscriptions,
|
||||
) {}
|
||||
|
||||
public function index(Request $request): View
|
||||
{
|
||||
@@ -41,6 +44,12 @@ class SettingsController extends Controller
|
||||
'receipt_footer' => ['nullable', 'string', 'max:1000'],
|
||||
]);
|
||||
|
||||
$user = ladill_account() ?? $request->user();
|
||||
if ($data['service_style'] === 'restaurant' && ! $this->subscriptions->canUseRestaurantMode($user)) {
|
||||
return redirect()->route('pos.pro.index')
|
||||
->with('upsell', 'Restaurant mode is part of Ladill POS Pro.');
|
||||
}
|
||||
|
||||
$location = $this->locations->ensureDefault($this->ownerRef($request));
|
||||
$location->update([
|
||||
'name' => $data['name'],
|
||||
|
||||
Reference in New Issue
Block a user