diff --git a/app/Http/Controllers/Auth/ContactLoginController.php b/app/Http/Controllers/Auth/ContactLoginController.php index 3cba611befb5..37057b8e6f0f 100644 --- a/app/Http/Controllers/Auth/ContactLoginController.php +++ b/app/Http/Controllers/Auth/ContactLoginController.php @@ -47,8 +47,12 @@ class ContactLoginController extends Controller } - if (!$company && strpos($request->getHost(), 'invoicing.co') !== false) { + if($company){ + $account = $company->account; + } + elseif (!$company && strpos($request->getHost(), 'invoicing.co') !== false) { $subdomain = explode('.', $request->getHost())[0]; + nlog("subdomain = {$subdomain}"); MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]); diff --git a/resources/views/portal/ninja2020/plan/index.blade.php b/resources/views/portal/ninja2020/plan/index.blade.php index 5a33249a5096..4ab6008db659 100644 --- a/resources/views/portal/ninja2020/plan/index.blade.php +++ b/resources/views/portal/ninja2020/plan/index.blade.php @@ -110,14 +110,14 @@ document.getElementById('handlePlanChange').addEventListener('click', function() { if(document.getElementById("newPlan").value.length > 1) - location.href = 'http://devhosted.test:8000/client/subscriptions/{{ $current_recurring_id }}/plan_switch/' + document.getElementById("newPlan").value + ''; + location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/{{ $current_recurring_id }}/plan_switch/' + document.getElementById("newPlan").value + ''; }); @else document.getElementById('handleNewPlan').addEventListener('click', function() { if(document.getElementById("newPlan").value.length > 1) - location.href = 'http://devhosted.test:8000/client/subscriptions/' + document.getElementById("newPlan").value + '/purchase'; + location.href = 'https://invoiceninja.invoicing.co/client/subscriptions/' + document.getElementById("newPlan").value + '/purchase'; }); @endif