Clean up for due date days recurring invoices

This commit is contained in:
David Bomba 2022-02-16 13:24:10 +11:00
parent 682ba68120
commit fb1e27ba7d
57 changed files with 114 additions and 115 deletions

View File

@ -163,7 +163,7 @@ class CreditFilters extends QueryFilters
*/ */
public function entityFilter() public function entityFilter()
{ {
if (auth('contact')->user()) { if (auth()->guard('contact')->user()) {
return $this->contactViewFilter(); return $this->contactViewFilter();
} else { } else {
return $this->builder->company(); return $this->builder->company();
@ -181,7 +181,7 @@ class CreditFilters extends QueryFilters
private function contactViewFilter() : Builder private function contactViewFilter() : Builder
{ {
return $this->builder return $this->builder
->whereCompanyId(auth('contact')->user()->company->id) ->whereCompanyId(auth()->guard('contact')->user()->company->id)
->whereNotIn('status_id', [Credit::STATUS_DRAFT]); ->whereNotIn('status_id', [Credit::STATUS_DRAFT]);
} }
} }

View File

@ -177,7 +177,7 @@ class InvoiceFilters extends QueryFilters
*/ */
public function entityFilter() public function entityFilter()
{ {
if (auth('contact')->user()) { if (auth()->guard('contact')->user()) {
return $this->contactViewFilter(); return $this->contactViewFilter();
} else { } else {
return $this->builder->company()->with(['invitations.company'], ['documents.company']); return $this->builder->company()->with(['invitations.company'], ['documents.company']);
@ -195,7 +195,7 @@ class InvoiceFilters extends QueryFilters
private function contactViewFilter() : Builder private function contactViewFilter() : Builder
{ {
return $this->builder return $this->builder
->whereCompanyId(auth('contact')->user()->company->id) ->whereCompanyId(auth()->guard('contact')->user()->company->id)
->whereNotIn('status_id', [Invoice::STATUS_DRAFT, Invoice::STATUS_CANCELLED]); ->whereNotIn('status_id', [Invoice::STATUS_DRAFT, Invoice::STATUS_CANCELLED]);
} }
} }

View File

@ -119,7 +119,7 @@ class PaymentFilters extends QueryFilters
*/ */
public function entityFilter() public function entityFilter()
{ {
if (auth('contact')->user()) { if (auth()->guard('contact')->user()) {
return $this->contactViewFilter(); return $this->contactViewFilter();
} else { } else {
return $this->builder->company(); return $this->builder->company();
@ -135,7 +135,7 @@ class PaymentFilters extends QueryFilters
private function contactViewFilter() : Builder private function contactViewFilter() : Builder
{ {
return $this->builder return $this->builder
->whereCompanyId(auth('contact')->user()->company->id) ->whereCompanyId(auth()->guard('contact')->user()->company->id)
->whereIsDeleted(false); ->whereIsDeleted(false);
} }
} }

View File

@ -161,8 +161,8 @@ abstract class QueryFilters
*/ */
public function clientFilter() public function clientFilter()
{ {
if (auth('contact')->user()) { if (auth()->guard('contact')->user()) {
return $this->builder->whereClientId(auth('contact')->user()->client->id); return $this->builder->whereClientId(auth()->guard('contact')->user()->client->id);
} }
} }

View File

@ -71,7 +71,7 @@ class DocumentController extends Controller
public function downloadMultiple(DownloadMultipleDocumentsRequest $request) public function downloadMultiple(DownloadMultipleDocumentsRequest $request)
{ {
$documents = Document::whereIn('id', $this->transformKeys($request->file_hash)) $documents = Document::whereIn('id', $this->transformKeys($request->file_hash))
->where('company_id', auth('contact')->user()->company->id) ->where('company_id', auth()->guard('contact')->user()->company->id)
->get(); ->get();
$documents->map(function ($document) { $documents->map(function ($document) {

View File

@ -100,7 +100,7 @@ class NinjaPlanController extends Controller
} }
$recurring_invoice = RecurringInvoice::on('db-ninja-01') $recurring_invoice = RecurringInvoice::on('db-ninja-01')
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', Auth::guard('contact')->user()->company->id) ->where('company_id', Auth::guard('contact')->user()->company->id)
->whereNotNull('subscription_id') ->whereNotNull('subscription_id')
->where('status_id', RecurringInvoice::STATUS_ACTIVE) ->where('status_id', RecurringInvoice::STATUS_ACTIVE)

View File

@ -130,7 +130,7 @@ class PaymentMethodController extends Controller
try { try {
event(new MethodDeleted($payment_method, auth('contact')->user()->company, Ninja::eventVars(auth('contact')->user()->id))); event(new MethodDeleted($payment_method, auth()->guard('contact')->user()->company, Ninja::eventVars(auth()->guard('contact')->user()->id)));
$payment_method->delete(); $payment_method->delete();

View File

@ -160,8 +160,8 @@ class QuoteController extends Controller
protected function approve(array $ids, $process = false) protected function approve(array $ids, $process = false)
{ {
$quotes = Quote::whereIn('id', $ids) $quotes = Quote::whereIn('id', $ids)
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', auth('contact')->user()->client->company_id) ->where('company_id', auth()->guard('contact')->user()->client->company_id)
->whereIn('status_id', [Quote::STATUS_DRAFT, Quote::STATUS_SENT]) ->whereIn('status_id', [Quote::STATUS_DRAFT, Quote::STATUS_SENT])
->withTrashed() ->withTrashed()
->get(); ->get();
@ -175,7 +175,7 @@ class QuoteController extends Controller
if ($process) { if ($process) {
foreach ($quotes as $quote) { foreach ($quotes as $quote) {
$quote->service()->approve(auth()->user())->save(); $quote->service()->approve(auth()->user())->save();
event(new QuoteWasApproved(auth('contact')->user(), $quote, $quote->company, Ninja::eventVars())); event(new QuoteWasApproved(auth()->guard('contact')->user(), $quote, $quote->company, Ninja::eventVars()));
if (request()->has('signature') && !is_null(request()->signature) && !empty(request()->signature)) { if (request()->has('signature') && !is_null(request()->signature) && !empty(request()->signature)) {
InjectSignature::dispatch($quote, request()->signature); InjectSignature::dispatch($quote, request()->signature);

View File

@ -26,8 +26,8 @@ class SubscriptionController extends Controller
$count = RecurringInvoice::query() $count = RecurringInvoice::query()
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', auth('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')
@ -35,7 +35,7 @@ class SubscriptionController extends Controller
->count(); ->count();
if($count == 0) if($count == 0)
return redirect()->route('client.ninja_contact_login', ['contact_key' => auth('contact')->user()->contact_key, 'company_key' => auth('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]);
} }

View File

@ -26,7 +26,7 @@ class TaskController extends Controller
public function index(ShowTasksRequest $request) public function index(ShowTasksRequest $request)
{ {
\Carbon\Carbon::setLocale( \Carbon\Carbon::setLocale(
auth('contact')->user()->preferredLocale() auth()->guard('contact')->user()->preferredLocale()
); );
return render('tasks.index'); return render('tasks.index');

View File

@ -36,7 +36,7 @@ class CreditsTable extends Component
{ {
$query = Credit::query() $query = Credit::query()
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->where('status_id', '<>', Credit::STATUS_DRAFT) ->where('status_id', '<>', Credit::STATUS_DRAFT)
->where('is_deleted', 0) ->where('is_deleted', 0)

View File

@ -75,7 +75,7 @@ class InvoicesTable extends Component
} }
$query = $query $query = $query
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('status_id', '<>', Invoice::STATUS_DRAFT) ->where('status_id', '<>', Invoice::STATUS_DRAFT)
->where('status_id', '<>', Invoice::STATUS_CANCELLED) ->where('status_id', '<>', Invoice::STATUS_CANCELLED)
->withTrashed() ->withTrashed()

View File

@ -43,7 +43,7 @@ class PaymentsTable extends Component
->with('type', 'client') ->with('type', 'client')
->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment::STATUS_PENDING, Payment::STATUS_REFUNDED, Payment::STATUS_PARTIALLY_REFUNDED]) ->whereIn('status_id', [Payment::STATUS_COMPLETED, Payment::STATUS_PENDING, Payment::STATUS_REFUNDED, Payment::STATUS_PARTIALLY_REFUNDED])
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc') ->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc')
->withTrashed() ->withTrashed()
->paginate($this->per_page); ->paginate($this->per_page);

View File

@ -75,7 +75,7 @@ class QuotesTable extends Component
$query = $query $query = $query
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('status_id', '<>', Quote::STATUS_DRAFT) ->where('status_id', '<>', Quote::STATUS_DRAFT)
// ->where(function ($query){ // ->where(function ($query){
// $query->whereDate('due_date', '>=', now()) // $query->whereDate('due_date', '>=', now())

View File

@ -40,7 +40,7 @@ class RecurringInvoicesTable extends Component
$query = RecurringInvoice::query(); $query = RecurringInvoice::query();
$query = $query $query = $query
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->whereIn('status_id', [RecurringInvoice::STATUS_ACTIVE]) ->whereIn('status_id', [RecurringInvoice::STATUS_ACTIVE])
->orderBy('status_id', 'asc') ->orderBy('status_id', 'asc')

View File

@ -35,7 +35,7 @@ class SubscriptionRecurringInvoicesTable extends Component
public function render() public function render()
{ {
$query = RecurringInvoice::query() $query = RecurringInvoice::query()
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->whereNotNull('subscription_id') ->whereNotNull('subscription_id')
->where('is_deleted', false) ->where('is_deleted', false)

View File

@ -37,7 +37,7 @@ class TasksTable extends Component
$query = Task::query() $query = Task::query()
->where('company_id', $this->company->id) ->where('company_id', $this->company->id)
->where('is_deleted', false) ->where('is_deleted', false)
->where('client_id', auth('contact')->user()->client->id); ->where('client_id', auth()->guard('contact')->user()->client->id);
if ($this->company->getSetting('show_all_tasks_client_portal') === 'invoiced') { if ($this->company->getSetting('show_all_tasks_client_portal') === 'invoiced') {
$query = $query->whereNotNull('invoice_id'); $query = $query->whereNotNull('invoice_id');

View File

@ -31,7 +31,7 @@ class CheckClientExistence
$multiple_contacts = ClientContact::query() $multiple_contacts = ClientContact::query()
->with('client.gateway_tokens','company') ->with('client.gateway_tokens','company')
->where('email', auth('contact')->user()->email) ->where('email', auth()->guard('contact')->user()->email)
->whereNotNull('email') ->whereNotNull('email')
->where('email', '<>', '') ->where('email', '<>', '')
// ->whereNull('deleted_at') // ->whereNull('deleted_at')
@ -42,7 +42,7 @@ class CheckClientExistence
return $query->where('is_deleted', false); return $query->where('is_deleted', false);
}) })
->whereHas('company', function ($query){ ->whereHas('company', function ($query){
return $query->where('id', auth('contact')->user()->client->company_id); return $query->where('id', auth()->guard('contact')->user()->client->company_id);
}) })
->get(); ->get();

View File

@ -32,8 +32,8 @@ class Locale
if ($request->has('lang')) { if ($request->has('lang')) {
$locale = $request->input('lang'); $locale = $request->input('lang');
App::setLocale($locale); App::setLocale($locale);
} elseif (auth('contact')->user()) { } elseif (auth()->guard('contact')->user()) {
App::setLocale(auth('contact')->user()->client->locale()); App::setLocale(auth()->guard('contact')->user()->client->locale());
} elseif (auth()->user()) { } elseif (auth()->user()) {
try{ try{

View File

@ -15,7 +15,7 @@ class ShowCreditRequest extends FormRequest
public function authorize() public function authorize()
{ {
return !$this->credit->is_deleted return !$this->credit->is_deleted
&& auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_CREDITS; && auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_CREDITS;
} }
/** /**

View File

@ -19,7 +19,7 @@ class ShowCreditsRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_CREDITS; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_CREDITS;
} }
public function rules() public function rules()

View File

@ -19,7 +19,7 @@ class ProcessInvoicesInBulkRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
} }
public function rules() public function rules()

View File

@ -23,7 +23,7 @@ class ShowInvoiceRequest extends Request
*/ */
public function authorize() : bool public function authorize() : bool
{ {
return auth('contact')->user()->client->id == $this->invoice->client_id return auth()->guard('contact')->user()->client_id == $this->invoice->client_id
&& auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES; && auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
} }
} }

View File

@ -19,7 +19,7 @@ class ShowInvoicesRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
} }
public function rules() public function rules()

View File

@ -20,7 +20,7 @@ class ProcessQuotesInBulkRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES;
} }
public function rules() public function rules()

View File

@ -20,7 +20,7 @@ class ShowQuoteRequest extends FormRequest
public function authorize() public function authorize()
{ {
return auth()->user()->client->id === $this->quote->client_id return auth()->user()->client->id === $this->quote->client_id
&& auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES; && auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES;
} }
public function rules() public function rules()

View File

@ -19,7 +19,7 @@ class ShowQuotesRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES;
} }
public function rules() public function rules()

View File

@ -9,7 +9,7 @@ class RequestCancellationRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES;
} }
public function rules() public function rules()

View File

@ -18,8 +18,8 @@ class ShowRecurringInvoiceRequest extends Request
{ {
public function authorize() : bool public function authorize() : bool
{ {
return auth('contact')->user()->client->id === $this->recurring_invoice->client_id return auth()->guard('contact')->user()->client->id === $this->recurring_invoice->client_id
&& auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES; && auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES;
} }
public function rules() public function rules()

View File

@ -19,7 +19,7 @@ class ShowRecurringInvoicesRequest extends FormRequest
{ {
public function authorize() public function authorize()
{ {
return auth('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES; return auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_RECURRING_INVOICES;
} }
public function rules() public function rules()

View File

@ -44,6 +44,6 @@ class ShowStatementRequest extends FormRequest
public function client(): Client public function client(): Client
{ {
return auth('contact')->user()->client; return auth()->guard('contact')->user()->client;
} }
} }

View File

@ -13,7 +13,7 @@ class StoreUploadRequest extends FormRequest
*/ */
public function authorize() public function authorize()
{ {
return (bool) auth('contact')->user()->client->getSetting('client_portal_enable_uploads'); return (bool) auth()->guard('contact')->user()->client->getSetting('client_portal_enable_uploads');
} }
/** /**

View File

@ -51,10 +51,10 @@ class PortalComposer
$view->with($this->portalData()); $view->with($this->portalData());
if (auth('contact')->user()) { if (auth()->guard('contact')->user()) {
App::forgetInstance('translator'); App::forgetInstance('translator');
$t = app('translator'); $t = app('translator');
$t->replace(Ninja::transformTranslations(auth('contact')->user()->client->getMergedSettings())); $t->replace(Ninja::transformTranslations(auth()->guard('contact')->user()->client->getMergedSettings()));
} }
} }
@ -63,21 +63,21 @@ class PortalComposer
*/ */
private function portalData() :array private function portalData() :array
{ {
if (! auth('contact')->user()) { if (! auth()->guard('contact')->user()) {
return []; return [];
} }
$this->settings = auth('contact')->user()->client->getMergedSettings(); $this->settings = auth()->guard('contact')->user()->client->getMergedSettings();
$data['sidebar'] = $this->sidebarMenu(); $data['sidebar'] = $this->sidebarMenu();
$data['header'] = []; $data['header'] = [];
$data['footer'] = []; $data['footer'] = [];
$data['countries'] = TranslationHelper::getCountries(); $data['countries'] = TranslationHelper::getCountries();
$data['company'] = auth('contact')->user()->company; $data['company'] = auth()->guard('contact')->user()->company;
$data['client'] = auth('contact')->user()->client; $data['client'] = auth()->guard('contact')->user()->client;
$data['settings'] = $this->settings; $data['settings'] = $this->settings;
$data['currencies'] = TranslationHelper::getCurrencies(); $data['currencies'] = TranslationHelper::getCurrencies();
$data['contact'] = auth('contact')->user(); $data['contact'] = auth()->guard('contact')->user();
$data['multiple_contacts'] = session()->get('multiple_contacts') ?: collect(); $data['multiple_contacts'] = session()->get('multiple_contacts') ?: collect();
@ -86,7 +86,7 @@ class PortalComposer
private function sidebarMenu() :array private function sidebarMenu() :array
{ {
$enabled_modules = auth('contact')->user()->company->enabled_modules; $enabled_modules = auth()->guard('contact')->user()->company->enabled_modules;
$data = []; $data = [];
// TODO: Enable dashboard once it's completed. // TODO: Enable dashboard once it's completed.
@ -114,13 +114,13 @@ class PortalComposer
$data[] = ['title' => ctrans('texts.payment_methods'), 'url' => 'client.payment_methods.index', 'icon' => 'shield']; $data[] = ['title' => ctrans('texts.payment_methods'), 'url' => 'client.payment_methods.index', 'icon' => 'shield'];
$data[] = ['title' => ctrans('texts.documents'), 'url' => 'client.documents.index', 'icon' => 'download']; $data[] = ['title' => ctrans('texts.documents'), 'url' => 'client.documents.index', 'icon' => 'download'];
if (auth('contact')->user()->client->getSetting('enable_client_portal_tasks')) { if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_tasks')) {
$data[] = ['title' => ctrans('texts.tasks'), 'url' => 'client.tasks.index', 'icon' => 'clock']; $data[] = ['title' => ctrans('texts.tasks'), 'url' => 'client.tasks.index', 'icon' => 'clock'];
} }
$data[] = ['title' => ctrans('texts.statement'), 'url' => 'client.statement', 'icon' => 'activity']; $data[] = ['title' => ctrans('texts.statement'), 'url' => 'client.statement', 'icon' => 'activity'];
if(Ninja::isHosted() && auth('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'];

View File

@ -458,14 +458,13 @@ class RecurringInvoice extends BaseModel
public function calculateDueDate($date) public function calculateDueDate($date)
{ {
//if nothing is set, assume we are using terms.
if(!$this->due_date_days)
return $this->calculateDateFromTerms($date);
switch ($this->due_date_days) { switch ($this->due_date_days) {
case 'terms': case 'terms':
case '':
return $this->calculateDateFromTerms($date); return $this->calculateDateFromTerms($date);
break; break;
default: default:
return $this->setDayOfMonth($date, $this->due_date_days); return $this->setDayOfMonth($date, $this->due_date_days);
break; break;

View File

@ -125,7 +125,7 @@ class AuthorizeCreditCard
{ {
$client_gateway_token = ClientGatewayToken::query() $client_gateway_token = ClientGatewayToken::query()
->where('id', $this->decodePrimaryKey($request->token)) ->where('id', $this->decodePrimaryKey($request->token))
->where('company_id', auth('contact')->user()->client->company->id) ->where('company_id', auth()->guard('contact')->user()->client->company->id)
->first(); ->first();
if (!$client_gateway_token) { if (!$client_gateway_token) {

View File

@ -109,7 +109,7 @@ class ACH implements MethodInterface
$customer = $this->braintree->findOrCreateCustomer(); $customer = $this->braintree->findOrCreateCustomer();
$token = ClientGatewayToken::query() $token = ClientGatewayToken::query()
->where('client_id', auth('contact')->user()->client->id) ->where('client_id', auth()->guard('contact')->user()->client->id)
->where('id', $this->decodePrimaryKey($request->source)) ->where('id', $this->decodePrimaryKey($request->source))
->firstOrFail(); ->firstOrFail();

View File

@ -145,7 +145,7 @@ class CreditCard implements MethodInterface
{ {
$cgt = ClientGatewayToken::query() $cgt = ClientGatewayToken::query()
->where('id', $this->decodePrimaryKey($request->input('token'))) ->where('id', $this->decodePrimaryKey($request->input('token')))
->where('company_id', auth('contact')->user()->client->company->id) ->where('company_id', auth()->guard('contact')->user()->client->company->id)
->first(); ->first();
if (!$cgt) { if (!$cgt) {

View File

@ -64,12 +64,12 @@ class ACH implements MethodInterface
'session_token' => $session_token, 'session_token' => $session_token,
]), ]),
"prefilled_customer" => [ "prefilled_customer" => [
"given_name" => auth('contact')->user()->first_name, "given_name" => auth()->guard('contact')->user()->first_name,
"family_name" => auth('contact')->user()->last_name, "family_name" => auth()->guard('contact')->user()->last_name,
"email" => auth('contact')->user()->email, "email" => auth()->guard('contact')->user()->email,
"address_line1" => auth('contact')->user()->client->address1, "address_line1" => auth()->guard('contact')->user()->client->address1,
"city" => auth('contact')->user()->client->city, "city" => auth()->guard('contact')->user()->client->city,
"postal_code" => auth('contact')->user()->client->postal_code, "postal_code" => auth()->guard('contact')->user()->client->postal_code,
], ],
], ],
]); ]);

View File

@ -62,12 +62,12 @@ class DirectDebit implements MethodInterface
'session_token' => $session_token, 'session_token' => $session_token,
]), ]),
'prefilled_customer' => [ 'prefilled_customer' => [
'given_name' => auth('contact')->user()->first_name, 'given_name' => auth()->guard('contact')->user()->first_name,
'family_name' => auth('contact')->user()->last_name, 'family_name' => auth()->guard('contact')->user()->last_name,
'email' => auth('contact')->user()->email, 'email' => auth()->guard('contact')->user()->email,
'address_line1' => auth('contact')->user()->client->address1, 'address_line1' => auth()->guard('contact')->user()->client->address1,
'city' => auth('contact')->user()->client->city, 'city' => auth()->guard('contact')->user()->client->city,
'postal_code' => auth('contact')->user()->client->postal_code, 'postal_code' => auth()->guard('contact')->user()->client->postal_code,
], ],
], ],
]); ]);

View File

@ -63,12 +63,12 @@ class SEPA implements MethodInterface
'session_token' => $session_token, 'session_token' => $session_token,
]), ]),
'prefilled_customer' => [ 'prefilled_customer' => [
'given_name' => auth('contact')->user()->first_name, 'given_name' => auth()->guard('contact')->user()->first_name,
'family_name' => auth('contact')->user()->last_name, 'family_name' => auth()->guard('contact')->user()->last_name,
'email' => auth('contact')->user()->email, 'email' => auth()->guard('contact')->user()->email,
'address_line1' => auth('contact')->user()->client->address1, 'address_line1' => auth()->guard('contact')->user()->client->address1,
'city' => auth('contact')->user()->client->city, 'city' => auth()->guard('contact')->user()->client->city,
'postal_code' => auth('contact')->user()->client->postal_code, 'postal_code' => auth()->guard('contact')->user()->client->postal_code,
], ],
], ],
]); ]);

View File

@ -74,13 +74,13 @@ class ACH
$mailer = new NinjaMailerObject(); $mailer = new NinjaMailerObject();
$mailer->mailable = new ACHVerificationNotification( $mailer->mailable = new ACHVerificationNotification(
auth('contact')->user()->client->company, auth()->guard('contact')->user()->client->company,
route('client.contact_login', ['contact_key' => auth('contact')->user()->contact_key, 'next' => $verification]) route('client.contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'next' => $verification])
); );
$mailer->company = auth('contact')->user()->client->company; $mailer->company = auth()->guard('contact')->user()->client->company;
$mailer->settings = auth('contact')->user()->client->company->settings; $mailer->settings = auth()->guard('contact')->user()->client->company->settings;
$mailer->to_user = auth('contact')->user(); $mailer->to_user = auth()->guard('contact')->user();
NinjaMailerJob::dispatch($mailer); NinjaMailerJob::dispatch($mailer);
@ -210,7 +210,7 @@ class ACH
$source = ClientGatewayToken::query() $source = ClientGatewayToken::query()
->where('id', $this->decodePrimaryKey($request->source)) ->where('id', $this->decodePrimaryKey($request->source))
->where('company_id', auth('contact')->user()->client->company->id) ->where('company_id', auth()->guard('contact')->user()->client->company->id)
->first(); ->first();
if (!$source) { if (!$source) {

View File

@ -66,13 +66,13 @@ class ACSS
$mailer = new NinjaMailerObject(); $mailer = new NinjaMailerObject();
$mailer->mailable = new ACHVerificationNotification( $mailer->mailable = new ACHVerificationNotification(
auth('contact')->user()->client->company, auth()->guard('contact')->user()->client->company,
route('client.contact_login', ['contact_key' => auth('contact')->user()->contact_key, 'next' => $verification]) route('client.contact_login', ['contact_key' => auth()->guard('contact')->user()->contact_key, 'next' => $verification])
); );
$mailer->company = auth('contact')->user()->client->company; $mailer->company = auth()->guard('contact')->user()->client->company;
$mailer->settings = auth('contact')->user()->client->company->settings; $mailer->settings = auth()->guard('contact')->user()->client->company->settings;
$mailer->to_user = auth('contact')->user(); $mailer->to_user = auth()->guard('contact')->user();
NinjaMailerJob::dispatch($mailer); NinjaMailerJob::dispatch($mailer);

View File

@ -91,7 +91,7 @@ class SubscriptionService
'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id),
'client' => $recurring_invoice->client->hashed_id, 'client' => $recurring_invoice->client->hashed_id,
'subscription' => $this->subscription->hashed_id, 'subscription' => $this->subscription->hashed_id,
'contact' => auth('contact')->user() ? auth('contact')->user()->hashed_id : $recurring_invoice->client->contacts()->first()->hashed_id, 'contact' => auth()->guard('contact')->user() ? auth()->guard('contact')->user()->hashed_id : $recurring_invoice->client->contacts()->first()->hashed_id,
'account_key' => $recurring_invoice->client->custom_value2, 'account_key' => $recurring_invoice->client->custom_value2,
]; ];
@ -452,7 +452,7 @@ class SubscriptionService
'credit' => $credit ? $credit->hashed_id : null, 'credit' => $credit ? $credit->hashed_id : null,
'client' => $new_recurring_invoice->client->hashed_id, 'client' => $new_recurring_invoice->client->hashed_id,
'subscription' => $target_subscription->hashed_id, 'subscription' => $target_subscription->hashed_id,
'contact' => auth('contact')->user()->hashed_id, 'contact' => auth()->guard('contact')->user()->hashed_id,
'account_key' => $new_recurring_invoice->client->custom_value2, 'account_key' => $new_recurring_invoice->client->custom_value2,
]; ];
@ -573,7 +573,7 @@ class SubscriptionService
'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id),
'client' => $recurring_invoice->client->hashed_id, 'client' => $recurring_invoice->client->hashed_id,
'subscription' => $this->subscription->hashed_id, 'subscription' => $this->subscription->hashed_id,
'contact' => auth('contact')->user()->hashed_id, 'contact' => auth()->guard('contact')->user()->hashed_id,
'account_key' => $recurring_invoice->client->custom_value2, 'account_key' => $recurring_invoice->client->custom_value2,
]; ];
@ -921,7 +921,7 @@ class SubscriptionService
'subscription' => $this->subscription->hashed_id, 'subscription' => $this->subscription->hashed_id,
'recurring_invoice' => $recurring_invoice->hashed_id, 'recurring_invoice' => $recurring_invoice->hashed_id,
'client' => $recurring_invoice->client->hashed_id, 'client' => $recurring_invoice->client->hashed_id,
'contact' => auth('contact')->user()->hashed_id, 'contact' => auth()->guard('contact')->user()->hashed_id,
'account_key' => $recurring_invoice->client->custom_value2, 'account_key' => $recurring_invoice->client->custom_value2,
]; ];

View File

@ -71,7 +71,7 @@ class ZeroCostProduct extends AbstractService
'invoice' => $invoice->hashed_id, 'invoice' => $invoice->hashed_id,
'client' => $recurring_invoice->client->hashed_id, 'client' => $recurring_invoice->client->hashed_id,
'subscription' => $this->subscription->hashed_id, 'subscription' => $this->subscription->hashed_id,
'contact' => auth('contact')->user()->hashed_id, 'contact' => auth()->guard('contact')->user()->hashed_id,
'redirect_url' => "/client/recurring_invoices/{$recurring_invoice->hashed_id}", 'redirect_url' => "/client/recurring_invoices/{$recurring_invoice->hashed_id}",
]; ];

View File

@ -2,7 +2,7 @@
@section('meta_title', ctrans('texts.purchase')) @section('meta_title', ctrans('texts.purchase'))
@section('body') @section('body')
@livewire('billing-portal-purchase', ['subscription' => $subscription, 'company' => $subscription->company, 'contact' => auth('contact')->user(), 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null]) @livewire('billing-portal-purchase', ['subscription' => $subscription, 'company' => $subscription->company, 'contact' => auth()->guard('contact')->user(), 'hash' => $hash, 'request_data' => $request_data, 'campaign' => request()->query('campaign') ?? null])
@stop @stop
@push('footer') @push('footer')

View File

@ -1,7 +1,7 @@
<footer class="bg-white px-4 py-5 shadow px-4 sm:px-6 md:px-8 flex justify-center border-t border-gray-200 justify-between items-center" x-data="{ privacy: false, tos: false }"> <footer class="bg-white px-4 py-5 shadow px-4 sm:px-6 md:px-8 flex justify-center border-t border-gray-200 justify-between items-center" x-data="{ privacy: false, tos: false }">
<section> <section>
@if(auth('contact')->user() && auth('contact')->user()->user->account->isPaid()) @if(auth()->guard('contact')->user() && auth()->guard('contact')->user()->user->account->isPaid())
<span class="text-xs md:text-sm text-gray-700">{{ ctrans('texts.footer_label', ['company' => auth('contact')->user()->company->present()->name(), 'year' => date('Y')]) }}</span> <span class="text-xs md:text-sm text-gray-700">{{ ctrans('texts.footer_label', ['company' => auth()->guard('contact')->user()->company->present()->name(), 'year' => date('Y')]) }}</span>
@else @else
<span href="https://invoiceninja.com" target="_blank" class="text-xs md:text-sm text-gray-700"> <span href="https://invoiceninja.com" target="_blank" class="text-xs md:text-sm text-gray-700">
{{ ctrans('texts.copyright') }} &copy; {{ date('Y') }} {{ ctrans('texts.copyright') }} &copy; {{ date('Y') }}
@ -26,7 +26,7 @@
</div> </div>
</section> </section>
@if(auth('contact')->user()->user && !auth('contact')->user()->user->account->isPaid()) @if(auth()->guard('contact')->user()->user && !auth()->guard('contact')->user()->user->account->isPaid())
<a href="https://invoiceninja.com" target="_blank"> <a href="https://invoiceninja.com" target="_blank">
<img class="h-8" src="{{ asset('images/invoiceninja-black-logo-2.png') }}" alt="Invoice Ninja Logo"> <img class="h-8" src="{{ asset('images/invoiceninja-black-logo-2.png') }}" alt="Invoice Ninja Logo">
</a> </a>

View File

@ -2,8 +2,8 @@
<div class="flex flex-col w-64"> <div class="flex flex-col w-64">
<div class="flex items-center h-16 flex-shrink-0 px-4 bg-white border-r justify-center z-10"> <div class="flex items-center h-16 flex-shrink-0 px-4 bg-white border-r justify-center z-10">
<a href="{{ route('client.dashboard') }}"> <a href="{{ route('client.dashboard') }}">
<img class="h-10 w-auto" src="{!! auth('contact')->user()->company->present()->logo($settings) !!}" <img class="h-10 w-auto" src="{!! auth()->guard('contact')->user()->company->present()->logo($settings) !!}"
alt="{{ auth('contact')->user()->company->present()->name() }} logo"/> alt="{{ auth()->guard('contact')->user()->company->present()->name() }} logo"/>
</a> </a>
</div> </div>
<div class="h-0 flex-1 flex flex-col overflow-y-auto z-0 border-r"> <div class="h-0 flex-1 flex flex-col overflow-y-auto z-0 border-r">
@ -24,7 +24,7 @@
@endforeach @endforeach
</nav> </nav>
@if(!auth('contact')->user()->user->account->isPaid()) @if(!auth()->guard('contact')->user()->user->account->isPaid())
<div class="flex-shrink-0 flex bg-white p-4 justify-center"> <div class="flex-shrink-0 flex bg-white p-4 justify-center">
<div class="flex items-center"> <div class="flex items-center">
<a target="_blank" href="https://www.facebook.com/invoiceninja/"> <a target="_blank" href="https://www.facebook.com/invoiceninja/">

View File

@ -12,7 +12,7 @@
<div> <div>
<span class="rounded shadow-sm"> <span class="rounded shadow-sm">
<button x-on:click="open = !open" x-on:click.away="open = false" type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring-blue active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150"> <button x-on:click="open = !open" x-on:click.away="open = false" type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring-blue active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150">
<span class="hidden md:block mr-1">{{ auth('contact')->user()->company->present()->name }}</span> <span class="hidden md:block mr-1">{{ auth()->guard('contact')->user()->company->present()->name }}</span>
<svg class="md:-mr-1 md:ml-2 h-5 w-5" fill="currentColor" viewBox="0 0 20 20"> <svg class="md:-mr-1 md:ml-2 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg> </svg>
@ -37,8 +37,8 @@
<div> <div>
<button data-ref="client-profile-dropdown" @click="open = !open" <button data-ref="client-profile-dropdown" @click="open = !open"
class="max-w-xs flex items-center text-sm rounded-full focus:outline-none focus:ring"> class="max-w-xs flex items-center text-sm rounded-full focus:outline-none focus:ring">
<img class="h-8 w-8 rounded-full" src="{{ auth('contact')->user()->avatar() }}" alt=""/> <img class="h-8 w-8 rounded-full" src="{{ auth()->guard('contact')->user()->avatar() }}" alt=""/>
<span class="ml-2 hidden sm:block">{{ auth('contact')->user()->present()->name() }}</span> <span class="ml-2 hidden sm:block">{{ auth()->guard('contact')->user()->present()->name() }}</span>
</button> </button>
</div> </div>
<div x-show="open" style="display:none;" x-transition:enter="transition ease-out duration-100" <div x-show="open" style="display:none;" x-transition:enter="transition ease-out duration-100"
@ -50,7 +50,7 @@
class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg"> class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg">
<div class="py-1 rounded-md bg-white ring-1 ring-black ring-opacity-5"> <div class="py-1 rounded-md bg-white ring-1 ring-black ring-opacity-5">
<a data-ref="client-profile-dropdown-settings" <a data-ref="client-profile-dropdown-settings"
href="{{ route('client.profile.edit', ['client_contact' => auth('contact')->user()->hashed_id]) }}" href="{{ route('client.profile.edit', ['client_contact' => auth()->guard('contact')->user()->hashed_id]) }}"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150"> class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 transition ease-in-out duration-150">
{{ ctrans('texts.profile') }} {{ ctrans('texts.profile') }}
</a> </a>

View File

@ -9,7 +9,7 @@
</button> </button>
</div> </div>
<div class="flex-shrink-0 flex items-center px-4"> <div class="flex-shrink-0 flex items-center px-4">
<img class="h-8 w-auto" src="{!! auth('contact')->user()->company->present()->logo($settings) !!}" alt="{{ auth('contact')->user()->company->present()->name() }} logo" /> <img class="h-8 w-auto" src="{!! auth()->guard('contact')->user()->company->present()->logo($settings) !!}" alt="{{ auth()->guard('contact')->user()->company->present()->name() }} logo" />
</div> </div>
<div class="mt-5 flex-1 h-0 overflow-y-auto"> <div class="mt-5 flex-1 h-0 overflow-y-auto">
<nav class="flex-1 pb-4 pt-0 bg-white"> <nav class="flex-1 pb-4 pt-0 bg-white">
@ -28,7 +28,7 @@
@endforeach @endforeach
</nav> </nav>
@if(!auth('contact')->user()->user->account->isPaid()) @if(!auth()->guard('contact')->user()->user->account->isPaid())
<div class="flex-shrink-0 flex bg-white p-4 justify-center"> <div class="flex-shrink-0 flex bg-white p-4 justify-center">
<div class="flex items-center"> <div class="flex items-center">
<a target="_blank" href="https://www.facebook.com/invoiceninja/"> <a target="_blank" href="https://www.facebook.com/invoiceninja/">

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -70,7 +70,7 @@
@component('portal.ninja2020.components.general.card-element-single') @component('portal.ninja2020.components.general.card-element-single')
<input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required> <input type="checkbox" class="form-checkbox mr-1" id="accept-terms" required>
<label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth('contact')->user()->client->company->settings->email]) }}</label> <label for="accept-terms" class="cursor-pointer">{{ ctrans('texts.ach_authorization', ['company' => auth()->user()->company->present()->name, 'email' => auth()->guard('contact')->user()->client->company->settings->email]) }}</label>
@endcomponent @endcomponent
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button']) @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'save-button'])

View File

@ -57,7 +57,7 @@
<!-- Styles --> <!-- Styles -->
<link href="{{ mix('css/app.css') }}" rel="stylesheet"> <link href="{{ mix('css/app.css') }}" rel="stylesheet">
@if(!auth('contact')->user()->user->account->isPaid()) @if(!auth()->guard('contact')->user()->user->account->isPaid())
<link href="{{ asset('favicon.png') }}" rel="shortcut icon" type="image/png"> <link href="{{ asset('favicon.png') }}" rel="shortcut icon" type="image/png">
@endif @endif

View File

@ -32,7 +32,7 @@
<!-- Title --> <!-- Title -->
@auth() @auth()
<title>@yield('meta_title', '') {{ auth('contact')->user()->user->account->isPaid() ? auth('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title> <title>@yield('meta_title', '') {{ auth()->guard('contact')->user()->user->account->isPaid() ? auth()->guard('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title>
@endauth @endauth
@guest @guest

View File

@ -11,7 +11,7 @@
@endpush @endpush
@section('body') @section('body')
@livewire('required-client-info', ['fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact' => auth('contact')->user(), 'countries' => $countries, 'company' => $company]) @livewire('required-client-info', ['fields' => method_exists($gateway, 'getClientRequiredFields') ? $gateway->getClientRequiredFields() : [], 'contact' => auth()->guard('contact')->user(), 'countries' => $countries, 'company' => $company])
<div class="container mx-auto grid grid-cols-12 opacity-25 pointer-events-none" data-ref="gateway-container"> <div class="container mx-auto grid grid-cols-12 opacity-25 pointer-events-none" data-ref="gateway-container">
<div class="col-span-12 lg:col-span-6 lg:col-start-4 overflow-hidden bg-white shadow rounded-lg"> <div class="col-span-12 lg:col-span-6 lg:col-start-4 overflow-hidden bg-white shadow rounded-lg">

View File

@ -32,7 +32,7 @@
<!-- Title --> <!-- Title -->
@auth() @auth()
<title>@yield('meta_title', '') {{ auth('contact')->user()->user->account->isPaid() ? auth('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title> <title>@yield('meta_title', '') {{ auth()->guard('contact')->user()->user->account->isPaid() ? auth()->guard('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title>
@endauth @endauth
@guest @guest