Fix tests

This commit is contained in:
James Cole
2018-04-27 11:29:09 +02:00
parent 28bcff99f6
commit bb25132865
20 changed files with 81 additions and 118 deletions

View File

@@ -87,7 +87,6 @@ class BillRequest extends Request
case 'PATCH':
$bill = $this->route()->parameter('bill');
$rules['name'] .= ',' . $bill->id;
$rules['match'] .= ',' . $bill->id;
break;
}

View File

@@ -303,7 +303,7 @@ class RuleController extends Controller
{
$ids = $request->get('actions');
if (\is_array($ids)) {
$this->ruleGroupRepos->reorderRuleActions($rule, $ids);
$this->ruleRepos->reorderRuleActions($rule, $ids);
}
return response()->json('true');
@@ -320,7 +320,7 @@ class RuleController extends Controller
{
$ids = $request->get('triggers');
if (\is_array($ids)) {
$this->ruleGroupRepos->reorderRuleTriggers($rule, $ids);
$this->ruleRepos->reorderRuleTriggers($rule, $ids);
}
return response()->json('true');

View File

@@ -39,6 +39,7 @@ use Illuminate\Support\Collection;
use Preferences;
use Symfony\Component\HttpFoundation\ParameterBag;
use View;
use Illuminate\View\View as IlluminateView;
/**
* Class MassController.
@@ -69,9 +70,9 @@ class MassController extends Controller
/**
* @param Collection $journals
*
* @return View
* @return IlluminateView
*/
public function delete(Collection $journals): View
public function delete(Collection $journals): IlluminateView
{
$subTitle = trans('firefly.mass_delete_journals');
@@ -121,7 +122,7 @@ class MassController extends Controller
*
* @return View
*/
public function edit(Collection $journals)
public function edit(Collection $journals): IlluminateView
{
$subTitle = trans('firefly.mass_edit_journals');

View File

@@ -51,7 +51,7 @@ class AccountUpdateService
$account->iban = $data['iban'];
$account->save();
if($data['currency_id'] === 0) {
if(isset($data['currency_id']) && $data['currency_id'] === 0) {
unset($data['currency_id']);
}

View File

@@ -153,7 +153,7 @@ class AccountTransformer extends TransformerAbstract
}
$currencyId = (int)$this->repository->getMetaValue($account, 'currency_id');
$currencyCode = null;
$currencySymbol = null;
$currencySymbol = 'x';
$decimalPlaces = 2;
if ($currencyId > 0) {
$currency = TransactionCurrency::find($currencyId);