This commit is contained in:
denisdulici
2017-12-11 22:37:05 +03:00
parent 8ca239b3b9
commit 3695dac363
5 changed files with 5 additions and 5 deletions

View File

@ -37,7 +37,7 @@ class Bills extends Controller
*/ */
public function index() public function index()
{ {
$bills = Bill::with(['vendor', 'status', 'items', 'payments', 'histories'])->collect(); $bills = Bill::with(['vendor', 'status', 'items', 'payments', 'histories'])->collect(['billed_at'=> 'desc']);
$vendors = collect(Vendor::enabled()->pluck('name', 'id')) $vendors = collect(Vendor::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');

View File

@ -24,7 +24,7 @@ class Payments extends Controller
*/ */
public function index() public function index()
{ {
$payments = Payment::with(['vendor', 'account', 'category'])->collect(); $payments = Payment::with(['vendor', 'account', 'category'])->collect(['paid_at'=> 'desc']);
$vendors = collect(Vendor::enabled()->pluck('name', 'id')) $vendors = collect(Vendor::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');

View File

@ -42,7 +42,7 @@ class Invoices extends Controller
*/ */
public function index() public function index()
{ {
$invoices = Invoice::with(['customer', 'status', 'items', 'payments', 'histories'])->collect(); $invoices = Invoice::with(['customer', 'status', 'items', 'payments', 'histories'])->collect(['invoice_number'=> 'desc']);
$customers = collect(Customer::enabled()->pluck('name', 'id')) $customers = collect(Customer::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');

View File

@ -26,7 +26,7 @@ class Revenues extends Controller
*/ */
public function index() public function index()
{ {
$revenues = Revenue::with(['account', 'category', 'customer'])->collect(); $revenues = Revenue::with(['account', 'category', 'customer'])->collect(['paid_at'=> 'desc']);
$customers = collect(Customer::enabled()->pluck('name', 'id')) $customers = collect(Customer::enabled()->pluck('name', 'id'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), ''); ->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');

View File

@ -15,7 +15,7 @@ return [
'class' => 'fa fa-sort-amount' 'class' => 'fa fa-sort-amount'
], ],
'numeric' => [ 'numeric' => [
'rows' => ['created_at', 'updated_at', 'paid_at', 'invoiced_at', 'due_at', 'id', 'quantity', 'rate', 'number', 'invoice_number', 'bill_number'], 'rows' => ['created_at', 'updated_at', 'paid_at', 'invoiced_at', 'billed_at', 'due_at', 'id', 'quantity', 'rate', 'number', 'invoice_number', 'bill_number'],
'class' => 'fa fa-sort-numeric' 'class' => 'fa fa-sort-numeric'
], ],
], ],