Update composer and move themes to under views

This commit is contained in:
Deon George
2020-04-14 17:14:43 +10:00
parent 26365c57ff
commit 4dfa8f1122
61 changed files with 52 additions and 153 deletions

View File

@@ -0,0 +1,106 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Product List
@endsection
@section('page_title')
Product List
@endsection
@section('contentheader_title')
Product List
@endsection
@section('contentheader_description')
@endsection
@section('main-content')
<div class="col-md-12">
<table class="table table-sm table-striped" id="table">
<thead>
<tr>
<th>ID</th>
<th>Service</th>
<th>Product</th>
<th>Monthly</th>
<th>Cost</th>
<th>Traffic</th>
</tr>
</thead>
<tbody>
@foreach (\App\Models\Service::active()->get() as $o)
<tr>
<td><a href="{{ url('u/service',[$o->id]) }}">{{ $o->id }}</a></td>
<td>{{ $o->sname }}</td>
<td>{{ $o->product->name }}</td>
<td>{{ number_format($o->billing_monthly_price,2) }}</td>
<td>{{ $o->product->type ? number_format($o->product->type->cost,2) : 'NO TYPE' }}</td>
<td>{{ $o->product->type ? $o->product->type->allowance_string() : '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','datatables-css')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','datatables-js')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','datatables-responsive-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','datatables-responsive-js')
@css('//cdn.datatables.net/rowgroup/1.1.0/css/rowGroup.dataTables.min.css','datatables-rowgroup-css')
@js('//cdn.datatables.net/rowgroup/1.1.0/js/dataTables.rowGroup.min.js','datatables-rowgroup-js')
@css('//cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css','datatables-button-css')
@js('//cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js','datatables-button-js')
@css('//cdn.datatables.net/fixedheader/3.1.5/css/fixedHeader.dataTables.min.css','datatables-fixed-css')
@js('//cdn.datatables.net/fixedheader/3.1.5/js/dataTables.fixedHeader.min.js','datatables-fixed-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','datatables-bootstrap4-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','datatables-bootstrap4-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','datatables-bootstrap4-css')
@js('//cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js','jszip')
@js('//cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js','datatables-buttons-html5')
<style>
tr.odd td:first-child,
tr.even td:first-child {
padding-left: 3em;
}
table.dataTable tr.dtrg-group.dtrg-level-1 td {
background-color: #e0e0e0;
color: #4c110f;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#table').DataTable({
//oSearch: { sSearch: searchString ? decodeURIComponent(searchString) : '' },
aLengthMenu: [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]
],
paging: true,
pageLength: 25,
lengthChange: true,
searching: true,
ordering: true,
info: true,
autoWidth: false,
fixedHeader: true,
order: [
[2,'asc'],
[1,'asc'],
],
rowGroup: {
dataSrc: [2],
},
columnDefs: [
{
targets: [2],
visible: false,
},
],
});
});
</script>
@append

View File

@@ -0,0 +1,71 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Service #{{ $o->id }}
@endsection
@section('contentheader_title')
Service #
@endsection
@section('contentheader_description')
{{ $o->service_id }}
@endsection
@section('main-content')
<div class="col-md-12">
<div class="box box-primary">
<form role="form" method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="box-header with-border">
<h3 class="box-title">Service Information</h3>
</div>
<div class="box-body">
<div class="col-md-3">
@switch($o->order_status)
@case('ORDER-SUBMIT')
@include('a.widgets.service.order.submit')
@break
@case('ORDER-HOLD')
@case('ORDER-SENT')
@case('ORDERED')
@include('a.widgets.service.order.sent')
@break
@default
@include('u.widgets.service.info')
@endswitch
</div>
@if($o->order_status == 'ORDER-REQUEST')
<div class="col-md-3">
@include('a.widgets.service_order-request')
</div>
@endif
</div>
<div class="box-footer">
@switch($o->order_status)
@case('ORDER-SUBMIT')
<button type="submit" class="btn btn-info btn-danger" name="action" value="reject">Reject</button>
<button type="submit" class="btn btn-info btn-danger" name="action" value="hold">Hold</button>
<button type="submit" class="btn btn-info btn-warning" name="action" value="approve">Approve</button>
@break;
@case('ORDER-HOLD')
<button type="submit" class="btn btn-info btn-warning" name="action" value="release">Release</button>
@case('ORDER-SENT')
@case('ORDERED')
<button type="submit" class="btn btn-info btn-danger" name="action" value="update_reference">Update</button>
@break;
@endswitch
{{-- <button type="submit" class="btn btn-info" name="action" value="save">Back</button> --}}
</div>
</form>
</div>
</div>
@endsection

View File

@@ -0,0 +1,32 @@
<table class="table table-sm">
<tr>
<th>Supplier</th><td>{{ $o->product->type ? $o->product->type->supplier->name : 'Supplier Unknown' }}</td>
</tr>
<tr>
<th>Supplier Product</th><td>#{{ $o->product_id }}: {{ $o->product->type ? $o->product->type->product->product_id : 'Product Unknown' }}</td>
</tr>
@if($o->product->type)
<tr>
<!-- @todo Tax shouldnt be hard coded -->
<th>Supplier Setup</th><td>${{ number_format($o->product->type->product->setup_cost*1.1,2) }}</td>
</tr>
<tr>
<th>Supplier Cost</th><td>${{ number_format($o->product->type->cost,2) }}</td>
</tr>
<tr>
<th>Supplier Contract</th><td>{{ $o->product->type->product->contract_term }} months</td>
</tr>
<tr>
<!-- @todo Tax shouldnt be hard coded -->
<th>Supplier Min Cost</th><td>${{ number_format((($x=$o->product->type->product)->setup_cost+$x->base_cost*$x->contract_term)*1.1,2) }}</td>
</tr>
@endif
<tr>
<th>Price</th><td>${{ number_format($o->billing_monthly_price,2) }} <small>(${{ number_format($o->billing_monthly_price*12,2) }} Annually)</small></td>
</tr>
@if($o->product->type AND $o->product->type->cost)
<tr>
<th>Markup</th><td>{{ number_format(($o->billing_monthly_price/$o->product->type->cost-1)*100,2) }}%</td>
</tr>
@endif
</table>

View File

@@ -0,0 +1,87 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Setup
@endsection
@section('contentheader_title')
{{ $so->site_name }}
@endsection
@section('contentheader_description')
Setup
@endsection
@section('main-content')
<div class="col-md-9">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Setup Configuration</h3>
</div>
<form role="form" method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
@if(session()->has('success'))
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="callout callout-success">
<p>{{ session()->get('success') }}</p>
</div>
</div>
</div>
@endif
@if($errors->any())
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="callout callout-danger">
<p>Some validation errors to look at.</p>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-site" data-toggle="tab">Site Details</a></li>
<li><a href="#tab-other" data-toggle="tab">Other</a></li>
</ul>
<div class="box-body">
<div class="tab-content">
<div class="tab-pane active" id="tab-site">
@include('a.widgets.setup_site_details')
</div>
<div class="tab-pane" id="tab-other">
Other Details
</div>
</div>
</div>
<div class="box-footer">
<button type="submit" class="btn btn-info">Save</button>
</div>
</div>
</form>
</div>
</div>
@endsection
@section('page-scripts')
@js('/js/jqBootstrapValidation.js','jq-validation','jquery')
<script>
$(function () { $("input,select,textarea").not("[type=submit]").jqBootstrapValidation(); } );
</script>
<style>
span.help-block > ul {
color: #9d0000;
padding-left: 5px;
list-style-type: none;
}
</style>
@append

View File

@@ -0,0 +1,52 @@
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">New Order Sent to Supplier</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
<i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<table class="table table-condensed" width="100%">
<tr>
<th>Account</th><td>{{ $o->account->company }}</td>
</tr>
<tr>
<th>Product</th><td>{{ $o->product->name }}: {{ $o->name }}</td>
</tr>
@if($o->date_last_invoice)
<tr>
<th>Last Invoice</th><td>{{ $o->date_last_invoice }}</td>
</tr>
<tr>
<th>Paid Until</th><td>{{ 'TBA' }}</td>
</tr>
<tr>
<th>Next Invoice</th><td>{{ $o->date_next_invoice }}</td>
</tr>
@endif
<tr>
<th>Ordered</th><td>{{ $o->date_orig->format('Y-m-d') }}</td>
</tr>
@if ($o->date_last)
<tr>
<th>Update</th><td>{{ $o->date_last->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Order Details</th><td>{!! $o->order_info_details !!}</td>
</tr>
<tr>
<th>Reference:</th><td><input type="text" name="notes" class="" value="{{ \Illuminate\Support\Arr::get($o->order_info,'order_reference','') }}"></td>
</tr>
</table>
</div>
{{--
<div class="box-footer">
</div>
--}}
</div>

View File

@@ -0,0 +1,52 @@
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">New Order Submitted</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
<i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<table class="table table-condensed" width="100%">
<tr>
<th>Account</th><td>{{ $o->account->company }}</td>
</tr>
<tr>
<th>Product</th><td>{{ $o->product->name }}: {{ $o->name }}</td>
</tr>
@if($o->date_last_invoice)
<tr>
<th>Last Invoice</th><td>{{ $o->date_last_invoice }}</td>
</tr>
<tr>
<th>Paid Until</th><td>{{ 'TBA' }}</td>
</tr>
<tr>
<th>Next Invoice</th><td>{{ $o->date_next_invoice }}</td>
</tr>
@endif
<tr>
<th>Ordered</th><td>{{ $o->date_orig->format('Y-m-d') }}</td>
</tr>
@if ($o->date_last)
<tr>
<th>Update</th><td>{{ $o->date_last->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Order Details</th><td>{!! $o->order_info_details !!}</td>
</tr>
<tr>
<th>Save/Reject Note:</th><td><input type="text" name="notes" class=""></td>
</th>
</table>
</div>
{{--
<div class="box-footer">
</div>
--}}
</div>

View File

@@ -0,0 +1,66 @@
<div class="form-group col-sm-12 {{ $errors->has('site_name') ? 'has-error' : '' }}">
<label for="site_name">Site Name</label>
<input type="text" class="form-control" id="site_name" name="site_name" placeholder="Site Name" value="{{ old('site_name',$so->site_name) }}">
<span class="help-block">{{ $errors->first('site_name') }}</span>
</div>
<div class="form-group col-sm-9 {{ $errors->has('site_description') ? 'has-error' : '' }}">
<label for="site_description">Site Description</label>
<textarea class="form-control" id="site_description" name="site_description" placeholder="Site Description" rows="3">{{ old('site_description',$so->site_description) }}</textarea>
<span class="help-block">{{ $errors->first('site_description') }}</span>
</div>
<div class="form-group col-sm-3 {{ $errors->has('site_logo') ? 'has-error' : '' }}">
<label for="site_logo">Site Logo</label>
<input type="file" class="form-control" id="site_logo" name="site_logo"><img class="col-sm-12" src="{{ asset($so->site_logo) }}">
<span class="help-block">{{ $errors->first('site_logo') }}</span>
</div>
<fieldset class="form-group col-sm-12">
<label>Site Address</label>
<div class="form-group col-sm-12 {{ $errors->has('site_address1') ? 'has-error' : '' }}">
<label for="site_address">Site Address Lines</label>
<input type="text" class="form-control" id="site_address1" name="site_address1" placeholder="Address1" value="{{ old('site_address1',$so->site_address1) }}">
<input type="text" class="form-control" id="site_address2" name="site_address2" placeholder="Address2" value="{{ old('site_address2',$so->site_address2) }}">
<span class="help-block">{{ $errors->first('site_address1') }} {{ $errors->first('site_address2') }}</span>
</div>
<div class="form-group col-sm-6 {{ $errors->has('site_city') ? 'has-error' : '' }}">
<label for="site_address">Site City</label>
<input type="text" class="form-control" id="site_city" name="site_city" placeholder="City" value="{{ old('site_city',$so->site_city) }}">
<span class="help-block">{{ $errors->first('site_city') }}</span>
</div>
<div class="form-group col-sm-3 {{ $errors->has('site_state') ? 'has-error' : '' }}">
<label for="site_address">Site State</label>
<input type="text" class="form-control col-sm-3" id="site_state" name="site_state" placeholder="State" value="{{ old('site_state',$so->site_state) }}">
<span class="help-block">{{ $errors->first('site_state') }}</span>
</div>
<div class="form-group col-sm-3 {{ $errors->has('site_postcode') ? 'has-error' : '' }}">
<label for="site_address">Site Post Code</label>
<input type="text" class="form-control col-sm-3" id="site_postcode" name="site_postcode" placeholder="Post Code" value="{{ old('site_postcode',$so->site_postcode) }}">
<span class="help-block">{{ $errors->first('site_postcode') }}</span>
</div>
</fieldset>
<div class="form-group col-sm-6 {{ $errors->has('site_phone') ? 'has-error' : '' }}">
<label for="site_phone">Site Phone</label>
<input class="form-control" id="site_phone" name="site_phone" placeholder="Site Phone" value="{{ old('site_phone',$so->site_phone) }}">
<span class="help-block">{{ $errors->first('site_phone') }}</span>
</div>
<div class="form-group col-sm-6 {{ $errors->has('site_fax') ? 'has-error' : '' }}">
<label for="site_fax">Site Fax</label>
<input class="form-control" id="site_fax" name="site_fax" placeholder="Site Fax" value="{{ old('site_fax',$so->site_fax) }}">
<span class="help-block">{{ $errors->first('site_fax') }}</span>
</div>
<div class="control-group form-group col-sm-6 {{ $errors->has('site_email') ? 'has-error' : '' }}">
<label for="site_email">Site Email</label>
<input type="email" class="form-control" id="site_email" name="site_email" placeholder="Site Email" value="{{ old('site_email',$so->site_email) }}">
<span class="help-block">{{ $errors->first('site_email') }}</span>
</div>
<div class="control-group form-group col-sm-6 {{ $errors->has('site_tax') ? 'has-error' : '' }}">
<label for="site_tax">Site Tax Number</label>
<div class="input-group">
<span class="input-group-addon">ABN</span>
<input type="number" class="form-control" id="site_tax" name="site_tax" minlength="10" maxlength="10" placeholder="Site Tax" value="{{ old('site_tax',$so->site_tax) }}">
</div>
<span class="help-block">{{ $errors->first('site_tax') }}</span>
</div>

View File

@@ -0,0 +1,80 @@
@extends('adminlte::layouts.auth')
@section('htmlheader_title')
Link Account
@endsection
@section('content')
<div class="login-box">
<div class="login-logo">
<a>{!! config('app.name_html_long') !!}</a>
</div>
<div class="alert alert-success">
<strong>NOTE:</strong> Link your account.<br><br>
<ul>
<li>An email has been sent to you with a token, please use those details here:</li>
</ul>
</div>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Link your account</p>
<form method="post" action="{{ url('/auth/'.$provider.'/linkcomplete') }}">
{{ csrf_field() }}
<input type="hidden" name="oauthid" value="{{ $oauthid }}">
<div class="input-group mb-3">
<input type="email" name="email" class="form-control" placeholder="Email">
<div class="input-group-append">
<span class="fa fa-envelope input-group-text"></span>
</div>
</div>
<div class="input-group mb-3">
<input type="password" name="token" class="form-control" placeholder="Token">
<div class="input-group-append">
<span class="fa fa-lock input-group-text"></span>
</div>
</div>
<div class="row">
<div class="col-8">
&nbsp;
</div>
<!-- /.col -->
<div class="col-4">
<button type="submit" name="submit" class="btn btn-primary btn-block btn-flat">Link</button>
</div>
<!-- /.col -->
</div>
</form>
<p class="mb-1">
<a name="reset" href="{{ url('/password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a>
</p>
@isset($register)
<p class="mb-0">
<a href="register.html" class="text-center">Register a new account</a>
</p>
@endisset
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
@endsection

View File

@@ -0,0 +1,19 @@
<!-- Terms and conditions modal -->
<div class="modal fade" id="termsModal" tabindex="-1" role="dialog" aria-labelledby="Terms and conditions" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Terms and conditions</h3>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, veniam numquam has te. No suas nonumes recusabo mea, est ut graeci definitiones. His ne melius vituperata scriptorem, cum paulo copiosae conclusionemque at. Facer inermis ius in, ad brute nominati referrentur vis. Dicat erant sit ex. Phaedrum imperdiet scribentur vix no, ad latine similique forensibus vel.</p>
<p>Dolore populo vivendum vis eu, mei quaestio liberavisse ex. Electram necessitatibus ut vel, quo at probatus oportere, molestie conclusionemque pri cu. Brute augue tincidunt vim id, ne munere fierent rationibus mei. Ut pro volutpat praesent qualisque, an iisque scripta intellegebat eam.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,45 @@
@if ($o->accounts->count() > 2)
<div class="col-sm-2">
<div class="info-box">
<span class="info-box-icon bg-primary elevation-1"><i class="fa fa-user"></i></span>
<div class="info-box-content">
<span class="info-box-text">Linked Accounts</span>
<span class="info-box-number">{{ number_format($o->accounts->count()) }}</span>
</div>
</div>
</div>
@endif
<div class="col-sm-3">
<div class="info-box">
<span class="info-box-icon bg-info"><i class="fa fa-clone"></i></span>
<div class="info-box-content">
<span class="info-box-text">Active Services</span>
<span class="info-box-number">{{ $o->services_active->count() }} <small>/{{ $o->services->count() }}</small></span>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="info-box">
<span class="info-box-icon bg-danger"><i class="fa fa-dollar"></i></span>
<div class="info-box-content">
<span class="info-box-text">Account Balance</span>
<span class="info-box-number"><small>$</small> {{ number_format($o->invoices_due->sum('due'),2) }}</span>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="info-box">
<span class="info-box-icon bg-dark"><i class="fa fa-hashtag"></i></span>
<div class="info-box-content">
<span class="info-box-text">Invoices Due</span>
<span class="info-box-number">{{ $o->invoices_due->count() }}</span>
</div>
</div>
</div>

View File

@@ -0,0 +1,65 @@
<div class="card card-dark card-outline">
<div class="card-header">
<h4 class="card-title">Invoices Due</h4>
</div>
<div class="card-body">
@if ($o->invoices_due->count())
<table class="table table-striped table-hover" id="invoices" style="width: 100%;">
<thead>
<tr>
<th>Invoice</th>
<th>Total</th>
<th>Due</th>
<th>Date Date</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $o->invoices_due->count() }}</th>
{{-- @todo Number format should configured by currency --}}
<th class="right">{{ number_format($o->invoices_due->sum('total'),2) }}</th>
<th class="right">{{ number_format($o->invoices_due->sum('due'),2) }}</th>
<th>&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No invoices due</p>
@endif
</div>
</div>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#invoices').DataTable( {
responsive: true,
ajax: {
url: "/api/u/invoices/{{ $o->id }}"
},
columns: [
{ data: "invoice_id_url" },
{ data: "total" },
{ data: "due" },
{ data: "date_due" }
],
language: {
emptyTable: "No Invoices Due"
},
order: [3, 'asc']
});
$('#invoices tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,47 @@
<table class="table table-bordered w-100" id="invoices">
<thead>
<tr>
<th class="text-right">#</th>
<th class="text-right">Issued</th>
<th class="text-right">Due</th>
<th class="text-right">Total</th>
<th class="text-right">Payments</th>
<th class="text-right">Outstanding</th>
</tr>
</thead>
<tbody>
@foreach ($o->invoices as $io)
<tr>
<td class="text-right"><a href="{{ url('u/invoice',$io->id) }}">{{ $io->id }}</a></td>
<td class="text-right">{{ $io->date_orig->format('Y-m-d') }}</td>
<td class="text-right">{{ $io->due_date->format('Y-m-d') }}</td>
<td class="text-right">${{ number_format($io->total,2) }}</td>
<td class="text-right">${{ number_format($io->paid,2) }}</td>
<td class="text-right">${{ number_format($io->due,2) }}</td>
</tr>
@endforeach
</tbody>
</table>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','jq-dt-r-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','jq-dt-r-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#invoices').DataTable( {
responsive: true,
order: [1, 'desc']
});
$('#invoices tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,59 @@
<div class="card card-primary card-outline">
<div class="card-header">
<h4 class="card-title">Payment History</h4>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
</div>
</div>
<div class="card-body">
@if ($o->payment_history->count())
<table class="table table-bordered table-striped table-hover" id="payments" style="width: 100%;">
<thead>
<tr>
<th>ID</th>
<th>Date</th>
<th>Amount</th>
</tr>
</thead>
</table>
@else
<p>No payments recorded</p>
@endif
</div>
</div>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#payments').DataTable( {
responsive: true,
ajax: {
url: "/api/u/payments/{{ $o->id }}"
},
columns: [
{ data: "payment_id_url" },
{ data: "date_paid" },
{ data: "total" },
],
language: {
emptyTable: "No Payments On File"
},
order: [0, 'desc']
});
$('#payments tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,80 @@
<div class="card card-info card-outline">
<div class="card-header">
<h4 class="card-title">Services</h4>
</div>
<div class="card-body">
@if ($o->services_active->count())
<table class="table table-striped table-hover" id="services" style="width: 100%;">
<thead>
<tr>
<th>ID</th>
<th>Category</th>
<th>Service</th>
<th>Product</th>
<th>Status</th>
<th>Next Invoice</th>
{{-- <th>Amount</th> --}}
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $o->services_active->count() }}</th>
<th colspan="5">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No services active</p>
@endif
</div>
</div>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
@css('//cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css','dt-rowgroup-css','jq-dt-css')
@js('//cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js','dt-rowgroup-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#services').DataTable( {
responsive: true,
ajax: {
url: "/api/u/services/{{ $o->id }}"
},
columns: [
{ data: "service_id_url" },
{ data: "product_category" },
{ data: "name_short" },
{ data: "product_name" },
{ data: "status" },
{ data: "next_invoice" },
{{-- { data: "billing_price", render: $.fn.dataTable.render.number(',','.',2,'$') } --}}
],
language: {
emptyTable: "No Active Services"
},
order: [5, 'asc'],
rowGroup: {
dataSrc: 'product_name',
startRender: null,
endRender: function ( rows, group ) {
return rows.count()+' x ' + group;
},
},
orderFixed: [3, 'asc']
});
$('#services tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,38 @@
<div class="card card-primary card-outline">
<div class="card-header">
<strong>Service Information</strong>
</div>
<div class="card-body">
<table class="table table-borderless">
<tr>
<th>Account</th>
<td>{{ $o->account->name }}</td>
</tr>
<tr>
<th>Active</th>
<td>{!! $o->status_html !!}</td>
</tr>
<tr>
<th>Billing Period</th>
<td>{{ $o->billing_period }}</td>
</tr>
<tr>
<th>Billing Amount</th>
<td>${{ number_format($o->billing_price,2) }}</td>
</tr>
<tr>
<th>Invoiced To</th>
<td>{{ $o->invoice_to ? $o->invoice_to->format('Y-m-d') : '' }}</td>
</tr>
<tr>
<th>Next Invoice</th>
<td>{{ $o->invoice_next ? $o->invoice_next->format('Y-m-d') : '' }}</td>
</tr>
<tr>
<th>Current Invoices Due</th>
<td>${{ number_format($o->invoices_due()->sum('due'),2) }} <small>({{ $o->invoices_due()->count() }})</small></td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,13 @@
<table class="table">
<tr>
<th colspan="3">{{ $o->name }}</th><th class="text-right">${{ number_format(($x=$o->next_invoice_items(TRUE))->sum('total'),2) }}</th>
</tr>
@foreach ($x as $io)
<tr>
<td class="pt-0 pb-1">&nbsp;</td>
<td class="pt-0 pb-1">{{ $io->item_type_name }}</td>
<td class="text-right pt-0 pb-1">${{ number_format($io->total,2) }}</td>
</tr>
@endforeach
</table>

View File

@@ -0,0 +1,68 @@
<div class="card card-success card-outline">
<div class="card-header">
<h4 class="card-title">Accounts</h4>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
</div>
</div>
<div class="card-body">
@if ($user->all_accounts()->count())
<table class="table table-striped table-hover" id="accounts" style="width: 100%;">
<thead>
<tr>
<th>Profile</th>
<th>Name</th>
<th>Active</th>
<th>Services</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $user->all_accounts()->count() }}</th>
<th colspan="3">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No Accounts Active</p>
@endif
</div>
</div>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#accounts').DataTable( {
responsive: true,
ajax: {
url: "/api/r/accounts"
},
columns: [
{ data: "switch_url" },
{ data: "name" },
{ data: "active_display" },
{ data: "services_count_html" }
],
language: {
emptyTable: "No Active Clients"
},
order: [1, 'asc'],
pageLength: 25
});
$('#accounts tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,69 @@
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title">Agents</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
<i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
@if ($user->all_agents()->count())
<table class="table table-bordered table-striped table-hover" id="agents" style="width: 100%;">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Level</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $user->all_agents()->count() }}</th>
<th colspan="2">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No Agents Active</p>
@endif
</div>
</div>
@section('page-scripts')
@css('https://cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css')
@css('https://cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css')
@js('https://cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js')
@js('https://cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js')
<style>
table.dataTable td {
outline: none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#agents').DataTable( {
responsive: true,
ajax: {
url: "/api/r/agents"
},
columns: [
{ data: "user_id_url" },
{ data: "surfirstname" },
{ data: "level" }
],
language: {
emptyTable: "No Active Agents"
},
order: [1, 'asc']
});
$('#agents tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,75 @@
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title">Clients</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
<i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
@if ($user->all_clients()->count())
<table class="table table-bordered table-striped table-hover" id="clients" style="width: 100%;">
<thead>
<tr>
<th>Profile</th>
<th>ID</th>
<th>Name</th>
<th>Active</th>
<th>Services</th>
<th>Level</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $user->all_clients()->count() }}</th>
<th colspan="5">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No Clients Active</p>
@endif
</div>
</div>
@section('page-scripts')
@css('https://cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css')
@css('https://cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css')
@js('https://cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js')
@js('https://cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js')
<style>
table.dataTable td {
outline: none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#clients').DataTable( {
responsive: true,
ajax: {
url: "/api/r/clients"
},
columns: [
{ data: "switch_url" },
{ data: "user_id_url" },
{ data: "surfirstname" },
{ data: "active_display" },
{ data: "services_count_html" },
{ data: "level" }
],
language: {
emptyTable: "No Active Clients"
},
order: [2, 'asc']
});
$('#clients tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,74 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Reseller Home
@endsection
@section('page_title')
{{ $o->full_name }}
@endsection
@section('contentheader_title')
{{ $o->full_name }}
@endsection
@section('contentheader_description')
Reseller Home
@endsection
@section('main-content')
<div class="row">
@include('common.account.widget.summary')
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header p-2">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link active" href="#tab-services" data-toggle="tab">Services</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-clients" data-toggle="tab">Clients</a></li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="active tab-pane" id="tab-services">
<div class="row">
<div class="col-7">
@include('common.service.widget.active')
</div>
<div class="col-5">
@include('common.invoice.widget.due')
@include('common.payment.widget.history')
</div>
</div>
</div>
<div class="tab-pane" id="tab-clients">
<div class="row">
<div class="col-4">
@include('r.account.widget.list')
</div>
<div class="col-8">
@include('r.service.widget.movement')
</div>
{{--
<div class="col-xs-6">
@include('r.agents')
</div>
<div class="col-xs-6">
@include('r.clients')
</div>
--}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,30 @@
<table class="table table-bordered">
<!-- Group by Account -->
@foreach (($x=$o->next_invoice_items($future))->groupBy('product_id') as $id => $oo)
<tr>
<th colspan="4">{{ $oo->first()->product->name }}</th>
<th class="text-right">${{ number_format($oo->sum('total'),2) }}</th>
</tr>
@foreach ($oo->groupBy('service_id') as $ooo)
<tr>
<td class="pt-0 pb-1" style="width: 8em;"><a href="{{ url('u/service',$ooo->first()->service_id) }}">{{ $ooo->first()->service->sid }}</a></td>
<td class="pt-0 pb-1" colspan="3">{{ $ooo->first()->service->sname }}: {{ $ooo->first()->service->sdesc }}</td>
</tr>
@foreach ($ooo as $io)
<tr>
<td class="pt-0 pb-1">&nbsp;</td>
<td class="pt-0 pb-1">&nbsp;</td>
<td class="pt-0 pb-1">{{ $io->item_type_name }}</td>
<td class="text-right pt-0 pb-1">${{ number_format($io->total,2) }}</td>
</tr>
@endforeach
@endforeach
@endforeach
<tr>
<th colspan="4">TOTAL</th>
<th class="text-right">${{ number_format($x->sum('total'),2) }}</th>
</tr>
</table>

View File

@@ -0,0 +1,85 @@
<div class="card card-warning card-outline">
<div class="card-header">
<h4 class="card-title">Service Movements</h4>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
</div>
</div>
<div class="card-body">
@if ($user->all_client_service_movements()->count())
<table class="table table-striped table-hover" id="service_movements" style="width: 100%;">
<thead>
<tr>
<th>ID</th>
<th>Account</th>
<th>Name</th>
<th>Status</th>
<th>Product</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Count {{ $user->all_client_service_movements()->count() }}</th>
<th colspan="4">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No Service Movements</p>
@endif
</div>
</div>
@section('page-scripts')
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
@css('//cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css','dt-rowgroup-css','jq-dt-css')
@js('//cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js','dt-rowgroup-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#service_movements').DataTable( {
responsive: true,
ajax: {
url: "/api/r/service_movements"
},
columns: [
{ data:
@if($user->isWholesaler())
"admin_service_id_url"
@else
"service_id_url"
@endif
},
{ data: "account_name" },
{ data: "name_short" },
{ data: "status" },
{ data: "product_name" }
],
language: {
emptyTable: "No Service Movements"
},
order: [3, 'asc'],
rowGroup: {
dataSrc: 'account_name',
startRender: null,
endRender: function ( rows, group ) {
return rows.count()+' x ' + group;
},
},
orderFixed: [1, 'asc']
});
$('#service_movements tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,15 @@
@extends('layouts.auth')
@section('htmlheader_title')
Supplier Add
@endsection
@section('content')
<body>
<form method="POST" action="/r/supplier/store">
{{ csrf_field() }}
Name: <input name="name" > <br>
<button>Submit</button>
</form>
</body>
@endsection

View File

@@ -0,0 +1,25 @@
@extends('layouts.auth')
@section('htmlheader_title')
Supplier List
@endsection
@section('content')
<body>
<table>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
@foreach (\App\Models\Supplier::all() as $o)
<tr>
<td>{{ $o->id }}</td>
<td>{{ $o->name }}</td>
</tr>
@endforeach
</table>
Add new <a href="{{ url('r/supplier/create') }}">Supplier</a>.
</body>
@endsection

View File

@@ -0,0 +1,68 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Client Home
@endsection
@section('page_title')
{{ $o->full_name }}
@endsection
@section('contentheader_title')
{{ $o->full_name }}
@endsection
@section('contentheader_description')
Client Home
@endsection
@section('main-content')
<div class="row">
@include('common.account.widget.summary')
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header p-2">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link active" href="#tab-services" data-toggle="tab">Services</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-nextinvoice" data-toggle="tab">Next Invoice</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-futureinvoice" data-toggle="tab">Future Invoice</a></li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="active tab-pane" id="tab-services">
<div class="row">
<div class="col-7">
@include('common.service.widget.active')
</div>
<div class="col-5">
@include('common.invoice.widget.due')
@include('common.payment.widget.history')
</div>
</div>
</div>
<div class="tab-pane" id="tab-nextinvoice">
<div class="row">
<div class="col-12">
@include('r.invoice.widget.next',['future'=>FALSE])
</div>
</div>
</div>
<div class="tab-pane" id="tab-futureinvoice">
<div class="row">
<div class="col-12">
@include('r.invoice.widget.next',['future'=>TRUE])
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,227 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Invoice #{{ $o->id }}
@endsection
@section('contentheader_title')
Invoice #{{ $o->id }}
@endsection
@section('contentheader_description')
{{ $o->invoice_account_id }}
@endsection
@section('main-content')
<!-- Main content -->
<div class="invoice p-3 mb-3">
<!-- title row -->
<div class="row">
<div class="col-12">
<h4>
<i class="fa fa-globe"></i> {{ $so->site_name }}
<small class="pull-right">Date: {{ $o->invoice_date}}</small>
</h4>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info">
<div class="col-4 invoice-col">
FROM:
<address>
<strong>{{ $so->site_name }}</strong><br>
{!! $so->address('html') !!}<br>
<br>
<strong>Email:</strong> {{ $so->site_email }}<br>
<strong>Phone:</strong> {{ $so->site_phone }}
</address>
</div>
<div class="col-4 invoice-col">
TO:
<address>
<strong>{{ $o->account->company }}</strong><br>
{!! $o->account->address('html') !!}<br>
<br>
<strong>Email:</strong> {{ $o->account->email }}<br>
@if ($o->account->phone)
<strong>Phone:</strong> {{ $o->account->phone }}<br>
@endif
</address>
</div>
{{-- col-sm-offset-2 not working here --}}
<div class="col-1"></div>
<div class="col-3 invoice-col">
<table class="table table-borderless text-right" style="font-size: 1.1rem;">
<tr >
<td class="p-0">Account:</td><td class="p-0"><strong>{{ $o->account->account_id }}</strong></td>
</tr>
<tr >
<td class="p-0">Invoice:</td><td class="p-0"><strong>{{ $o->invoice_id }}</strong></td>
</tr>
<tr>
<td class="p-0">Payment Due:</td><td class="p-0"><strong>{{ $o->due_date->format('Y-m-d') }}</strong></td>
</tr>
<tr>
<td class="p-0">Total Due:</td><td class="p-0"><strong>${{ number_format($o->total,$o->currency()->rounding) }}</strong></td>
</tr>
</table>
</div>
</div>
<!-- /.row -->
<!-- Table row -->
<div class="row">
<div class="col-12 table-responsive">
<table id="restripe" class="table" width="100%">
<thead>
<tr>
<th>Qty</th>
<th>Product</th>
<th colspan="2">Description</th>
<th class="text-right" colspan="3">Subtotal</th>
</tr>
</thead>
<tbody>
@foreach ($o->products() as $po)
<tr id="invoice-services">
<td>{{ $po->count }}</td>
<td>{{ $po->product_id }}</td>
<td colspan="2">{{ $po->name($o->account->user->language) }}</td>
<td colspan="3" class="text-right">${{ number_format($o->items->filter(function($item) use ($po) {return $item->product_id == $po->id; })->sum('total'),$o->currency()->rounding) }}</td>
</tr>
@foreach ($o->product_services($po) as $so)
<tr id="invoice-service-items" class="invoice-services d-none @if($o->products()->count() > 1) d-print-table-row @endif">
<td colspan="2">&nbsp;</td>
<td colspan="2">Service: <strong>{{ $so->service_id }}: {{ $so->name }}</strong></td>
<td>&nbsp;</td>
<td class="text-right">${{ number_format($o->product_service_items($po,$so)->sum('total'),$o->currency()->rounding) }}</td>
<td>&nbsp;</td>
</tr>
@foreach ($o->product_service_items($po,$so) as $io)
<tr class="invoice-service-items d-none d-print-table-row">
<td colspan="2">&nbsp;</td>
<td width="5%">&nbsp;</td>
<td>{{ $io->item_type_name }}</td>
<td class="text-right">${{ number_format($io->total,$o->currency()->rounding) }}</td>
<td colspan="2">&nbsp;</td>
</tr>
@endforeach
@endforeach
@endforeach
</tbody>
</table>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="row">
<!-- accepted payments column -->
<div class="col-6">
<p class="lead">Payment Methods:</p>
{{--
<img src="../../dist/img/credit/visa.png" alt="Visa">
<img src="../../dist/img/credit/mastercard.png" alt="Mastercard">
<img src="../../dist/img/credit/american-express.png" alt="American Express">
<img src="../../dist/img/credit/paypal2.png" alt="Paypal">
--}}
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
{{ $o->invoice_text }}
</p>
</div>
<!-- /.col -->
<div class="offset-2 col-4 table-responsive">
<table class="table">
<tr>
<th colspan="2" style="width:50%">Subtotal:</th>
<td class="text-right">${{ number_format($o->sub_total,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>Tax (GST 10%)</th>
<td class="text-right">${{ number_format($o->tax_total,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th>&nbsp;</th>
<th>Other Charges:</th>
<td class="text-right">$0.00</td>
</tr>
<tr>
<th colspan="2">Total:</th>
<td class="text-right">${{ number_format($o->total,$o->currency()->rounding) }}</td>
</tr>
@if($o->id)
<tr>
<th>&nbsp;</th>
<th>Payments:</th>
<td class="text-right">${{ number_format($o->paid,$o->currency()->rounding) }}</td>
</tr>
<tr>
<th colspan="2">Invoice Total Due:</th>
<td class="text-right">${{ number_format($o->due,$o->currency()->rounding) }}</td>
</tr>
{{--
<tr>
<th colspan="2">Account Due:</th>
<td class="text-right">${{ number_format($o->account->due,$o->currency()->rounding) }}</td>
</tr>
--}}
@endif
</table>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<!-- this row will not appear when printing -->
<div class="row d-print-none">
<div class="col-12">
<a href="javascript:window.print();" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
@if($o->id)
<button type="button" class="btn btn-success pull-right"><i class="fa fa-credit-card"></i> Submit Payment</button>
<a href="{{ url(sprintf('u/invoice/%s/pdf',$o->id)) }}" class="btn btn-primary pull-right" style="margin-right: 5px;">
<i class="fa fa-download"></i> Download PDF
</a>
@endif
</div>
</div>
</div>
<!-- /.content -->
<div class="clearfix"></div>
@endsection
@section('page-scripts')
<style>
.stripe-odd {
background-color: #f9f9f9;
}
.stripe-even {
background-color: #e9e9e9;
}
</style>
<script>
$(document).ready(function() {
$("table#restripe").removeClass("table-striped");
$("table#restripe tr:not(.d-print-table-row)").each(function (index) {
$(this).toggleClass("stripe-odd", (index & 1));
$(this).toggleClass("stripe-even", !!(index & 1));
});
$('tr[id="invoice-services"]').click(function() {
$(".invoice-services").toggleClass("d-none");
});
$('tr[id="invoice-service-items"]').click(function() {
$(".invoice-service-items").toggleClass("d-none");
});
})
</script>
@append

View File

@@ -0,0 +1,109 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ $o->sid }}
@endsection
@section('page_title')
{{ $o->sid }}
@endsection
@section('contentheader_title')
Service: {{ $o->sid }} <strong>{{ $o->product->name }}</strong>
@endsection
@section('contentheader_description')
{{ $o->sname }}: {{ $o->sdesc }}
@endsection
@section('main-content')
<div class="row">
<!-- Service Details -->
<div class="col-5">
@includeIf('u.service.widgets.'.$o->stype.'.details',['o'=>$o->type])
@include('u.service.widgets.information')
</div>
<div class="col-7">
<div class="card">
<div class="card-header bg-dark d-flex p-0">
<span class="p-3"><i class="fa fa-bars"></i></span>
<ul class="nav nav-pills p-2 w-100">
{{--
<li class="nav-item"><a class="nav-link active" href="#product" data-toggle="tab">Product</a></li>
<li class="nav-item"><a class="nav-link" href="#traffic" data-toggle="tab">Traffic</a></li>
--}}
<li class="nav-item active"><a class="nav-link" href="#pending_items" data-toggle="tab">Pending Items</a></li>
{{--
<li class="nav-item"><a class="nav-link" href="#invoices" data-toggle="tab">Invoices</a></li>
<li class="nav-item"><a class="nav-link" href="#emails" data-toggle="tab">Emails</a></li>
--}}
@can('wholesaler')
<li class="nav-item ml-auto"><a class="nav-link" href="#internal" data-toggle="tab">Internal</a></li>
@endcan
</ul>
@can('update',$o)
<ul class="nav nav-pills ml-auto p-2">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">
ACTION <span class="caret"></span>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" tabindex="-1" href="#tab_3">Action</a>
<a class="dropdown-item" tabindex="-1" href="#">Another action</a>
<a class="dropdown-item" tabindex="-1" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" tabindex="-1" href="#">Separated link</a>
</div>
</li>
</ul>
@endcan
</div><!-- /.card-header -->
<div class="card-body">
<div class="tab-content">
<div class="tab-pane fade" id="traffic" role="tabpanel">
Traffic.
</div>
<div class="tab-pane fade" id="product" role="tabpanel">
Product.
</div>
<div class="tab-pane fade show active" id="pending_items" role="tabpanel">
@include('common.service.widget.invoice')
</div>
<div class="tab-pane fade" id="invoices" role="tabpanel">
Invoices.
</div>
<div class="tab-pane fade" id="emails" role="tabpanel">
Email.
</div>
@can('wholesaler')
<div class="tab-pane fade" id="internal" role="tabpanel">
@include('a.service.widget.internal')
</div>
@endcan
</div>
</div>
<!-- /.card -->
</div>
</div>
</div>
@endsection
@section('page-scripts')
<style>
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
background-color: #ffffff;
color: #343a40;
}
.nav-pills .nav-link:hover {
background-color: #6c757d;
color: #ffffff;
}
.nav-pills .nav-link:not(.active):hover {
background-color: #6c757d;
color: #ffffff;
}
</style>
@append

View File

@@ -0,0 +1,74 @@
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">Broadband Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Address</th>
<td>{{ $o->service_description }}</td>
</tr>
<tr>
<th>Service Number</th>
<td>{{ $o->service_name }}</td>
</tr>
<tr>
<th>Service Username</th>
<td>{{ $o->service_username }}</td>
</tr>
<tr>
<th>Service Password</th>
<td>{{ $o->service_password }}</td>
</tr>
@if($o->service_connect_date)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
<!-- @todo -->
@if($o->technology)
<tr>
<th>Technology</th>
<td>{{ $o->technology }}</td>
</tr>
@endif
<tr>
<th>Speed</th>
<td>{{ $o->service->product->type->product->speed }} Mbps</td>
</tr>
<!-- @todo -->
<tr>
<th>Traffic</th>
<td>{{ $o->service->product->type->allowance_string() }} GB @if(FALSE)(YY GB used month)@endif</td>
</tr>
<tr>
<th>IP Address</th>
<td>{{ $o->ipaddress ?: 'Dynamic' }}</td>
</tr>
@if ($o->inContract())
<tr>
<th>Contract</th>
<td>{{ $o->contract_term }} months <small>({{ ($x=$o->service_contract_date->addMonths($o->contract_term))->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_contract_date->addMonths($o->contract_term-1)->format('Y-m-d') }})</small>@endif</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,59 @@
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">Domain Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Domain Name</th>
<td>{{ $o->service_name }}</td>
</tr>
<tr>
<th>Registrar URL</th>
<td><a href="{{ $o->registrar->whitelabel_url }}" target="_blank" class="text-white">{{ $o->registrar->whitelabel_url }}</a></td>
</tr>
<tr>
<th>Registrar Username</th>
<td>{{ $o->registrar_username }}</td>
</tr>
<tr>
<th>Registrar Password</th>
<td>{{ $o->registrar_password }}</td>
</tr>
<tr>
<th>Domain Auth</th>
<td>{{ $o->registrar_auth_password }}</td>
</tr>
@if($o->service_connect_date)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<!-- @todo -->
<td>12 months <small>({{ ($x=$o->domain_expire)->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>Before renewal</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,57 @@
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">Hosting Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Domain Name</th>
<td>{{ $o->service_name }}</td>
</tr>
@if($o->provider->whitelabel_url)
<tr>
<th>Hosting URL</th>
<td><a href="{{ $o->provider->whitelabel_url }}" target="_blank" class="text-white">{{ $o->provider->whitelabel_url }}</a></td>
</tr>
<tr>
<th>Hosting Username</th>
<td>{{ $o->host_username }}</td>
</tr>
<tr>
<th>Hosting Password</th>
<td>{{ $o->host_password }}</td>
</tr>
@endif
@if($o->service_connect_date)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<!-- @todo -->
<td>12 months <small>({{ ($x=$o->domain_expire)->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>Before renewal</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,60 @@
<div class="card">
<div class="card-header bg-light">
<h3 class="card-title">Service Information</h3>
</div>
<div class="card-body bg-light">
<table class="table table-sm">
<tr>
<th>Account</th>
<td>{{ $o->account->aid }}</td>
</tr>
<tr>
<th>Status</th>
<td>{!! $o->status_html !!}</td>
</tr>
@if ($o->active or $o->isPending())
<tr>
<th>Billed</th>
<td>{{ $o->billing_period }}</td>
</tr>
@if($o->active AND $o->invoice_to)
<tr>
<th>Invoiced To</th>
<td>{{ $o->invoice_to->format('Y-m-d') }}</td>
</tr>
@if($o->paid_to)
<tr>
<th>Paid Until</th>
<td>{{ $o->paid_to->format('Y-m-d') }}</td>
</tr>
@endif
@endif
<tr>
<th>Next Invoice</th>
<td>@if ($o->suspend_billing)<strike>@endif{{ $o->invoice_next->format('Y-m-d') }}@if ($o->suspend_billing)</strike> <strong>SUSPENDED</strong>@endif</td>
</tr>
<tr>
<th>Next Estimated Invoice</th>
<td>${{ number_format($o->next_invoice_items(TRUE)->sum('total'),2) }} <sup>*</sup></td>
</tr>
<tr>
<th>Payment Method</th>
<td>@if ($o->autopay)Direct Debit @else Invoice @endif</td>
</tr>
@elseif(! $o->wasCancelled())
<tr>
<th>Cancelled</th>
<td>{!! $o->date_end ? $o->date_end->format('Y-m-d') : $o->paid_to->format('Y-m-d').'<sup>*</sup>' !!}</td>
</tr>
@endif
</table>
</div>
@if($o->active OR $o->isPending())
<div class="card-footer sm">
<strong><sup>*</sup>NOTE:</strong> Estimated Invoice does not include any setup, connection nor all current billing cycle usage charges.
</div>
@endif
</div>

View File

@@ -0,0 +1,26 @@
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">SSL Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Cert</th>
<td>{{ $o->service_description }}</td>
</tr>
<tr>
<th>Cancel Notice</th>
<td>Before renewal</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,68 @@
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">VOIP Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Address</th>
<td>{{ $o->service_description }}</td>
</tr>
<tr>
<th>Service Number</th>
<td>{{ $o->service_name }}</td>
</tr>
<tr>
<th>Service Username</th>
<td>{{ $o->service_username }}</td>
</tr>
<tr>
<th>Service Password</th>
<td>{{ $o->service_password }}</td>
</tr>
@if($o->service_connect_date)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
<!-- @todo -->
@if($o->technology)
<tr>
<th>Technology</th>
<td>{{ $o->technology }}</td>
</tr>
@endif
<!-- @todo -->
@if($o->service->product->type)
<tr>
<th>Traffic</th>
<td>{{ $o->service->product->type->allowance_string() }} GB @if(FALSE)(YY GB used month)@endif</td>
</tr>
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<td>{{ $o->contract_term }} months <small>({{ ($x=$o->service_contract_date->addMonths($o->contract_term))->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_contract_date->addMonths($o->contract_term-1)->format('Y-m-d') }})</small>@endif</td>
</tr>
</table>
</div>
</div>