mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 14:24:33 -04:00
Subscription table view client portal
This commit is contained in:
parent
67a7f823e2
commit
c906bcbf93
@ -21,20 +21,20 @@ class SubscriptionController extends Controller
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
if (Ninja::isHosted()) {
|
// if (Ninja::isHosted()) {
|
||||||
$count = RecurringInvoice::query()
|
// $count = RecurringInvoice::query()
|
||||||
->where('client_id', auth()->guard('contact')->user()->client->id)
|
// ->where('client_id', auth()->guard('contact')->user()->client->id)
|
||||||
->where('company_id', auth()->guard('contact')->user()->client->company_id)
|
// ->where('company_id', auth()->guard('contact')->user()->client->company_id)
|
||||||
->where('status_id', RecurringInvoice::STATUS_ACTIVE)
|
// ->where('status_id', RecurringInvoice::STATUS_ACTIVE)
|
||||||
->where('is_deleted', 0)
|
// ->where('is_deleted', 0)
|
||||||
->whereNotNull('subscription_id')
|
// ->whereNotNull('subscription_id')
|
||||||
->withTrashed()
|
// ->withTrashed()
|
||||||
->count();
|
// ->count();
|
||||||
|
|
||||||
if ($count == 0) {
|
// if ($count == 0) {
|
||||||
return redirect()->route('client.ninja_contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'company_key' => auth()->guard('contact')->user()->company->company_key]);
|
// return redirect()->route('client.ninja_contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'company_key' => auth()->guard('contact')->user()->company->company_key]);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return render('subscriptions.index');
|
return render('subscriptions.index');
|
||||||
}
|
}
|
||||||
|
@ -132,11 +132,11 @@ class PortalComposer
|
|||||||
|
|
||||||
$data[] = ['title' => ctrans('texts.statement'), 'url' => 'client.statement', 'icon' => 'activity'];
|
$data[] = ['title' => ctrans('texts.statement'), 'url' => 'client.statement', 'icon' => 'activity'];
|
||||||
|
|
||||||
// if (Ninja::isHosted() && auth()->guard('contact')->user()->company->id == config('ninja.ninja_default_company_id')) {
|
if (Ninja::isHosted() && auth()->guard('contact')->user()->company->id == config('ninja.ninja_default_company_id')) {
|
||||||
// $data[] = ['title' => ctrans('texts.plan'), 'url' => 'client.plan', 'icon' => 'credit-card'];
|
$data[] = ['title' => ctrans('texts.plan'), 'url' => 'client.plan', 'icon' => 'credit-card'];
|
||||||
// } else {
|
} else {
|
||||||
$data[] = ['title' => ctrans('texts.subscriptions'), 'url' => 'client.subscriptions.index', 'icon' => 'calendar'];
|
$data[] = ['title' => ctrans('texts.subscriptions'), 'url' => 'client.subscriptions.index', 'icon' => 'calendar'];
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (auth()->guard('contact')->user()->client->getSetting('client_initiated_payments')) {
|
if (auth()->guard('contact')->user()->client->getSetting('client_initiated_payments')) {
|
||||||
$data[] = ['title' => ctrans('texts.pre_payment'), 'url' => 'client.pre_payments.index', 'icon' => 'dollar-sign'];
|
$data[] = ['title' => ctrans('texts.pre_payment'), 'url' => 'client.pre_payments.index', 'icon' => 'dollar-sign'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user