Added account to invoice list

This commit is contained in:
Deon George 2020-07-22 14:49:39 +10:00
parent 9bf062e8e6
commit 9ca3644625
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254

View File

@ -2,6 +2,7 @@
<table class="table table-bordered w-100" id="{{ $widget_invoice_name ?? 'widget-invoice'}}">
<thead>
<tr>
<th class="text-right">Account</th>
<th class="text-right">#</th>
<th class="text-right">Issued</th>
<th class="text-right">Due</th>
@ -14,6 +15,7 @@
<tbody>
@foreach ($x as $oo)
<tr>
<td id="account">{{ $oo->account->name }}</td>
<td class="text-right"><a href="{{ url('u/invoice',$oo->id) }}">{{ $oo->id }}</a></td>
<td class="text-right">{{ $oo->date_orig->format('Y-m-d') }}</td>
<td class="text-right">{{ $oo->due_date->format('Y-m-d') }}</td>
@ -37,7 +39,16 @@
$(document).ready(function() {
$('#{{ $widget_invoice_name ?? 'widget-invoice'}}').DataTable({
responsive: true,
order: [1, 'desc']
order: [[0,'asc'],[3,'desc']],
rowGroup: {
dataSrc: 0,
},
columnDefs: [
{
targets: [0],
visible: false,
}
],
});
$('#{{ $widget_invoice_name ?? 'widget-invoice'}} tbody').on('click','tr', function () {