Compare commits
8 Commits
844d509834
...
d662328903
Author | SHA1 | Date | |
---|---|---|---|
d662328903 | |||
693f247865 | |||
e836108cf6 | |||
c87d73978f | |||
ad03cfa677 | |||
8e6533fb91 | |||
9e60691a79 | |||
a820c1136d |
@ -281,7 +281,7 @@ class Account extends Model implements IDs
|
|||||||
DB::raw('SUM(amount) AS payments'),
|
DB::raw('SUM(amount) AS payments'),
|
||||||
DB::raw('SUM(fees_amt) AS payment_fees'),
|
DB::raw('SUM(fees_amt) AS payment_fees'),
|
||||||
])
|
])
|
||||||
->leftjoin('payment_items',['payment_items.payment_id'=>'payments.id'])
|
->join('payment_items',['payment_items.payment_id'=>'payments.id'])
|
||||||
->where('payments.active',TRUE)
|
->where('payments.active',TRUE)
|
||||||
->where('payment_items.active',TRUE)
|
->where('payment_items.active',TRUE)
|
||||||
->groupBy(['payment_items.invoice_id'])
|
->groupBy(['payment_items.invoice_id'])
|
||||||
@ -299,7 +299,6 @@ class Account extends Model implements IDs
|
|||||||
->leftjoin('invoice_item_taxes',['invoice_item_taxes.invoice_item_id'=>'invoice_items.id'])
|
->leftjoin('invoice_item_taxes',['invoice_item_taxes.invoice_item_id'=>'invoice_items.id'])
|
||||||
->rightjoin('invoices',['invoices.id'=>'invoice_items.invoice_id'])
|
->rightjoin('invoices',['invoices.id'=>'invoice_items.invoice_id'])
|
||||||
->where('invoice_items.active',TRUE)
|
->where('invoice_items.active',TRUE)
|
||||||
->where('invoice_item_taxes.active',TRUE)
|
|
||||||
->where('invoices.active',TRUE)
|
->where('invoices.active',TRUE)
|
||||||
->groupBy(['invoice_items.invoice_id']),
|
->groupBy(['invoice_items.invoice_id']),
|
||||||
),'p')
|
),'p')
|
||||||
|
@ -47,7 +47,6 @@ return [
|
|||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
'timeout' => null,
|
'timeout' => null,
|
||||||
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url(env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||||
'verify_peer' => false,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if(($list=$o->invoiceSummaryDue()->get())->count())
|
@if(($list=$o->invoiceSummaryDue()->get())->count())
|
||||||
@include('theme.backend.adminlte.invoice.widget.due',['type'=>'account'])
|
@include('theme.backend.adminlte.invoice.widget.due')
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<p>No invoice due</p>
|
<p>No invoice due</p>
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
@if($o==$user)
|
@if($o==$user)
|
||||||
@canany('reseller','wholesaler')
|
@canany('reseller','wholesaler')
|
||||||
<div class="tab-pane" id="tab-reseller" role="tabpanel">
|
<div class="tab-pane" id="tab-reseller" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.widget.admin.reseller')
|
@include('theme.backend.adminlte.r.home.widget.home')
|
||||||
</div>
|
</div>
|
||||||
@endcanany
|
@endcanany
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
<!-- Show outstanding invoices -->
|
|
||||||
<table class="table table-bordered w-100" id="invoices_credit_{{$type}}">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Account</th>
|
|
||||||
<th>#</th>
|
|
||||||
<th>Due</th>
|
|
||||||
<th class="text-right">Items</th>
|
|
||||||
<th class="text-right">Discounts</th>
|
|
||||||
<th class="text-right">Total</th>
|
|
||||||
<th class="text-right">Payments</th>
|
|
||||||
<th class="text-right">Balance</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
@foreach($list as $oo)
|
|
||||||
<tr>
|
|
||||||
<td>{{ $oo->account->name }}</td>
|
|
||||||
<td><a href="{{ url('u/invoice',$oo->id) }}">{{ $oo->lid }}</a></td>
|
|
||||||
<td>{{ $oo->due_at->format('Y-m-d') }}</td>
|
|
||||||
<td class="text-right">${{ number_format($oo->_item+$oo->_tax,2) }}</td>
|
|
||||||
<td class="text-right">${{ number_format($oo->_discount,2) }}</td>
|
|
||||||
<td class="text-right">${{ number_format($oo->_total,2) }}</td>
|
|
||||||
<td class="text-right">${{ number_format($oo->_payment,2) }}</td>
|
|
||||||
<td class="text-right">${{ number_format($oo->_balance,2) }}</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
@section('page-styles')
|
|
||||||
@css(datatables,bootstrap4|rowgroup)
|
|
||||||
@append
|
|
||||||
|
|
||||||
@section('page-scripts')
|
|
||||||
@js(datatables,bootstrap4|rowgroup)
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
@if($list->count())
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('#invoices_credit_{{$type}}').DataTable({
|
|
||||||
// If we have more than 1 account id, order by account
|
|
||||||
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
|
||||||
rowGroup: {
|
|
||||||
dataSrc: 0,
|
|
||||||
},
|
|
||||||
columnDefs: [
|
|
||||||
{
|
|
||||||
targets: [0],
|
|
||||||
visible: false,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@endif
|
|
||||||
</script>
|
|
||||||
@append
|
|
@ -1,6 +1,6 @@
|
|||||||
<!-- $list = Collection[Invoice::class] -->
|
<!-- $o = Account::class -->
|
||||||
<!-- Show outstanding invoices -->
|
<!-- Show outstanding invoices -->
|
||||||
<table class="table table-bordered w-100" id="invoices_due_{{$type}}">
|
<table class="table table-bordered w-100" id="invoices_due_{{ $o->id }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Account</th>
|
<th>Account</th>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@if ($list->count())
|
@if ($list->count())
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#invoices_due_{{$type}}').DataTable({
|
$('#invoices_due_{{ $o->id }}').DataTable({
|
||||||
// If we have more than 1 account id, order by account
|
// If we have more than 1 account id, order by account
|
||||||
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
||||||
rowGroup: {
|
rowGroup: {
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
@include('theme.backend.adminlte.r.account.widgets.list')
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-8">
|
||||||
|
@include('theme.backend.adminlte.r.service.widget.movement')
|
||||||
|
|
||||||
|
@include('theme.backend.adminlte.r.invoice.widgets.due')
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $o=App\Models\User -->
|
||||||
<!-- Show outstanding invoices for all clients -->
|
<!-- Show outstanding invoices for all clients -->
|
||||||
<div class="card card-warning">
|
<div class="card card-warning">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@ -6,7 +7,7 @@
|
|||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if(($list=\App\Models\Account::InvoicesDue())->count())
|
@if(($list=\App\Models\Account::InvoicesDue())->count())
|
||||||
@include('theme.backend.adminlte.invoice.widget.due',['type'=>'all'])
|
@include('theme.backend.adminlte.invoice.widget.due')
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<p>No invoice due</p>
|
<p>No invoice due</p>
|
@ -1,24 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-4">
|
|
||||||
@include('theme.backend.adminlte.account.widget.admin.list')
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-8">
|
|
||||||
@include('theme.backend.adminlte.service.widget.admin.movement')
|
|
||||||
|
|
||||||
@include('theme.backend.adminlte.invoice.widget.admin.due')
|
|
||||||
|
|
||||||
@can('wholesaler')
|
|
||||||
<!-- Show outstanding invoices for all clients -->
|
|
||||||
<div class="card card-secondary">
|
|
||||||
<div class="card-header">
|
|
||||||
<h3 class="card-title">Invoices In Credit</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
@include('theme.backend.adminlte.invoice.widget.admin.credit',['list'=>\App\Models\Account::InvoicesCredit(),'type'=>'account'])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endcan
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,10 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schedule;
|
use Illuminate\Foundation\Inspiring;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
use App\Jobs\BroadbandTraffic;
|
//Artisan::command('inspire', function () {
|
||||||
use App\Models\Supplier;
|
// $this->comment(Inspiring::quote());
|
||||||
|
//})->purpose('Display an inspiring quote')->hourly();
|
||||||
Schedule::job(new BroadbandTraffic(Supplier::find(1)))
|
|
||||||
->timezone('Australia/Melbourne')
|
|
||||||
->dailyAt('10:00');
|
|
||||||
|
Loading…
Reference in New Issue
Block a user