osb/resources/theme/backend/adminlte/common/invoice/widget/due.blade.php

65 lines
1.9 KiB
PHP
Raw Normal View History

2019-06-02 05:35:48 +00:00
<div class="card card-dark card-outline">
<div class="card-header">
<h4 class="card-title">Invoices Due</h4>
2018-07-16 05:06:43 +00:00
</div>
2018-05-20 12:53:14 +00:00
2019-06-02 05:35:48 +00:00
<div class="card-body">
@if ($o->invoices_due->count())
2019-06-02 05:35:48 +00:00
<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>
2018-07-16 05:06:43 +00:00
</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')
2019-06-02 05:35:48 +00:00
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
2018-07-16 05:06:43 +00:00
<script type="text/javascript">
$(document).ready(function() {
$('#invoices').DataTable( {
responsive: true,
ajax: {
url: "/api/u/invoices/{{ $o->id }}"
2018-07-16 05:06:43 +00:00
},
columns: [
{ data: "invoice_id_url" },
{ data: "total" },
{ data: "due" },
{ data: "date_due" }
],
language: {
emptyTable: "No Invoices Due"
},
order: [3, 'asc']
});
2018-07-16 05:06:43 +00:00
$('#invoices tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
2018-08-11 05:09:41 +00:00
@append