Fix for expense test

This commit is contained in:
Hillel Coren 2016-07-04 12:41:44 +03:00
parent 4d9927d856
commit 8b14161d0a

View File

@ -129,7 +129,7 @@ class ExpenseRepository extends BaseRepository
$expense->private_notes = trim($input['private_notes']); $expense->private_notes = trim($input['private_notes']);
} }
$expense->public_notes = trim($input['public_notes']); $expense->public_notes = trim($input['public_notes']);
$expense->should_be_invoiced = floatval($input['should_be_invoiced']) || $expense->client_id ? true : false; $expense->should_be_invoiced = isset($input['should_be_invoiced']) && floatval($input['should_be_invoiced']) || $expense->client_id ? true : false;
if ( ! $expense->expense_currency_id) { if ( ! $expense->expense_currency_id) {
$expense->expense_currency_id = \Auth::user()->account->getCurrencyId(); $expense->expense_currency_id = \Auth::user()->account->getCurrencyId();