From 8b40d3346d03ea51eb22b43cb526ae2dd275cd92 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 1 May 2015 06:47:24 +0200 Subject: [PATCH] An attempt at showing tag info. --- app/Http/Controllers/TagController.php | 1 + pu.sh | 3 --- resources/views/list/journals-full.blade.php | 27 +++++++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 990dd0a84d..0e8503375d 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -34,6 +34,7 @@ class TagController extends Controller parent::__construct(); View::share('title', 'Tags'); View::share('mainTitleIcon', 'fa-tags'); + View::share('hideTags',true); $tagOptions = [ 'nothing' => 'Just a regular tag.', 'balancingAct' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.', diff --git a/pu.sh b/pu.sh index 26c595cfb4..cbd5c6fbf3 100755 --- a/pu.sh +++ b/pu.sh @@ -1,8 +1,5 @@ #!/bin/bash -# backup .env file. -cp .env .env.backup - # set testing environment cp .env.testing .env diff --git a/resources/views/list/journals-full.blade.php b/resources/views/list/journals-full.blade.php index 239e1b4642..85e80da821 100644 --- a/resources/views/list/journals-full.blade.php +++ b/resources/views/list/journals-full.blade.php @@ -73,7 +73,32 @@ also show an error when editing a tag and it becomes either of these two types. Or rather, block editing of the tag. --> - {!! Amount::formatJournal($journal) !!} + + @foreach($journal->tags as $tag) + + @if($tag->tagMode == 'advancePayment' && $journal->transactionType->type == 'Deposit') + + @endif + @if($tag->tagMode == 'advancePayment' && $journal->transactionType->type == 'Withdrawal') + amount;$showSubAmount=true;?> + @foreach($tag->transactionjournals as $subJournal) + @if($subJournal->id != $journal->id) + amount;$doNothing=false;?> + @endif + @endforeach + @endif + @endforeach + + + @if($showTag === true) + {{$tagToShow->tag}} + @endif + @if($showSubAmount === true) + {!! Amount::format($subAmount*-1) !!} + @endif + @if($doNothing) + {!! Amount::formatJournal($journal) !!} + @endif @else {!! Amount::formatJournal($journal) !!} @endif