diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index 2c9d38196155..dd8cfd1ccaea 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -43,11 +43,11 @@ class DashboardController extends \BaseController { ->orderBy('due_date', 'asc')->take(6)->get(); $data = [ - 'totalIncome' => Utils::formatMoney($totalIncome->value, Session::get(SESSION_CURRENCY)), - 'billedClients' => $metrics->billed_clients, - 'invoicesSent' => $metrics->invoices_sent, - 'activeClients' => $metrics->active_clients, - 'invoiceAvg' => Utils::formatMoney($metrics->invoice_avg, Session::get(SESSION_CURRENCY)), + 'totalIncome' => Utils::formatMoney($totalIncome ? $totalIncome->value : 0, Session::get(SESSION_CURRENCY)), + 'billedClients' => $metrics ? $metrics->billed_clients : 0, + 'invoicesSent' => $metrics ? $metrics->invoices_sent : 0, + 'activeClients' => $metrics ? $metrics->active_clients : 0, + 'invoiceAvg' => Utils::formatMoney(($metrics ? $metrics->invoice_avg : 0), Session::get(SESSION_CURRENCY)), 'activities' => $activities, 'pastDue' => $pastDue, 'upcoming' => $upcoming diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 629e6df79e33..6c3326707225 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -335,7 +335,15 @@ class InvoiceController extends \BaseController { else { Session::flash('message', 'Successfully saved invoice'.$message); - Session::flash('error', 'Please sign up to email an invoice'); + + if (Auth::user()->registered) + { + Session::flash('error', 'Please confirm your email address'); + } + else + { + Session::flash('error', 'Please sign up to email an invoice'); + } } } else diff --git a/app/views/accounts/notifications.blade.php b/app/views/accounts/notifications.blade.php index 4a0e8a41be79..e8f4939bdf36 100755 --- a/app/views/accounts/notifications.blade.php +++ b/app/views/accounts/notifications.blade.php @@ -14,6 +14,30 @@ {{ Former::checkbox('notify_viewed')->label(' ')->text('Email me when an invoice is viewed') }} {{ Former::checkbox('notify_paid')->label(' ')->text('Email me when an invoice is paid') }} + {{ Former::legend('Site Updates') }} + +