mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
An attempt at showing tag info.
This commit is contained in:
parent
eddf5cd250
commit
8b40d3346d
@ -34,6 +34,7 @@ class TagController extends Controller
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
View::share('title', 'Tags');
|
View::share('title', 'Tags');
|
||||||
View::share('mainTitleIcon', 'fa-tags');
|
View::share('mainTitleIcon', 'fa-tags');
|
||||||
|
View::share('hideTags',true);
|
||||||
$tagOptions = [
|
$tagOptions = [
|
||||||
'nothing' => 'Just a regular tag.',
|
'nothing' => 'Just a regular tag.',
|
||||||
'balancingAct' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.',
|
'balancingAct' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.',
|
||||||
|
3
pu.sh
3
pu.sh
@ -1,8 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# backup .env file.
|
|
||||||
cp .env .env.backup
|
|
||||||
|
|
||||||
# set testing environment
|
# set testing environment
|
||||||
cp .env.testing .env
|
cp .env.testing .env
|
||||||
|
|
||||||
|
@ -73,7 +73,32 @@
|
|||||||
also show an error when editing a tag and it becomes either
|
also show an error when editing a tag and it becomes either
|
||||||
of these two types. Or rather, block editing of the tag.
|
of these two types. Or rather, block editing of the tag.
|
||||||
-->
|
-->
|
||||||
|
<?php $showTag = false;$subAmount=0;$showSubAmount=false;$doNothing=true;?>
|
||||||
|
@foreach($journal->tags as $tag)
|
||||||
|
<!-- show tag for deposit that is part of a advance payment -->
|
||||||
|
@if($tag->tagMode == 'advancePayment' && $journal->transactionType->type == 'Deposit')
|
||||||
|
<?php $showTag=true;$tagToShow = $tag;$doNothing=false;?>
|
||||||
|
@endif
|
||||||
|
@if($tag->tagMode == 'advancePayment' && $journal->transactionType->type == 'Withdrawal')
|
||||||
|
<?php $subAmount = $journal->amount;$showSubAmount=true;?>
|
||||||
|
@foreach($tag->transactionjournals as $subJournal)
|
||||||
|
@if($subJournal->id != $journal->id)
|
||||||
|
<?php $subAmount -= $subJournal->amount;$doNothing=false;?>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<!-- show a link to the tag. -->
|
||||||
|
@if($showTag === true)
|
||||||
|
<a class="label label-success" href="{{route('tags.show',$tagToShow->id)}}">{{$tagToShow->tag}}</a>
|
||||||
|
@endif
|
||||||
|
@if($showSubAmount === true)
|
||||||
|
{!! Amount::format($subAmount*-1) !!}
|
||||||
|
@endif
|
||||||
|
@if($doNothing)
|
||||||
{!! Amount::formatJournal($journal) !!}
|
{!! Amount::formatJournal($journal) !!}
|
||||||
|
@endif
|
||||||
@else
|
@else
|
||||||
{!! Amount::formatJournal($journal) !!}
|
{!! Amount::formatJournal($journal) !!}
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
Reference in New Issue
Block a user