mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Cleaned up some icons, improved routine for repeated expenses.
This commit is contained in:
parent
1d6f6d28c9
commit
f50b133f2e
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@ db.sqlite-journal
|
|||||||
tests/_output/*
|
tests/_output/*
|
||||||
.env
|
.env
|
||||||
clover.xml
|
clover.xml
|
||||||
|
node_modules/
|
@ -210,42 +210,6 @@ class BillController extends Controller
|
|||||||
|
|
||||||
return Redirect::route('bills.index');
|
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']);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,7 @@ class RepeatedExpenseController extends Controller
|
|||||||
'reminder' => $request->get('reminder'),
|
'reminder' => $request->get('reminder'),
|
||||||
'skip' => intval($request->get('skip')),
|
'skip' => intval($request->get('skip')),
|
||||||
'rep_every' => intval($request->get('rep_every')),
|
'rep_every' => intval($request->get('rep_every')),
|
||||||
|
'rep_length' => $request->get('rep_length'),
|
||||||
'rep_times' => intval($request->get('rep_times')),
|
'rep_times' => intval($request->get('rep_times')),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ class Kernel extends HttpKernel
|
|||||||
'guest' => 'FireflyIII\Http\Middleware\RedirectIfAuthenticated',
|
'guest' => 'FireflyIII\Http\Middleware\RedirectIfAuthenticated',
|
||||||
'range' => 'FireflyIII\Http\Middleware\Range',
|
'range' => 'FireflyIII\Http\Middleware\Range',
|
||||||
'reminders' => 'FireflyIII\Http\Middleware\Reminders',
|
'reminders' => 'FireflyIII\Http\Middleware\Reminders',
|
||||||
|
'piggybanks' => 'FireflyIII\Http\Middleware\PiggyBanks',
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
141
app/Http/Middleware/PiggyBanks.php
Normal file
141
app/Http/Middleware/PiggyBanks.php
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -3,8 +3,10 @@
|
|||||||
namespace FireflyIII\Http\Requests;
|
namespace FireflyIII\Http\Requests;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use Input;
|
use Input;
|
||||||
|
use Navigation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PiggyBankFormRequest
|
* Class PiggyBankFormRequest
|
||||||
@ -36,8 +38,14 @@ class PiggyBankFormRequest extends Request
|
|||||||
|
|
||||||
if (intval(Input::get('repeats')) == 1) {
|
if (intval(Input::get('repeats')) == 1) {
|
||||||
$targetDateRule = 'required|date|after:' . date('Y-m-d');
|
$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 = [
|
$rules = [
|
||||||
'repeats' => 'required|boolean',
|
'repeats' => 'required|boolean',
|
||||||
'name' => $nameRule,
|
'name' => $nameRule,
|
||||||
|
@ -156,7 +156,7 @@ Route::controllers(
|
|||||||
* Home Controller
|
* Home Controller
|
||||||
*/
|
*/
|
||||||
Route::group(
|
Route::group(
|
||||||
['middleware' => ['auth', 'range', 'reminders']], function () {
|
['middleware' => ['auth', 'range', 'reminders','piggybanks']], function () {
|
||||||
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
|
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
|
||||||
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
|
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
|
||||||
Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']);
|
Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']);
|
||||||
|
@ -14,7 +14,9 @@ class PiggyBank extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
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
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
@ -24,15 +26,6 @@ class PiggyBank extends Model
|
|||||||
return $this->belongsTo('FireflyIII\Models\Account');
|
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
|
* Grabs the PiggyBankRepetition that's currently relevant / active
|
||||||
*
|
*
|
||||||
@ -40,10 +33,10 @@ class PiggyBank extends Model
|
|||||||
*/
|
*/
|
||||||
public function currentRelevantRep()
|
public function currentRelevantRep()
|
||||||
{
|
{
|
||||||
if ($this->currentRep) {
|
if (!is_null($this->currentRep)) {
|
||||||
return $this->currentRep;
|
return $this->currentRep;
|
||||||
}
|
}
|
||||||
if ($this->repeats == 0) {
|
if (intval($this->repeats) === 0) {
|
||||||
$rep = $this->piggyBankRepetitions()->first(['piggy_bank_repetitions.*']);
|
$rep = $this->piggyBankRepetitions()->first(['piggy_bank_repetitions.*']);
|
||||||
$this->currentRep = $rep;
|
$this->currentRep = $rep;
|
||||||
|
|
||||||
@ -104,6 +97,16 @@ class PiggyBank extends Model
|
|||||||
return ['created_at', 'updated_at', 'deleted_at', 'startdate', 'targetdate'];
|
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
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
*/
|
*/
|
||||||
|
@ -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'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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(
|
PiggyBank::created(
|
||||||
function (PiggyBank $piggyBank) {
|
function (PiggyBank $piggyBank) {
|
||||||
$repetition = new PiggyBankRepetition;
|
$repetition = new PiggyBankRepetition;
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Support;
|
namespace FireflyIII\Support;
|
||||||
|
|
||||||
|
use Amount as Amt;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\MessageBag;
|
use Illuminate\Support\MessageBag;
|
||||||
use Input;
|
use Input;
|
||||||
use Session;
|
use Session;
|
||||||
use View;
|
use View;
|
||||||
use Amount as Amt;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ExpandedForm
|
* Class ExpandedForm
|
||||||
@ -96,24 +96,14 @@ class ExpandedForm
|
|||||||
public function getHolderClasses($name)
|
public function getHolderClasses($name)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Get errors, warnings and successes from session:
|
* Get errors from session:
|
||||||
*/
|
*/
|
||||||
/** @var MessageBag $errors */
|
/** @var MessageBag $errors */
|
||||||
$errors = Session::get('errors');
|
$errors = Session::get('errors');
|
||||||
|
$classes = 'form-group';
|
||||||
|
|
||||||
/** @var MessageBag $successes */
|
if (!is_null($errors) && $errors->has($name)) {
|
||||||
$successes = Session::get('successes');
|
$classes = 'form-group has-error has-feedback';
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $classes;
|
return $classes;
|
||||||
|
@ -116,9 +116,9 @@ class TestDataSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function createUsers()
|
public function createUsers()
|
||||||
{
|
{
|
||||||
User::create(['email' => 'reset@example.com', 'password' => 'functional', 'reset' => 'okokokokokokokokokokokokokokokok', 'remember_token' => null]);
|
User::create(['email' => 'reset@example.com', 'password' => bcrypt('functional'), 'reset' => 'okokokokokokokokokokokokokokokok', 'remember_token' => null]);
|
||||||
User::create(['email' => 'functional@example.com', 'password' => 'functional', 'reset' => null, 'remember_token' => null]);
|
User::create(['email' => 'functional@example.com', 'password' => bcrypt('functional'), 'reset' => null, 'remember_token' => null]);
|
||||||
User::create(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james', 'reset' => null, 'remember_token' => null]);
|
User::create(['email' => 'thegrumpydictator@gmail.com', 'password' => bcrypt('james'), 'reset' => null, 'remember_token' => null]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
<i class="fa fa-rotate-right"></i> {{{$bill->name}}}
|
<i class="fa fa-rotate-right"></i> {{{$bill->name}}}
|
||||||
|
|
||||||
@if($bill->active)
|
@if($bill->active)
|
||||||
<span class="glyphicon glyphicon-ok" title="Active"></span>
|
<i class="fa fa-check fa-fw" title="Active"></i>
|
||||||
@else
|
@else
|
||||||
<span class="glyphicon glyphicon-remove" title="Inactive"></span>
|
<i class="fa fa-times fa-fw" title="Inactive"></i>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($bill->automatch)
|
@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
|
@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
|
@endif
|
||||||
|
|
||||||
<!-- ACTIONS MENU -->
|
<!-- ACTIONS MENU -->
|
||||||
@ -27,8 +27,8 @@
|
|||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right" role="menu">
|
<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.edit',$bill->id)}}"><i class="fa fa-fw fa-pencil"></i> 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.delete',$bill->id)}}"><i class="fa fa-fw fa-trash-o"></i> delete</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
@if($errors->has($name))
|
@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>
|
<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
|
@endif
|
@ -141,7 +141,7 @@
|
|||||||
<ul class="dropdown-menu pull-right" role="menu">
|
<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','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','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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
@endif
|
@endif
|
||||||
</title>
|
</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,700,300italic" type="ext/css" media="all" />
|
<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.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="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/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="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 -->
|
<!-- date range -->
|
||||||
<link rel="stylesheet" href="css/daterangepicker-bs3.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="css/daterangepicker-bs3.css" type="text/css" media="all" />
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<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-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)}}"><span class="glyphicon glyphicon-trash"></span></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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="{{route('accounts.show',$account->id)}}">{{{$account->name}}}</a></td>
|
<td><a href="{{route('accounts.show',$account->id)}}">{{{$account->name}}}</a></td>
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<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.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"><span class="glyphicon glyphicon-trash"></span></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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<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.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"><span class="glyphicon glyphicon-trash"></span></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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group btn-group-xs">
|
<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.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"><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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<span class="glyphicon glyphicon-arrow-right" title="Deposit"></span>
|
<span class="glyphicon glyphicon-arrow-right" title="Deposit"></span>
|
||||||
@endif
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Transfer')
|
@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
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Opening balance')
|
@if($journal->transactiontype->type == 'Opening balance')
|
||||||
<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>
|
<span class="glyphicon glyphicon-ban-circle" title="Opening balance"></span>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
||||||
@endif
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Transfer')
|
@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
|
@endif
|
||||||
@else
|
@else
|
||||||
@if($journal->type == 'Withdrawal')
|
@if($journal->type == 'Withdrawal')
|
||||||
@ -20,7 +20,7 @@
|
|||||||
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
||||||
@endif
|
@endif
|
||||||
@if($journal->type == 'Transfer')
|
@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
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -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>
|
<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>
|
||||||
<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>
|
</li>
|
||||||
</ul>
|
</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>
|
<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>
|
||||||
<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>
|
||||||
<li>
|
<li>
|
||||||
<a @if($isBill)class="active"@endif href="{{route('bills.create')}}"><i class="fa fa-calendar-o fa-fw"></i> Bill</a>
|
<a @if($isBill)class="active"@endif href="{{route('bills.create')}}"><i class="fa fa-calendar-o fa-fw"></i> Bill</a>
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
<table class="table table-bordered table-striped table-condensed">
|
<table class="table table-bordered table-striped table-condensed">
|
||||||
@foreach($journals as $journal)
|
@foreach($journals as $journal)
|
||||||
<tr>
|
<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>
|
<td>
|
||||||
@if($journal->transactiontype->type == 'Withdrawal')
|
@if($journal->transactiontype->type == 'Withdrawal')
|
||||||
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
|
<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>
|
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
||||||
@endif
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Transfer')
|
@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
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>{{$journal->date->format('jS M Y')}}</td>
|
<td>{{$journal->date->format('jS M Y')}}</td>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<table class="table table-bordered table-striped table-condensed">
|
<table class="table table-bordered table-striped table-condensed">
|
||||||
@foreach($journals as $journal)
|
@foreach($journals as $journal)
|
||||||
<tr>
|
<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>
|
<td>
|
||||||
@if($journal->transactiontype->type == 'Withdrawal')
|
@if($journal->transactiontype->type == 'Withdrawal')
|
||||||
<i class="fa fa-long-arrow-left fa-fw" title="Withdrawal"></i>
|
<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>
|
<i class="fa fa-long-arrow-right fa-fw" title="Deposit"></i>
|
||||||
@endif
|
@endif
|
||||||
@if($journal->transactiontype->type == 'Transfer')
|
@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
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>{{$journal->date->format('jS M Y')}}</td>
|
<td>{{$journal->date->format('jS M Y')}}</td>
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<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
|
Income vs. expense
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||||
<div class="btn-group">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user