mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Did some cleanup [skip ci]
This commit is contained in:
parent
7dfde51b84
commit
2738ac5a5c
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -19,6 +19,7 @@ class Budget extends Twig_Extension
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
$functions = [];
|
||||
$functions[] = new Twig_SimpleFunction(
|
||||
'spentInRepetitionCorrected', function (LimitRepetition $repetition) {
|
||||
$sum
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -133,6 +133,7 @@ class FireflyValidator extends Validator
|
||||
try {
|
||||
$value = Crypt::decrypt($value);
|
||||
} catch (DecryptException $e) {
|
||||
// if it fails, probably not encrypted.
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user