Skip to content

Firefly III: a personal finances manager

Cleaned up some icons, improved routine for repeated expenses.

James Colef50b133f2ef6
diff --git a/.gitignore b/.gitignore
index 60d6836759..62baeeb595 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@ db.sqlite-journal
tests/_output/*
.env
clover.xml
+node_modules/
\ No newline at end of file
diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php
index 59bd29dea2..739330db65 100644
--- a/app/Http/Controllers/BillController.php
+++ b/app/Http/Controllers/BillController.php
@@ -210,42 +210,6 @@ class BillController extends Controller
return Redirect::route('bills.index');
-
- // $data = Input::except('_token');
- // $data['active'] = intval(Input::get('active'));
- // $data['automatch'] = intval(Input::get('automatch'));
- // $data['user_id'] = Auth::user()->id;
- //
- // // always validate:
- // $messages = $this->_repository->validate($data);
- //
- // // flash messages:
- // Session::flash('warnings', $messages['warnings']);
- // Session::flash('successes', $messages['successes']);
- // Session::flash('errors', $messages['errors']);
- // if ($messages['errors']->count() > 0) {
- // Session::flash('error', 'Could not update bill: ' . $messages['errors']->first());
- //
- // return Redirect::route('bills.edit', $bill->id)->withInput();
- // }
- //
- // // return to update screen:
- // if ($data['post_submit_action'] == 'validate_only') {
- // return Redirect::route('bills.edit', $bill->id)->withInput();
- // }
- //
- // // update
- // $this->_repository->update($bill, $data);
- // Session::flash('success', 'Bill "' . e($data['name']) . '" updated.');
- //
- // // go back to list
- // if ($data['post_submit_action'] == 'update') {
- // return Redirect::route('bills.index');
- // }
- //
- // // go back to update screen.
- // return Redirect::route('bills.edit', $bill->id)->withInput(['post_submit_action' => 'return_to_edit']);
-
}
}
diff --git a/app/Http/Controllers/RepeatedExpenseController.php b/app/Http/Controllers/RepeatedExpenseController.php
index 64f2e63c45..85bc37d1c1 100644
--- a/app/Http/Controllers/RepeatedExpenseController.php
+++ b/app/Http/Controllers/RepeatedExpenseController.php
@@ -159,6 +159,7 @@ class RepeatedExpenseController extends Controller
'reminder' => $request->get('reminder'),
'skip' => intval($request->get('skip')),
'rep_every' => intval($request->get('rep_every')),
+ 'rep_length' => $request->get('rep_length'),
'rep_times' => intval($request->get('rep_times')),
];
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 970e795492..1fc059e294 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -37,6 +37,7 @@ class Kernel extends HttpKernel
'guest' => 'FireflyIII\Http\Middleware\RedirectIfAuthenticated',
'range' => 'FireflyIII\Http\Middleware\Range',
'reminders' => 'FireflyIII\Http\Middleware\Reminders',
+ 'piggybanks' => 'FireflyIII\Http\Middleware\PiggyBanks',
];
}
diff --git a/app/Http/Middleware/PiggyBanks.php b/app/Http/Middleware/PiggyBanks.php
new file mode 100644
index 0000000000..1584f94175
--- /dev/null
+++ b/app/Http/Middleware/PiggyBanks.php
@@ -0,0 +1,141 @@
+<?php
+
+namespace FireflyIII\Http\Middleware;
+
+
+use Carbon\Carbon;
+use Closure;
+use FireflyIII\Models\PiggyBank;
+use FireflyIII\Models\PiggyBankRepetition;
+use FireflyIII\Models\Reminder;
+use Illuminate\Contracts\Auth\Guard;
+use Illuminate\Database\Query\JoinClause;
+use Illuminate\Support\Collection;
+use Navigation;
+use Session;
+
+
+/**
+ * Class PiggyBanks
+ *
+ * @package FireflyIII\Http\Middleware
+ */
+class PiggyBanks
+{
+ /**
+ * The Guard implementation.
+ *
+ * @var Guard
+ */
+ protected $auth;
+
+ /**
+ * Create a new filter instance.
+ *
+ * @param Guard $auth
+ *
+ */
+ public function __construct(Guard $auth)
+ {
+ $this->auth = $auth;
+ }
+
+ /**
+ * Handle an incoming request.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
+ *
+ * @return mixed
+ */
+ public function handle($request, Closure $next)
+ {
+ if ($this->auth->check() && !$request->isXmlHttpRequest()) {
+ // get piggy banks without a repetition:
+ /** @var Collection $set */
+ $set = $this->auth->user()->piggybanks()
+ ->leftJoin('piggy_bank_repetitions', 'piggy_banks.id', '=', 'piggy_bank_repetitions.piggy_bank_id')
+ ->where('piggy_banks.repeats', 0)
+ ->whereNull('piggy_bank_repetitions.id')
+ ->get(['piggy_banks.id', 'piggy_banks.startdate', 'piggy_banks.targetdate']);
+ if ($set->count() > 0) {
+ /** @var PiggyBank $partialPiggy */
+ foreach ($set as $partialPiggy) {
+ $repetition = new PiggyBankRepetition;
+ $repetition->piggyBank()->associate($partialPiggy);
+ $repetition->startdate = is_null($partialPiggy->startdate) ? null : $partialPiggy->startdate;
+ $repetition->targetdate = is_null($partialPiggy->targetdate) ? null : $partialPiggy->targetdate;
+ $repetition->currentamount = 0;
+ $repetition->save();
+ }
+ }
+ unset($partialPiggy, $set, $repetition);
+
+ // get repeating piggy banks without a repetition for current time frame.
+ /** @var Collection $set */
+ $set = $this->auth->user()->piggybanks()->leftJoin(
+ 'piggy_bank_repetitions', function (JoinClause $join) {
+ $join->on('piggy_bank_repetitions.piggy_bank_id', '=', 'piggy_banks.id')
+ ->where('piggy_bank_repetitions.targetdate', '>=', Session::get('start')->format('Y-m-d'))
+ ->where('piggy_bank_repetitions.startdate', '<=', Session::get('end')->format('Y-m-d'));
+ }
+ )
+ ->where('repeats', 1)
+ ->whereNull('piggy_bank_repetitions.id')
+ ->get(['piggy_banks.*']);
+
+ // these piggy banks are missing a repetition. start looping and create them!
+ if ($set->count() > 0) {
+ /** @var PiggyBank $piggyBank */
+ foreach ($set as $piggyBank) {
+ $start = clone $piggyBank->startdate;
+ $end = clone $piggyBank->targetdate;
+ $max = clone $piggyBank->targetdate;
+ $index = 0;
+
+ // first loop: start date to target date.
+ // then, continue looping until end is > today
+ while ($start <= $max) {
+ // first loop fixes this date. or should fix it.
+ $max = new Carbon;
+
+ echo '[#'.$piggyBank->id.', from: '.$start->format('Y-m-d.').' to '.$end->format('Y-m-d.').']';
+ // create stuff. Or at least, try:
+ $repetition = $piggyBank->piggyBankRepetitions()->onDates($start, $end)->first();
+ if(!$repetition) {
+ $repetition = new PiggyBankRepetition;
+ $repetition->piggyBank()->associate($piggyBank);
+ $repetition->startdate = $start;
+ $repetition->targetdate = $end;
+ $repetition->currentamount = 0;
+ // it might exist, catch:
+ $repetition->save();
+ }
+
+ // start where end 'ended':
+ $start = clone $end;
+ // move end.
+ $end = Navigation::addPeriod($end, $piggyBank->rep_length, 0);
+
+ }
+
+
+ // first repetition: from original start to original target.
+ $repetition = new PiggyBankRepetition;
+ $repetition->piggyBank()->associate($piggyBank);
+ $repetition->startdate = is_null($piggyBank->startdate) ? null : $piggyBank->startdate;
+ $repetition->targetdate = is_null($piggyBank->targetdate) ? null : $piggyBank->targetdate;
+ $repetition->currentamount = 0;
+ // it might exist, catch:
+ //$repetition->save();
+
+ // then, loop from original target up to now.
+ }
+ }
+
+
+ }
+
+ return $next($request);
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php
index 6917c117d9..b794ba6871 100644
--- a/app/Http/Requests/PiggyBankFormRequest.php
+++ b/app/Http/Requests/PiggyBankFormRequest.php
@@ -3,8 +3,10 @@
namespace FireflyIII\Http\Requests;
use Auth;
+use Carbon\Carbon;
use FireflyIII\Models\Account;
use Input;
+use Navigation;
/**
* Class PiggyBankFormRequest
@@ -36,8 +38,14 @@ class PiggyBankFormRequest extends Request
if (intval(Input::get('repeats')) == 1) {
$targetDateRule = 'required|date|after:' . date('Y-m-d');
+ // switch on rep_every, make sure it's not too far away.
+ if (!is_null(Input::get('rep_length'))) {
+ $end = Navigation::addPeriod(new Carbon, Input::get('rep_length'), 0);
+ $targetDateRule .= '|before:' . $end->format('Y-m-d');
+ }
}
+
$rules = [
'repeats' => 'required|boolean',
'name' => $nameRule,
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 281afe04f4..3bf64a8ceb 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -156,7 +156,7 @@ Route::controllers(
* Home Controller
*/
Route::group(
- ['middleware' => ['auth', 'range', 'reminders']], function () {
+ ['middleware' => ['auth', 'range', 'reminders','piggybanks']], function () {
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']);
diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php
index 38f5fa5690..2bb790dd1b 100644
--- a/app/Models/PiggyBank.php
+++ b/app/Models/PiggyBank.php
@@ -14,7 +14,9 @@ class PiggyBank extends Model
{
use SoftDeletes;
- protected $fillable = ['repeats', 'name', 'account_id','rep_every', 'rep_times', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder','remind_me'];
+ protected $fillable
+ = ['repeats', 'name', 'account_id', 'rep_every', 'rep_times', 'reminder_skip', 'targetamount', 'startdate', 'targetdate', 'reminder', 'remind_me',
+ 'rep_length'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
@@ -24,15 +26,6 @@ class PiggyBank extends Model
return $this->belongsTo('FireflyIII\Models\Account');
}
- /**
- * @param $value
- *
- * @return int
- */
- public function getRemindMeAttribute($value) {
- return intval($value) == 1;
- }
-
/**
* Grabs the PiggyBankRepetition that's currently relevant / active
*
@@ -40,10 +33,10 @@ class PiggyBank extends Model
*/
public function currentRelevantRep()
{
- if ($this->currentRep) {
+ if (!is_null($this->currentRep)) {
return $this->currentRep;
}
- if ($this->repeats == 0) {
+ if (intval($this->repeats) === 0) {
$rep = $this->piggyBankRepetitions()->first(['piggy_bank_repetitions.*']);
$this->currentRep = $rep;
@@ -104,6 +97,16 @@ class PiggyBank extends Model
return ['created_at', 'updated_at', 'deleted_at', 'startdate', 'targetdate'];
}
+ /**
+ * @param $value
+ *
+ * @return int
+ */
+ public function getRemindMeAttribute($value)
+ {
+ return intval($value) == 1;
+ }
+
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php
index 6bb9d2d6e2..706556fc16 100644
--- a/app/Models/PiggyBankRepetition.php
+++ b/app/Models/PiggyBankRepetition.php
@@ -48,4 +48,16 @@ class PiggyBankRepetition extends Model
});
}
+ /**
+ * @param EloquentBuilder $query
+ * @param Carbon $start
+ * @param Carbon $target
+ *
+ * @return $this
+ */
+ public function scopeOnDates(EloquentBuilder $query, Carbon $start, Carbon $target)
+ {
+ return $query->where('startdate',$start->format('Y-m-d'))->where('targetdate',$target->format('Y-m-d'));
+ }
+
}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 043e9ad7e1..e7c8505580 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -74,6 +74,8 @@ class EventServiceProvider extends ServiceProvider
}
);
+ // move this routine to a filter
+ // in case of repeated piggy banks and/or other problems.
PiggyBank::created(
function (PiggyBank $piggyBank) {
$repetition = new PiggyBankRepetition;
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php
index 2e5ee2b16a..2d82dacbf5 100644
--- a/app/Support/ExpandedForm.php
+++ b/app/Support/ExpandedForm.php
@@ -2,13 +2,13 @@
namespace FireflyIII\Support;
+use Amount as Amt;
use FireflyIII\Models\TransactionCurrency;
use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
use Input;
use Session;
use View;
-use Amount as Amt;
/**
* Class ExpandedForm
@@ -96,24 +96,14 @@ class ExpandedForm
public function getHolderClasses($name)
{
/*
- * Get errors, warnings and successes from session:
+ * Get errors from session:
*/
/** @var MessageBag $errors */
- $errors = Session::get('errors');
-
- /** @var MessageBag $successes */
- $successes = Session::get('successes');
-
- switch (true) {
- case (!is_null($errors) && $errors->has($name)):
- $classes = 'form-group has-error has-feedback';
- break;
- case (!is_null($successes) && $successes->has($name)):
- $classes = 'form-group has-success has-feedback';
- break;
- default:
- $classes = 'form-group';
- break;
+ $errors = Session::get('errors');
+ $classes = 'form-group';
+
+ if (!is_null($errors) && $errors->has($name)) {
+ $classes = 'form-group has-error has-feedback';
}
return $classes;
diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.php
index 6e3d97ba3d..a9a81bd023 100644
--- a/database/seeds/TestDataSeeder.php
+++ b/database/seeds/TestDataSeeder.php
@@ -116,9 +116,9 @@ class TestDataSeeder extends Seeder
*/
public function createUsers()
{
- User::create(['email' => '[email protected]', 'password' => 'functional', 'reset' => 'okokokokokokokokokokokokokokokok', 'remember_token' => null]);
- User::create(['email' => '[email protected]', 'password' => 'functional', 'reset' => null, 'remember_token' => null]);
- User::create(['email' => '[email protected]', 'password' => 'james', 'reset' => null, 'remember_token' => null]);
+ User::create(['email' => '[email protected]', 'password' => bcrypt('functional'), 'reset' => 'okokokokokokokokokokokokokokokok', 'remember_token' => null]);
+ User::create(['email' => '[email protected]', 'password' => bcrypt('functional'), 'reset' => null, 'remember_token' => null]);
+ User::create(['email' => '[email protected]', 'password' => bcrypt('james'), 'reset' => null, 'remember_token' => null]);
}
/**
diff --git a/resources/views/bills/show.blade.php b/resources/views/bills/show.blade.php
index 413606bb86..2c0298f94d 100644
--- a/resources/views/bills/show.blade.php
+++ b/resources/views/bills/show.blade.php
@@ -8,15 +8,15 @@
<i class="fa fa-rotate-right"></i> {{{$bill->name}}}
@if($bill->active)
- <span class="glyphicon glyphicon-ok" title="Active"></span>
+ <i class="fa fa-check fa-fw" title="Active"></i>
@else
- <span class="glyphicon glyphicon-remove" title="Inactive"></span>
+ <i class="fa fa-times fa-fw" title="Inactive"></i>
@endif
@if($bill->automatch)
- <span class="glyphicon glyphicon-ok" title="Automatically matched by Firefly"></span>
+ <i class="fa fa-check fa-fw" title="Automatically matched by Firefly"></i>
@else
- <span class="glyphicon glyphicon-remove" title="Not automatically matched by Firefly"></span>
+ <i class="fa fa-times fa-fw" title="Not automatically matched by Firefly"></i>
@endif
<!-- ACTIONS MENU -->
@@ -27,8 +27,8 @@
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" role="menu">
- <li><a href="{{route('bills.edit',$bill->id)}}"><span class="glyphicon glyphicon-pencil"></span> edit</a></li>
- <li><a href="{{route('bills.delete',$bill->id)}}"><span class="glyphicon glyphicon-trash"></span> delete</a></li>
+ <li><a href="{{route('bills.edit',$bill->id)}}"><i class="fa fa-fw fa-pencil"></i> edit</a></li>
+ <li><a href="{{route('bills.delete',$bill->id)}}"><i class="fa fa-fw fa-trash-o"></i> delete</a></li>
</ul>
</div>
</div>
diff --git a/resources/views/form/feedback.blade.php b/resources/views/form/feedback.blade.php
index d6f895fdf2..d3f62af36d 100644
--- a/resources/views/form/feedback.blade.php
+++ b/resources/views/form/feedback.blade.php
@@ -1,12 +1,4 @@
@if($errors->has($name))
- <span class="glyphicon glyphicon-remove form-control-feedback"></span>
+ <span class="form-control-feedback"><i class="fa fa-fw fa-remove"></i></span>
<p class="text-danger">{{{$errors->first($name)}}}</p>
-@endif
-@if(Session::has('warnings') && Session::get('warnings')->has($name))
- <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
- <p class="text-warning">{{{Session::get('warnings')->first($name)}}}</p>
-@endif
-@if(Session::has('successes') && Session::get('successes')->has($name))
- <span class="glyphicon glyphicon-ok form-control-feedback"></span>
- <p class="text-success">{{{Session::get('successes')->first($name)}}}</p>
@endif
\ No newline at end of file
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php
index 33da7dce45..7773963ef2 100644
--- a/resources/views/index.blade.php
+++ b/resources/views/index.blade.php
@@ -141,7 +141,7 @@
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="{{route('transactions.create','withdrawal')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-left fa-fw"></i> New withdrawal</a></li>
<li><a href="{{route('transactions.create','deposit')}}?account_id={{{$data[1]->id}}}"><i class="fa fa-long-arrow-right fa-fw"></i> New deposit</a></li>
- <li><a href="{{route('transactions.create','transfer')}}?account_from_id={{{$data[1]->id}}}"><i class="fa fa-arrows-h fa-fw"></i> New transfer</a></li>
+ <li><a href="{{route('transactions.create','transfer')}}?account_from_id={{{$data[1]->id}}}"><i class="fa fa-fw fa-exchange"></i> New transfer</a></li>
</ul>
</div>
</div>
diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php
index 0cc5ad377f..0e52f7df3b 100644
--- a/resources/views/layouts/default.blade.php
+++ b/resources/views/layouts/default.blade.php
@@ -15,11 +15,11 @@
@endif
</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,700,300italic" type="ext/css" media="all" />
+ <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/metisMenu.min.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/sb-admin-2.css" type="text/css" media="all" />
- <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css" media="all" />
<!-- date range -->
<link rel="stylesheet" href="css/daterangepicker-bs3.css" type="text/css" media="all" />
diff --git a/resources/views/list/accounts.blade.php b/resources/views/list/accounts.blade.php
index 3c21e58f79..c4348e456a 100644
--- a/resources/views/list/accounts.blade.php
+++ b/resources/views/list/accounts.blade.php
@@ -17,8 +17,8 @@
<tr>
<td>
<div class="btn-group btn-group-xs">
- <a class="btn btn-default btn-xs" href="{{route('accounts.edit',$account->id)}}"><span class="glyphicon glyphicon-pencil"></span></a>
- <a class="btn btn-danger btn-xs" href="{{route('accounts.delete',$account->id)}}"><span class="glyphicon glyphicon-trash"></span></a>
+ <a class="btn btn-default btn-xs" href="{{route('accounts.edit',$account->id)}}"><i class="fa fa-fw fa-pencil"></i></a>
+ <a class="btn btn-danger btn-xs" href="{{route('accounts.delete',$account->id)}}"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td><a href="{{route('accounts.show',$account->id)}}">{{{$account->name}}}</a></td>
diff --git a/resources/views/list/bills.blade.php b/resources/views/list/bills.blade.php
index af527ba53f..9b491ed391 100644
--- a/resources/views/list/bills.blade.php
+++ b/resources/views/list/bills.blade.php
@@ -14,8 +14,8 @@
<tr>
<td>
<div class="btn-group btn-group-xs">
- <a href="{{route('bills.edit',$entry->id)}}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
- <a href="{{route('bills.delete',$entry->id)}}" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span></a>
+ <a href="{{route('bills.edit',$entry->id)}}" class="btn btn-default btn-xs"><i class="fa fa-fw fa-pencil"></i></a>
+ <a href="{{route('bills.delete',$entry->id)}}" class="btn btn-danger btn-xs"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td>
diff --git a/resources/views/list/categories.blade.php b/resources/views/list/categories.blade.php
index e70c2788b7..c9fb5d2f4b 100644
--- a/resources/views/list/categories.blade.php
+++ b/resources/views/list/categories.blade.php
@@ -13,8 +13,8 @@
<tr>
<td>
<div class="btn-group btn-group-xs">
- <a href="{{route('categories.edit',$category->id)}}" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
- <a href="{{route('categories.delete',$category->id)}}" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash"></span></a>
+ <a href="{{route('categories.edit',$category->id)}}" class="btn btn-default btn-xs"><i class="fa fa-fw fa-pencil"></i></a>
+ <a href="{{route('categories.delete',$category->id)}}" class="btn btn-danger btn-xs"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td>
diff --git a/resources/views/list/journals-full.blade.php b/resources/views/list/journals-full.blade.php
index bc2608dbe7..93ae56cf16 100644
--- a/resources/views/list/journals-full.blade.php
+++ b/resources/views/list/journals-full.blade.php
@@ -24,7 +24,7 @@
<tr>
<td>
<div class="btn-group btn-group-xs">
- <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
+ <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td>&nbsp;</td>
@@ -35,8 +35,8 @@
<tr>
<td>
<div class="btn-group btn-group-xs">
- <a href="{{route('transactions.edit',$journal->id)}}" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-pencil"></span></a>
- <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span></a>
+ <a href="{{route('transactions.edit',$journal->id)}}" class="btn btn-xs btn-default"><i class="fa fa-fw fa-pencil"></i></a>
+ <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-xs btn-danger"><i class="fa fa-fw fa-trash-o"></i></a>
</div>
</td>
<td>
@@ -47,7 +47,7 @@
<span class="glyphicon glyphicon-arrow-right" title="Deposit"></span>
@endif
@if($journal->transactiontype->type == 'Transfer')
- <span class="glyphicon glyphicon-resize-full" title="Transfer"></span>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
@endif
@if($journal->transactiontype->type == 'Opening balance')
<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>
diff --git a/resources/views/list/journals-tiny.blade.php b/resources/views/list/journals-tiny.blade.php
index 8d90b43698..27a06b5256 100644
--- a/resources/views/list/journals-tiny.blade.php
+++ b/resources/views/list/journals-tiny.blade.php
@@ -10,7 +10,7 @@
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
@endif
@if($journal->transactiontype->type == 'Transfer')
- <i class="fa fa-arrows-h fa-fw" title="Transfer"></i>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
@endif
@else
@if($journal->type == 'Withdrawal')
@@ -20,7 +20,7 @@
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
@endif
@if($journal->type == 'Transfer')
- <i class="fa fa-arrows-h fa-fw" title="Transfer"></i>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
@endif
@endif
diff --git a/resources/views/partials/menu.blade.php b/resources/views/partials/menu.blade.php
index 278511b51c..81ad661a8c 100644
--- a/resources/views/partials/menu.blade.php
+++ b/resources/views/partials/menu.blade.php
@@ -141,7 +141,7 @@
<a @if($isDeposit)class="active"@endif href="{{route('transactions.index','deposit')}}"><i class="fa fa-long-arrow-right fa-fw"></i> Revenue / income</a>
</li>
<li>
- <a @if($isTransfer)class="active"@endif href="{{route('transactions.index','transfers')}}"><i class="fa fa-arrows-h fa-fw"></i> Transfers</a>
+ <a @if($isTransfer)class="active"@endif href="{{route('transactions.index','transfers')}}"><i class="fa fa-fw fa-exchange" title="Transfer"></i> Transfers</a>
</li>
</ul>
@@ -184,7 +184,7 @@
<a @if($isDeposit)class="active"@endif href="{{route('transactions.create','deposit')}}"><i class="fa fa-long-arrow-right fa-fw"></i> Deposit</a>
</li>
<li>
- <a @if($isTransfer)class="active"@endif href="{{route('transactions.create','transfer')}}"><i class="fa fa-arrows-h fa-fw"></i> Transfer</a>
+ <a @if($isTransfer)class="active"@endif href="{{route('transactions.create','transfer')}}"><i class="fa fa-fw fa-exchange" title="Transfer"></i> Transfer</a>
</li>
<li>
<a @if($isBill)class="active"@endif href="{{route('bills.create')}}"><i class="fa fa-calendar-o fa-fw"></i> Bill</a>
diff --git a/resources/views/related/alreadyRelated.blade.php b/resources/views/related/alreadyRelated.blade.php
index 619d785dc2..6fdc642501 100644
--- a/resources/views/related/alreadyRelated.blade.php
+++ b/resources/views/related/alreadyRelated.blade.php
@@ -2,7 +2,8 @@
<table class="table table-bordered table-striped table-condensed">
@foreach($journals as $journal)
<tr>
- <td><a title="Unlink" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn unrelate btn-xs btn-default" href="#"><span class="glyphicon glyphicon-resize-full"></span></a></td>
+ <td>
+ <a title="Unlink" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn unrelate btn-xs btn-default" href="#"><i class="fa fa-fw fa-expand"></i></a></td>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
@@ -11,7 +12,7 @@
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
@endif
@if($journal->transactiontype->type == 'Transfer')
- <i class="fa fa-arrows-h fa-fw" title="Transfer"></i>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
@endif
</td>
<td>{{$journal->date->format('jS M Y')}}</td>
diff --git a/resources/views/related/searchResult.blade.php b/resources/views/related/searchResult.blade.php
index 4ae8411c48..a3f9b54964 100644
--- a/resources/views/related/searchResult.blade.php
+++ b/resources/views/related/searchResult.blade.php
@@ -3,7 +3,7 @@
<table class="table table-bordered table-striped table-condensed">
@foreach($journals as $journal)
<tr>
- <td><a title="Link" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn relate btn-xs btn-default" href="#"><span class="glyphicon glyphicon-resize-small"></span></a></td>
+ <td><a title="Link" data-id="{{$journal->id}}" data-parent="{{$parent->id}}" class="btn relate btn-xs btn-default" href="#"><i class="fa fa-fw fa-expand"></i></a></td>
<td>
@if($journal->transactiontype->type == 'Withdrawal')
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
@@ -12,7 +12,7 @@
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
@endif
@if($journal->transactiontype->type == 'Transfer')
- <i class="fa fa-arrows-h fa-fw" title="Transfer"></i>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
@endif
</td>
<td>{{$journal->date->format('jS M Y')}}</td>
diff --git a/resources/views/reports/year.blade.php b/resources/views/reports/year.blade.php
index 8f4ae376da..f6c05e0dd2 100644
--- a/resources/views/reports/year.blade.php
+++ b/resources/views/reports/year.blade.php
@@ -77,7 +77,7 @@
<div class="panel panel-default">
<div class="panel-heading">
- <i class="fa fa-arrows-h fa-fw"></i>
+ <i class="fa fa-fw fa-exchange" title="Transfer"></i>
Income vs. expense
</div>
<?php
diff --git a/resources/views/transactions/show.blade.php b/resources/views/transactions/show.blade.php
index 723131d882..36bbc26312 100644
--- a/resources/views/transactions/show.blade.php
+++ b/resources/views/transactions/show.blade.php
@@ -145,7 +145,7 @@
<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>
+ <a class="btn btn-default" href="{{route('transactions.edit',$journal->id)}}"><i class="fa fa-fw fa-pencil"></i> Edit</a> <a href="{{route('transactions.delete',$journal->id)}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Delete</a>
</div>
</div>
</div>