Skip to content

Commit

Permalink
fixed #800
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Mar 24, 2019
1 parent 9b7ae7d commit 0e0bde9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/Http/Controllers/Expenses/Bills.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public function index()

$categories = collect(Category::enabled()->type('expense')->orderBy('name')->pluck('name', 'id'));

$statuses = collect(BillStatus::all()->pluck('name', 'code'));
$statuses = collect(BillStatus::get()->each(function($item) {
$item->name = trans('bills.status.' . $item->code);
return $item;
})->pluck('name', 'code'));

return view('expenses.bills.index', compact('bills', 'vendors', 'categories', 'statuses'));
}
Expand Down
5 changes: 4 additions & 1 deletion app/Http/Controllers/Incomes/Invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public function index()

$categories = collect(Category::enabled()->type('income')->orderBy('name')->pluck('name', 'id'));

$statuses = collect(InvoiceStatus::all()->pluck('name', 'code'));
$statuses = collect(InvoiceStatus::get()->each(function($item) {
$item->name = trans('invoices.status.' . $item->code);
return $item;
})->pluck('name', 'code'));

return view('incomes.invoices.index', compact('invoices', 'customers', 'categories', 'statuses'));
}
Expand Down

0 comments on commit 0e0bde9

Please sign in to comment.