mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Did some cleanup [skip ci]
This commit is contained in:
@@ -114,7 +114,7 @@ Breadcrumbs::register(
|
|||||||
$breadcrumbs->push(e($budget->name), route('budgets.show', $budget->id));
|
$breadcrumbs->push(e($budget->name), route('budgets.show', $budget->id));
|
||||||
if (!is_null($repetition) && !is_null($repetition->id)) {
|
if (!is_null($repetition) && !is_null($repetition->id)) {
|
||||||
$breadcrumbs->push(
|
$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) {
|
switch ($this->transactionType->type) {
|
||||||
case 'Deposit':
|
case 'Deposit':
|
||||||
return $this->transactions()->where('amount', '>', 0)->first()->account;
|
return $this->transactions()->where('amount', '>', 0)->first()->account;
|
||||||
break;
|
|
||||||
case 'Withdrawal':
|
case 'Withdrawal':
|
||||||
return $this->transactions()->where('amount', '<', 0)->first()->account;
|
return $this->transactions()->where('amount', '<', 0)->first()->account;
|
||||||
|
|
||||||
@@ -275,7 +274,6 @@ class TransactionJournal extends Model
|
|||||||
switch ($this->transactionType->type) {
|
switch ($this->transactionType->type) {
|
||||||
case 'Deposit':
|
case 'Deposit':
|
||||||
return $this->transactions()->where('amount', '<', 0)->first()->account;
|
return $this->transactions()->where('amount', '<', 0)->first()->account;
|
||||||
break;
|
|
||||||
case 'Withdrawal':
|
case 'Withdrawal':
|
||||||
return $this->transactions()->where('amount', '>', 0)->first()->account;
|
return $this->transactions()->where('amount', '>', 0)->first()->account;
|
||||||
|
|
||||||
|
@@ -43,13 +43,10 @@ class TagRepository implements TagRepositoryInterface
|
|||||||
$journal->tags()->save($tag);
|
$journal->tags()->save($tag);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
break;
|
|
||||||
case 'balancingAct':
|
case 'balancingAct':
|
||||||
return $this->connectBalancingAct($journal, $tag);
|
return $this->connectBalancingAct($journal, $tag);
|
||||||
break;
|
|
||||||
case 'advancePayment':
|
case 'advancePayment':
|
||||||
return $this->connectAdvancePayment($journal, $tag);
|
return $this->connectAdvancePayment($journal, $tag);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -19,6 +19,7 @@ class Budget extends Twig_Extension
|
|||||||
*/
|
*/
|
||||||
public function getFunctions()
|
public function getFunctions()
|
||||||
{
|
{
|
||||||
|
$functions = [];
|
||||||
$functions[] = new Twig_SimpleFunction(
|
$functions[] = new Twig_SimpleFunction(
|
||||||
'spentInRepetitionCorrected', function (LimitRepetition $repetition) {
|
'spentInRepetitionCorrected', function (LimitRepetition $repetition) {
|
||||||
$sum
|
$sum
|
||||||
|
@@ -32,19 +32,14 @@ class Journal extends Twig_Extension
|
|||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'Withdrawal':
|
case 'Withdrawal':
|
||||||
return '<span class="glyphicon glyphicon-arrow-left" title="' . trans('firefly.withdrawal') . '"></span>';
|
return '<span class="glyphicon glyphicon-arrow-left" title="' . trans('firefly.withdrawal') . '"></span>';
|
||||||
break;
|
|
||||||
case 'Deposit':
|
case 'Deposit':
|
||||||
return '<span class="glyphicon glyphicon-arrow-right" title="' . trans('firefly.deposit') . '"></span>';
|
return '<span class="glyphicon glyphicon-arrow-right" title="' . trans('firefly.deposit') . '"></span>';
|
||||||
break;
|
|
||||||
case 'Transfer':
|
case 'Transfer':
|
||||||
return '<i class="fa fa-fw fa-exchange" title="' . trans('firefly.transfer') . '"></i>';
|
return '<i class="fa fa-fw fa-exchange" title="' . trans('firefly.transfer') . '"></i>';
|
||||||
break;
|
|
||||||
case 'Opening balance':
|
case 'Opening balance':
|
||||||
return '<span class="glyphicon glyphicon-ban-circle" title="' . trans('firefly.openingBalance') . '"></span>';
|
return '<span class="glyphicon glyphicon-ban-circle" title="' . trans('firefly.openingBalance') . '"></span>';
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -133,6 +133,7 @@ class FireflyValidator extends Validator
|
|||||||
try {
|
try {
|
||||||
$value = Crypt::decrypt($value);
|
$value = Crypt::decrypt($value);
|
||||||
} catch (DecryptException $e) {
|
} catch (DecryptException $e) {
|
||||||
|
// if it fails, probably not encrypted.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user