akaunting 3.0 (the last dance)
This commit is contained in:
@ -9,9 +9,17 @@ class AccountBalance extends Widget
|
||||
{
|
||||
public $default_name = 'widgets.account_balance';
|
||||
|
||||
public $description = 'widgets.description.account_balance';
|
||||
|
||||
public $report_class = 'App\Reports\IncomeExpense';
|
||||
|
||||
public function show()
|
||||
{
|
||||
$accounts = Account::with('income_transactions', 'expense_transactions')->enabled()->take(5)->get();
|
||||
$accounts = Account::with('income_transactions', 'expense_transactions')->enabled()->take(5)->get()->map(function($account) {
|
||||
$account->balance_formatted = money($account->balance, $account->currency_code, true);
|
||||
|
||||
return $account;
|
||||
})->all();
|
||||
|
||||
return $this->view('widgets.account_balance', [
|
||||
'accounts' => $accounts,
|
||||
|
Reference in New Issue
Block a user