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

@ -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)]), '');

View File

@ -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)]), '');