mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Updates
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| @if(is_object($journals) && method_exists($journals, 'links')) | ||||
| {{$journals->links()}} | ||||
| @if(is_object($journals) && method_exists($journals, 'render')) | ||||
| {!! $journals->render() !!} | ||||
| @endif | ||||
| <table class="table table-striped table-bordered"> | ||||
|     <tr> | ||||
| @@ -115,6 +115,6 @@ | ||||
|     @endforeach | ||||
| </table> | ||||
|  | ||||
| @if(is_object($journals) && method_exists($journals, 'links')) | ||||
| {{$journals->links()}} | ||||
| @if(is_object($journals) && method_exists($journals, 'render')) | ||||
| {!! $journals->render() !!} | ||||
| @endif | ||||
|   | ||||
							
								
								
									
										96
									
								
								resources/views/transactions/create.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								resources/views/transactions/create.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| {{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $what) }} | ||||
| {{Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('transactions.store',$what)])}} | ||||
| {{Form::hidden('reminder',Input::get('reminder_id'))}} | ||||
|  | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-12 col-sm-12"> | ||||
|         <!-- panel for mandatory fields --> | ||||
|         <div class="panel panel-primary"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-exclamation-circle"></i> Mandatory fields | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                     <!-- DESCRIPTION ALWAYS AVAILABLE --> | ||||
|                     {{Form::ffText('description')}} | ||||
|                     @if($what == 'deposit' || $what == 'withdrawal') | ||||
|                         {{Form::ffSelect('account_id',$accounts)}} | ||||
|                     @endif | ||||
|  | ||||
|  | ||||
|                     <!-- SHOW EXPENSE ACCOUNT ONLY FOR WITHDRAWALS --> | ||||
|                     @if($what == 'withdrawal') | ||||
|                         {{Form::ffText('expense_account')}} | ||||
|                     @endif | ||||
|  | ||||
|                     <!-- SHOW REVENUE ACCOUNT ONLY FOR DEPOSITS --> | ||||
|                     @if($what == 'deposit') | ||||
|                         {{Form::ffText('revenue_account')}} | ||||
|                     @endif | ||||
|  | ||||
|  | ||||
|                     <!-- ONLY SHOW FROM/TO ACCOUNT WHEN CREATING TRANSFER --> | ||||
|                     @if($what == 'transfer') | ||||
|                         {{Form::ffSelect('account_from_id',$accounts)}} | ||||
|                         {{Form::ffSelect('account_to_id',$accounts)}} | ||||
|                     @endif | ||||
|  | ||||
|  | ||||
|                     <!-- ALWAYS SHOW AMOUNT --> | ||||
|                     {{Form::ffAmount('amount')}} | ||||
|  | ||||
|                     <!-- ALWAYS SHOW DATE --> | ||||
|                     {{Form::ffDate('date', date('Y-m-d'))}} | ||||
|                 </div> | ||||
|         </div> | ||||
|         <p> | ||||
|             <button type="submit" class="btn btn-lg btn-success"> | ||||
|                 <i class="fa fa-plus-circle"></i> Store new {{{$what}}} | ||||
|             </button> | ||||
|         </p> | ||||
|  | ||||
|     </div> | ||||
|     <div class="col-lg-6 col-md-12 col-sm-12"> | ||||
|         <!-- panel for optional fields --> | ||||
|                 <div class="panel panel-default"> | ||||
|                     <div class="panel-heading"> | ||||
|                         <i class="fa fa-smile-o"></i> Optional fields | ||||
|                     </div> | ||||
|                     <div class="panel-body"> | ||||
|                         <!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL --> | ||||
|                         @if($what == 'withdrawal') | ||||
|                             {{Form::ffSelect('budget_id',$budgets,0)}} | ||||
|                         @endif | ||||
|                         <!-- CATEGORY ALWAYS --> | ||||
|                         {{Form::ffText('category')}} | ||||
|  | ||||
|                         <!-- TAGS --> | ||||
|  | ||||
|  | ||||
|                         <!-- RELATE THIS TRANSFER TO A PIGGY BANK --> | ||||
|                         @if($what == 'transfer' && count($piggies) > 0) | ||||
|                             {{Form::ffSelect('piggy_bank_id',$piggies)}} | ||||
|                         @endif | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <!-- panel for options --> | ||||
|                 <div class="panel panel-default"> | ||||
|                     <div class="panel-heading"> | ||||
|                         <i class="fa fa-bolt"></i> Options | ||||
|                     </div> | ||||
|                     <div class="panel-body"> | ||||
|                         {{Form::ffOptionsList('create','transaction')}} | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|  | ||||
| {{Form::close()}} | ||||
|  | ||||
| @stop | ||||
| @section('scripts') | ||||
| {{HTML::script('assets/javascript/typeahead/bootstrap3-typeahead.min.js')}} | ||||
| {{HTML::script('assets/javascript/firefly/transactions.js')}} | ||||
| @stop | ||||
							
								
								
									
										43
									
								
								resources/views/transactions/delete.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								resources/views/transactions/delete.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| {{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) }} | ||||
| {{Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('transactions.destroy',$journal->id)])}} | ||||
|  | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|         <!-- panel for mandatory fields --> | ||||
|         <div class="panel panel-danger"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-exclamation-circle"></i> Destroy "{{{$journal->description}}}" | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <p> | ||||
|                 Deleting stuff from Firefly is <em>permanent</em>. This action will remove the transaction and all | ||||
|                 associated data. | ||||
|                 </p> | ||||
|                 <p class="text-success"> | ||||
|                     This action will not destroy categories, piggy banks, accounts, etc. | ||||
|                 </p> | ||||
|                 <p class="text-danger"> | ||||
|                     Are you sure? | ||||
|                 </p> | ||||
|                 <div class="btn-group"> | ||||
|                     <input type="submit" name="submit" value="Delete transaction" class="btn btn-danger" /> | ||||
|                     @if($journal->transactiontype->type == 'Withdrawal') | ||||
|                         <a href="{{route('transactions.index','withdrawal')}}" class="btn-default btn">Cancel</a> | ||||
|                     @endif | ||||
|                     @if($journal->transactiontype->type == 'Deposit') | ||||
|                         <a href="{{route('transactions.index','deposit')}}" class="btn-default btn">Cancel</a> | ||||
|                     @endif | ||||
|                     @if($journal->transactiontype->type == 'Transfer') | ||||
|                         <a href="{{route('transactions.index','transfers')}}" class="btn-default btn">Cancel</a> | ||||
|                     @endif | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| {{Form::close()}} | ||||
|  | ||||
| @stop | ||||
							
								
								
									
										96
									
								
								resources/views/transactions/edit.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										96
									
								
								resources/views/transactions/edit.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,96 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| {{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) }} | ||||
| {{Form::open(['class' => 'form-horizontal','id' => 'update','url' => route('transactions.update',$journal->id)])}} | ||||
|  | ||||
|  | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-12 col-sm-12"> | ||||
|     <!-- panel for mandatory fields --> | ||||
|             <div class="panel panel-primary"> | ||||
|                 <div class="panel-heading"> | ||||
|                     <i class="fa fa-exclamation-circle"></i> Mandatory fields | ||||
|                 </div> | ||||
|                 <div class="panel-body"> | ||||
|                     <!-- ALWAYS AVAILABLE --> | ||||
|                     {{Form::ffText('description',$journal->description)}} | ||||
|  | ||||
|                     <!-- SHOW ACCOUNT (FROM) ONLY FOR WITHDRAWALS AND DEPOSITS --> | ||||
|                     @if($what == 'deposit' || $what == 'withdrawal') | ||||
|                         {{Form::ffSelect('account_id',$accounts,$data['account_id'])}} | ||||
|                     @endif | ||||
|  | ||||
|                     <!-- SHOW EXPENSE ACCOUNT ONLY FOR WITHDRAWALS --> | ||||
|                     @if($what == 'withdrawal') | ||||
|                         {{Form::ffText('expense_account',$data['expense_account'])}} | ||||
|                     @endif | ||||
|                     <!-- SHOW REVENUE ACCOUNT ONLY FOR DEPOSITS --> | ||||
|                     @if($what == 'deposit') | ||||
|                         {{Form::ffText('revenue_account',$data['revenue_account'])}} | ||||
|                     @endif | ||||
|  | ||||
|                     <!-- ONLY SHOW FROM/TO ACCOUNT WHEN CREATING TRANSFER --> | ||||
|                     @if($what == 'transfer') | ||||
|                         {{Form::ffSelect('account_from_id',$accounts,$data['account_from_id'])}} | ||||
|                         {{Form::ffSelect('account_to_id',$accounts,$data['account_to_id'])}} | ||||
|                     @endif | ||||
|  | ||||
|                     <!-- ALWAYS SHOW AMOUNT --> | ||||
|                     {{Form::ffAmount('amount',$data['amount'],['currency' => $journal->transactionCurrency])}} | ||||
|  | ||||
|                     <!-- ALWAYS SHOW DATE --> | ||||
|                     {{Form::ffDate('date',$data['date'])}} | ||||
|             </div> | ||||
|         </div> <!-- close panel --> | ||||
|  | ||||
|         <p> | ||||
|             <button type="submit" class="btn btn-lg btn-success"> | ||||
|                 <i class="fa fa-plus-circle"></i> Update {{{$what}}} | ||||
|             </button> | ||||
|         </p> | ||||
|  | ||||
|     </div> | ||||
|     <div class="col-lg-6 col-md-12 col-sm-12"> | ||||
|         <!-- panel for optional fields --> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa fa-smile-o"></i> Optional fields | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL --> | ||||
|                 @if($what == 'withdrawal') | ||||
|                     {{Form::ffSelect('budget_id',$budgets,$data['budget_id'])}} | ||||
|                 @endif | ||||
|                 <!-- CATEGORY ALWAYS --> | ||||
|                 {{Form::ffText('category',$data['category'])}} | ||||
|  | ||||
|                 <!-- TAGS --> | ||||
|  | ||||
|                 <!-- RELATE THIS TRANSFER TO A PIGGY BANK --> | ||||
|                 @if($what == 'transfer' && count($piggies) > 0) | ||||
|                     {{Form::ffSelect('piggy_bank_id',$piggies,$data['piggy_bank_id'])}} | ||||
|                 @endif | ||||
|                     </div> | ||||
|             </div><!-- end of panel for options--> | ||||
|  | ||||
|             <!-- panel for options --> | ||||
|             <div class="panel panel-default"> | ||||
|                 <div class="panel-heading"> | ||||
|                     <i class="fa fa-bolt"></i> Options | ||||
|                 </div> | ||||
|                 <div class="panel-body"> | ||||
|                     {{Form::ffOptionsList('update','transaction')}} | ||||
|                 </div> | ||||
|             </div> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| {{Form::close()}} | ||||
|  | ||||
|  | ||||
| @stop | ||||
| @section('scripts') | ||||
| {{HTML::script('assets/javascript/typeahead/bootstrap3-typeahead.min.js')}} | ||||
| {{HTML::script('assets/javascript/firefly/transactions.js')}} | ||||
| @stop | ||||
							
								
								
									
										16
									
								
								resources/views/transactions/index.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								resources/views/transactions/index.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| {!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $what) !!} | ||||
| <div class="row"> | ||||
|     <div class="col-lg-12 col-sm-12 col-md-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <i class="fa {{$subTitleIcon}}"></i> {{{$subTitle}}} | ||||
|             </div> | ||||
|                 @include('list.journals-full') | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| @stop | ||||
							
								
								
									
										131
									
								
								resources/views/transactions/show.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										131
									
								
								resources/views/transactions/show.blade.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,131 @@ | ||||
| @extends('layouts.default') | ||||
| @section('content') | ||||
| {{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $journal) }} | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 Metadata | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <table class="table table-striped table-bordered"> | ||||
|                     <tr> | ||||
|                         <td>Date</td> | ||||
|                         <td>{{{$journal->date->format('jS F Y')}}}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>Currency</td> | ||||
|                         <td>{{{$journal->transactioncurrency->code}}}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>Type</td> | ||||
|                         <td>{{{$journal->transactiontype->type}}}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>Completed</td> | ||||
|                         <td> | ||||
|                             @if($journal->completed == 1) | ||||
|                             <span class="text-success">Yes</span> | ||||
|                             @else | ||||
|                             <span class="text-danger">No</span> | ||||
|                             @endif | ||||
|                         </td> | ||||
|                     </tr> | ||||
|                     @foreach($journal->budgets()->get() as $budget) | ||||
|                                     <tr> | ||||
|                                         <td>{{$budget->class}}</td> | ||||
|                                         <td><a href="{{route('budgets.show',$budget->id)}}">{{{$budget->name}}}</a></td> | ||||
|                                     </tr> | ||||
|                     @endforeach | ||||
|                     @foreach($journal->categories()->get() as $category) | ||||
|                         <tr> | ||||
|                             <td>{{$category->class}}</td> | ||||
|                             <td><a href="{{route('categories.show',$category->id)}}">{{{$category->name}}}</a></td> | ||||
|                         </tr> | ||||
|                     @endforeach | ||||
|  | ||||
|                 </table> | ||||
|             </div> | ||||
|         </div> | ||||
|         <!-- events, if present --> | ||||
|         @if(count($journal->piggyBankEvents) > 0) | ||||
|             <div class="panel panel-default"> | ||||
|                 <div class="panel-heading"> | ||||
|                     Piggy banks | ||||
|                 </div> | ||||
|                 <div class="panel-body"> | ||||
|                     @include('list.piggy-bank-events',['events' => $journal->piggyBankEvents,'showPiggyBank' => true]) | ||||
|                 </div> | ||||
|             </div> | ||||
|         @endif | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 Related transactions | ||||
|             </div> | ||||
|                 @if($members->count() == 0) | ||||
|                     <div class="panel-body"> | ||||
|                         <p> | ||||
|                             <em>No related transactions</em> | ||||
|                         </p> | ||||
|                     </div> | ||||
|                 @else | ||||
|                     <table class="table"> | ||||
|                     @foreach($members as $jrnl) | ||||
|                         <tr> | ||||
|                             <td><input type="checkbox" checked="checked" data-relatedto="{{$journal->id}}" data-id="{{$jrnl->id}}" class="unrelate-checkbox" /></td> | ||||
|                             <td><a href="#">{{{$jrnl->description}}}</a></td> | ||||
|                             <td>{{Amount::formatJournal($jrnl, $jrnl->getAmount())}}</td> | ||||
|                         </tr> | ||||
|                     @endforeach | ||||
|                     </table> | ||||
|                 @endif | ||||
|             <div class="panel-footer"> | ||||
|             <p> | ||||
|                 <a href="#" data-id="{{$journal->id}}" class="relateTransaction btn btn-default"><i data-id="{{$journal->id}}" class="fa fa-compress"></i> Relate to another transaction</a> | ||||
|             </p> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|  | ||||
|     @foreach($journal->transactions as $t) | ||||
|         <div class="panel panel-default"> | ||||
|             <div class="panel-heading"> | ||||
|                 <a href="{{route('accounts.show',$t->account->id)}}">{{{$t->account->name}}}</a><br /><small>{{{$t->account->accounttype->description}}}</small> | ||||
|             </div> | ||||
|             <div class="panel-body"> | ||||
|                 <table class="table table-striped table-bordered"> | ||||
|                     <tr> | ||||
|                         <td>Amount</td> | ||||
|                         <td>{{Amount::formatTransaction($t)}}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <td>New balance</td> | ||||
|                         <td>{{Amount::format($t->before)}} → {{Amount::format($t->after)}}</td> | ||||
|                     </tr> | ||||
|                     @if(!is_null($t->description)) | ||||
|                     <tr> | ||||
|                         <td>Description</td> | ||||
|                         <td>{{{$t->description}}}</td> | ||||
|                     </tr> | ||||
|                     @endif | ||||
|                 </table> | ||||
|             </div> | ||||
|         </div> | ||||
|     @endforeach | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <div class="row"> | ||||
|     <div class="col-lg-6 col-md-6 col-sm-12"> | ||||
|         <div class="btn-group"> | ||||
|         <a class="btn btn-default" href="{{route('transactions.edit',$journal->id)}}"><span class="glyphicon glyphicon-pencil"></span> Edit</a> <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Delete</a> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| @stop | ||||
| @section('scripts') | ||||
| {{HTML::script('assets/javascript/firefly/transactions.js')}} | ||||
| {{HTML::script('assets/javascript/firefly/related-manager.js')}} | ||||
| @stop | ||||
		Reference in New Issue
	
	Block a user