Skip to content

Commit

Permalink
fixed #142
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Dec 11, 2017
1 parent 8ca239b commit 3695dac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Expenses/Bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Bills extends Controller
*/
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'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Expenses/Payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Payments extends Controller
*/
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'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.vendors', 2)]), '');
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Incomes/Invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Invoices extends Controller
*/
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'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Incomes/Revenues.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Revenues extends Controller
*/
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'))
->prepend(trans('general.all_type', ['type' => trans_choice('general.customers', 2)]), '');
Expand Down
2 changes: 1 addition & 1 deletion config/columnsortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'class' => 'fa fa-sort-amount'
],
'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'
],
],
Expand Down

0 comments on commit 3695dac

Please sign in to comment.