Did some cleanup [skip ci]

This commit is contained in:
James Cole 2015-05-26 19:48:49 +02:00
parent 7dfde51b84
commit 2738ac5a5c
6 changed files with 3 additions and 11 deletions

View File

@ -114,7 +114,7 @@ Breadcrumbs::register(
$breadcrumbs->push(e($budget->name), route('budgets.show', $budget->id));
if (!is_null($repetition) && !is_null($repetition->id)) {
$breadcrumbs->push(
Navigation::periodShow($repetition->startdate, $repetition->budgetlimit->repeat_freq), route('budgets.show', $budget->id, $repetition->id)
Navigation::periodShow($repetition->startdate, $repetition->budgetLimit->repeat_freq), route('budgets.show', $budget->id, $repetition->id)
);
}
}

View File

@ -204,7 +204,6 @@ class TransactionJournal extends Model
switch ($this->transactionType->type) {
case 'Deposit':
return $this->transactions()->where('amount', '>', 0)->first()->account;
break;
case 'Withdrawal':
return $this->transactions()->where('amount', '<', 0)->first()->account;
@ -275,7 +274,6 @@ class TransactionJournal extends Model
switch ($this->transactionType->type) {
case 'Deposit':
return $this->transactions()->where('amount', '<', 0)->first()->account;
break;
case 'Withdrawal':
return $this->transactions()->where('amount', '>', 0)->first()->account;

View File

@ -43,13 +43,10 @@ class TagRepository implements TagRepositoryInterface
$journal->tags()->save($tag);
return true;
break;
case 'balancingAct':
return $this->connectBalancingAct($journal, $tag);
break;
case 'advancePayment':
return $this->connectAdvancePayment($journal, $tag);
break;
}
return false;

View File

@ -19,6 +19,7 @@ class Budget extends Twig_Extension
*/
public function getFunctions()
{
$functions = [];
$functions[] = new Twig_SimpleFunction(
'spentInRepetitionCorrected', function (LimitRepetition $repetition) {
$sum

View File

@ -32,19 +32,14 @@ class Journal extends Twig_Extension
switch ($type) {
case 'Withdrawal':
return '<span class="glyphicon glyphicon-arrow-left" title="' . trans('firefly.withdrawal') . '"></span>';
break;
case 'Deposit':
return '<span class="glyphicon glyphicon-arrow-right" title="' . trans('firefly.deposit') . '"></span>';
break;
case 'Transfer':
return '<i class="fa fa-fw fa-exchange" title="' . trans('firefly.transfer') . '"></i>';
break;
case 'Opening balance':
return '<span class="glyphicon glyphicon-ban-circle" title="' . trans('firefly.openingBalance') . '"></span>';
break;
default:
return '';
break;
}

View File

@ -133,6 +133,7 @@ class FireflyValidator extends Validator
try {
$value = Crypt::decrypt($value);
} catch (DecryptException $e) {
// if it fails, probably not encrypted.
}