Compare commits
2 Commits
d6a2c70146
...
bfbf512b0d
Author | SHA1 | Date | |
---|---|---|---|
bfbf512b0d | |||
1bae121481 |
@ -44,16 +44,15 @@ class SearchController extends Controller
|
||||
|
||||
// Look for User by their Supplier ID with some suppliers
|
||||
if (is_numeric($request->input('term')))
|
||||
foreach (User::select(['users.*','suppliers.name AS supplier_name','supplier_user.id AS pivot_id'])
|
||||
->join('supplier_user',['supplier_user.user_id'=>'users.id'])
|
||||
->join('suppliers',['suppliers.id'=>'supplier_user.supplier_id'])
|
||||
->whereIN('user_id',$user_ids)
|
||||
->where('supplier_user.id','like','%'.$request->input('term').'%')
|
||||
->orderBy('lastname')
|
||||
->orderBy('firstname')
|
||||
foreach (Account::select(['user_id','suppliers.name AS supplier_name','account_supplier.supplier_ref AS pivot_id'])
|
||||
->join('account_supplier',['account_supplier.account_id'=>'accounts.id'])
|
||||
->join('suppliers',['suppliers.id'=>'account_supplier.supplier_id'])
|
||||
->whereIN('accounts.id',$account_ids)
|
||||
->where('account_supplier.supplier_ref','like','%'.$request->input('term').'%')
|
||||
->orderBy('company')
|
||||
->limit(10)->get() as $o)
|
||||
{
|
||||
$result->push(['name'=>sprintf('%s (%s:%s)',$o->name,$o->supplier_name,$o->pivot_id),'value'=>'/u/home/'.$o->id,'category'=>'Suppliers']);
|
||||
$result->push(['name'=>sprintf('%s (%s:%s)',$o->company,$o->supplier_name,$o->supplier_ref),'value'=>'/u/home/'.$o->user_id,'category'=>'Suppliers']);
|
||||
}
|
||||
|
||||
// Look for Account
|
||||
|
@ -28,11 +28,11 @@
|
||||
<div class="card">
|
||||
<div class="card-header bg-dark d-flex p-0">
|
||||
<ul class="nav nav-pills w-100 p-2">
|
||||
@if ($x=! ($o->suspend_billing || $o->external_billing))
|
||||
@if($x=! ($o->suspend_billing || $o->external_billing))
|
||||
<li class="nav-item"><a @class(['nav-link','active'=>! session()->has('service_update')]) href="#pending_items" data-toggle="tab">Pending Items</a></li>
|
||||
@endif
|
||||
|
||||
@if ($o->product->hasUsage())
|
||||
@if($o->product->hasUsage())
|
||||
<li class="nav-item"><a @class(['nav-link','active'=>! ($x || session()->has('service_update'))]) href="#traffic" data-toggle="tab">Traffic</a></li>
|
||||
@endif
|
||||
|
||||
@ -61,15 +61,15 @@
|
||||
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
@if ($x=! ($o->suspend_billing || $o->external_billing))
|
||||
@if($x=! ($o->suspend_billing || $o->external_billing))
|
||||
<div @class(['tab-pane','fade','show active'=>! session()->has('service_update')]) id="pending_items">
|
||||
@include('theme.backend.adminlte.service.widget.invoice')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($o->product->hasUsage())
|
||||
@if($o->product->hasUsage())
|
||||
<div @class(['tab-pane','fade','show active'=>! ($x || session()->has('service_update'))]) id="traffic">
|
||||
@if ($o->type->usage(30)->count())
|
||||
@if($o->type->usage(30)->count())
|
||||
@include('theme.backend.adminlte.service.widget.'.$o->product->category.'.usagegraph',['o'=>$o->type])
|
||||
@endif
|
||||
</div>
|
||||
|
@ -18,6 +18,7 @@
|
||||
<th>Address</th>
|
||||
<td>{{ $o->service_address }}</td>
|
||||
</tr>
|
||||
@if($o->pppoe)
|
||||
<tr>
|
||||
<th>Service Number</th>
|
||||
<td>{{ $o->service_number }}</td>
|
||||
@ -26,6 +27,12 @@
|
||||
<th>Service Username</th>
|
||||
<td>{{ $o->service_username }}</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<th>Service Type</th>
|
||||
<td>Layer 2</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>Service Password</th>
|
||||
<td>{{ $o->service_password }}</td>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<div class="col-1"></div>
|
||||
|
||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||
<x-leenooks::form.date id="invoice_next_at" name="invoice_next_at" icon="fa-calendar" label="Billing Start Date" :value="($o->invoice_next_at ?: $o->connect_at)?->format('Y-m-d')"/>
|
||||
<x-leenooks::form.date id="invoice_next_at" name="invoice_next_at" icon="fa-calendar" label="Billing Start Date" :value="($o->getRawOriginal('invoice_next_at') ?: $o->getRawOriginal('connect_at'))"/>
|
||||
</div>
|
||||
|
||||
<!-- Price -->
|
||||
|
Loading…
Reference in New Issue
Block a user