mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-03 12:10:42 -06:00
Updates
This commit is contained in:
parent
3e28c0c00a
commit
49066c282a
16
app/Http/Controllers/PiggyBankController.php
Normal file
16
app/Http/Controllers/PiggyBankController.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use FireflyIII\Http\Requests;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class PiggyBankController
|
||||
*
|
||||
* @package FireflyIII\Http\Controllers
|
||||
*/
|
||||
class PiggyBankController extends Controller {
|
||||
|
||||
|
||||
}
|
69
app/Http/Controllers/TransactionController.php
Normal file
69
app/Http/Controllers/TransactionController.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Http\Requests;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use View;
|
||||
|
||||
|
||||
/**
|
||||
* Class TransactionController
|
||||
*
|
||||
* @package FireflyIII\Http\Controllers
|
||||
*/
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
View::share('title', 'Transactions');
|
||||
View::share('mainTitleIcon', 'fa-repeat');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $what
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function index($what)
|
||||
{
|
||||
switch ($what) {
|
||||
case 'expenses':
|
||||
case 'withdrawal':
|
||||
$subTitleIcon = 'fa-long-arrow-left';
|
||||
$subTitle = 'Expenses';
|
||||
//$journals = $this->_repository->getWithdrawalsPaginated(50);
|
||||
$types = ['Withdrawal'];
|
||||
break;
|
||||
case 'revenue':
|
||||
case 'deposit':
|
||||
$subTitleIcon = 'fa-long-arrow-right';
|
||||
$subTitle = 'Revenue, income and deposits';
|
||||
// $journals = $this->_repository->getDepositsPaginated(50);
|
||||
$types = ['Deposit'];
|
||||
break;
|
||||
case 'transfer':
|
||||
case 'transfers':
|
||||
$subTitleIcon = 'fa-arrows-h';
|
||||
$subTitle = 'Transfers';
|
||||
//$journals = $this->_repository->getTransfersPaginated(50);
|
||||
$types = ['Transfer'];
|
||||
break;
|
||||
}
|
||||
|
||||
$page = intval(\Input::get('page'));
|
||||
$offset = $page > 0 ? ($page - 1) * 50 : 0;
|
||||
|
||||
$set = Auth::user()->transactionJournals()->transactionTypes($types)->withRelevantData()->take(50)->offset($offset)->orderBy('date', 'DESC')->get(
|
||||
['transaction_journals.*']
|
||||
);
|
||||
$count = Auth::user()->transactionJournals()->transactionTypes($types)->count();
|
||||
$journals = new LengthAwarePaginator($set, $count, 50, $page);
|
||||
$journals->setPath('transactions/' . $what);
|
||||
|
||||
return View::make('transactions.index', compact('subTitle', 'what', 'subTitleIcon', 'journals'));
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -161,13 +161,13 @@ Route::group(
|
||||
* Piggy Bank Controller
|
||||
*/
|
||||
// piggy bank controller
|
||||
Route::get('/piggy_banks', ['uses' => 'PiggyBankController@index', 'as' => 'piggy_banks.index']);
|
||||
//Route::get('/piggy_banks/add/{piggyBank}', ['uses' => 'PiggyBankController@add']); # add money
|
||||
//Route::get('/piggy_banks/remove/{piggyBank}', ['uses' => 'PiggyBankController@remove']); #remove money
|
||||
//Route::get('/piggy_banks/create', ['uses' => 'PiggyBankController@create', 'as' => 'piggy_banks.create']);
|
||||
//Route::get('/piggy_banks/edit/{piggyBank}', ['uses' => 'PiggyBankController@edit', 'as' => 'piggy_banks.edit']);
|
||||
//Route::get('/piggy_banks/delete/{piggyBank}', ['uses' => 'PiggyBankController@delete', 'as' => 'piggy_banks.delete']);
|
||||
//Route::get('/piggy_banks/show/{piggyBank}', ['uses' => 'PiggyBankController@show', 'as' => 'piggy_banks.show']);
|
||||
Route::get('/piggy-banks', ['uses' => 'PiggyBankController@index', 'as' => 'piggy_banks.index']);
|
||||
//Route::get('/piggy-banks/add/{piggyBank}', ['uses' => 'PiggyBankController@add']); # add money
|
||||
//Route::get('/piggy-banks/remove/{piggyBank}', ['uses' => 'PiggyBankController@remove']); #remove money
|
||||
//Route::get('/piggy-banks/create', ['uses' => 'PiggyBankController@create', 'as' => 'piggy_banks.create']);
|
||||
//Route::get('/piggy-banks/edit/{piggyBank}', ['uses' => 'PiggyBankController@edit', 'as' => 'piggy_banks.edit']);
|
||||
//Route::get('/piggy-banks/delete/{piggyBank}', ['uses' => 'PiggyBankController@delete', 'as' => 'piggy_banks.delete']);
|
||||
//Route::get('/piggy-banks/show/{piggyBank}', ['uses' => 'PiggyBankController@show', 'as' => 'piggy_banks.show']);
|
||||
|
||||
/**
|
||||
* Preferences Controller
|
||||
|
@ -46,7 +46,6 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
public function getJournals(Account $account, $page, $range = 'session')
|
||||
{
|
||||
$offset = $page * 50;
|
||||
$items = [];
|
||||
$query = Auth::user()
|
||||
->transactionJournals()
|
||||
->withRelevantData()
|
||||
@ -58,14 +57,9 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
$query->before(Session::get('end', Carbon::now()->startOfMonth()));
|
||||
$query->after(Session::get('start', Carbon::now()->startOfMonth()));
|
||||
}
|
||||
$count = $query->count();
|
||||
$set = $query->take(50)->offset($offset)->get(['transaction_journals.*']);
|
||||
|
||||
foreach ($set as $entry) {
|
||||
$items[] = $entry;
|
||||
}
|
||||
|
||||
$paginator = new LengthAwarePaginator($items, $count, 50, $page);
|
||||
$count = $query->count();
|
||||
$set = $query->take(50)->offset($offset)->get(['transaction_journals.*']);
|
||||
$paginator = new LengthAwarePaginator($set, $count, 50, $page);
|
||||
|
||||
return $paginator;
|
||||
|
||||
|
@ -54,12 +54,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
|
||||
$set = $setQuery->get(['transaction_journals.*']);
|
||||
$count = $countQuery->count();
|
||||
$items = [];
|
||||
foreach ($set as $entry) {
|
||||
$items[] = $entry;
|
||||
}
|
||||
|
||||
return new LengthAwarePaginator($items, $count, $take, $offset);
|
||||
return new LengthAwarePaginator($set, $count, $take, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user