mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Spelling errors fixed.
This commit is contained in:
@@ -86,7 +86,7 @@ class GoogleChartController extends BaseController
|
|||||||
|
|
||||||
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||||
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||||
$pref = $preferences->get('frontpageAccounts', []);
|
$pref = $preferences->get('frontPageAccounts', []);
|
||||||
|
|
||||||
/** @var \FireflyIII\Database\Account\Account $acct */
|
/** @var \FireflyIII\Database\Account\Account $acct */
|
||||||
$acct = App::make('FireflyIII\Database\Account\Account');
|
$acct = App::make('FireflyIII\Database\Account\Account');
|
||||||
|
@@ -39,7 +39,7 @@ class HomeController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
// get the preference for the home accounts to show:
|
// get the preference for the home accounts to show:
|
||||||
$frontpage = $preferences->get('frontpageAccounts', []);
|
$frontpage = $preferences->get('frontPageAccounts', []);
|
||||||
if ($frontpage->data == []) {
|
if ($frontpage->data == []) {
|
||||||
$accounts = $acct->getAssetAccounts();
|
$accounts = $acct->getAssetAccounts();
|
||||||
} else {
|
} else {
|
||||||
|
@@ -155,7 +155,7 @@ class PiggyBankController extends BaseController
|
|||||||
$accounts[$account->id] = [
|
$accounts[$account->id] = [
|
||||||
'name' => $account->name,
|
'name' => $account->name,
|
||||||
'balance' => Steam::balance($account),
|
'balance' => Steam::balance($account),
|
||||||
'leftForPiggybanks' => $this->_repository->leftOnAccount($account),
|
'leftForPiggyBanks' => $this->_repository->leftOnAccount($account),
|
||||||
'sumOfSaved' => $piggyBank->savedSoFar,
|
'sumOfSaved' => $piggyBank->savedSoFar,
|
||||||
'sumOfTargets' => floatval($piggyBank->targetamount),
|
'sumOfTargets' => floatval($piggyBank->targetamount),
|
||||||
'leftToSave' => $piggyBank->leftToSave
|
'leftToSave' => $piggyBank->leftToSave
|
||||||
|
@@ -32,11 +32,11 @@ class PreferencesController extends BaseController
|
|||||||
$accounts = $acct->getAssetAccounts();
|
$accounts = $acct->getAssetAccounts();
|
||||||
$viewRange = $preferences->get('viewRange', '1M');
|
$viewRange = $preferences->get('viewRange', '1M');
|
||||||
$viewRangeValue = $viewRange->data;
|
$viewRangeValue = $viewRange->data;
|
||||||
$frontPage = $preferences->get('frontpageAccounts', []);
|
$frontPage = $preferences->get('frontPageAccounts', []);
|
||||||
$budgetMax = $preferences->get('budgetMaximum', 1000);
|
$budgetMax = $preferences->get('budgetMaximum', 1000);
|
||||||
$budgetMaximum = $budgetMax->data;
|
$budgetMaximum = $budgetMax->data;
|
||||||
|
|
||||||
return View::make('preferences.index', compact('budgetMaximum'))->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with(
|
return View::make('preferences.index', compact('budgetMaximum'))->with('accounts', $accounts)->with('frontPageAccounts', $frontPage)->with(
|
||||||
'viewRange', $viewRangeValue
|
'viewRange', $viewRangeValue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -49,12 +49,12 @@ class PreferencesController extends BaseController
|
|||||||
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||||
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||||
|
|
||||||
// frontpage accounts
|
// front page accounts
|
||||||
$frontpageAccounts = [];
|
$frontPageAccounts = [];
|
||||||
foreach (Input::get('frontpageAccounts') as $id) {
|
foreach (Input::get('frontPageAccounts') as $id) {
|
||||||
$frontpageAccounts[] = intval($id);
|
$frontPageAccounts[] = intval($id);
|
||||||
}
|
}
|
||||||
$preferences->set('frontpageAccounts', $frontpageAccounts);
|
$preferences->set('frontPageAccounts', $frontPageAccounts);
|
||||||
|
|
||||||
// view range:
|
// view range:
|
||||||
$preferences->set('viewRange', Input::get('viewRange'));
|
$preferences->set('viewRange', Input::get('viewRange'));
|
||||||
|
@@ -31,7 +31,7 @@ class ReminderController extends BaseController
|
|||||||
throw new FireflyException('Cannot act on reminder for ' . get_class($reminder->remindersable));
|
throw new FireflyException('Cannot act on reminder for ' . get_class($reminder->remindersable));
|
||||||
break;
|
break;
|
||||||
break;
|
break;
|
||||||
case 'Piggybank':
|
case 'PiggyBank':
|
||||||
$amount = Reminders::amountForReminder($reminder);
|
$amount = Reminders::amountForReminder($reminder);
|
||||||
$preFilled = [
|
$preFilled = [
|
||||||
'amount' => round($amount, 2),
|
'amount' => round($amount, 2),
|
||||||
@@ -85,7 +85,7 @@ class ReminderController extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
$amount = null;
|
$amount = null;
|
||||||
if (get_class($reminder->remindersable) == 'Piggybank') {
|
if (get_class($reminder->remindersable) == 'PiggyBank') {
|
||||||
|
|
||||||
$amount = Reminders::amountForReminder($reminder);
|
$amount = Reminders::amountForReminder($reminder);
|
||||||
}
|
}
|
||||||
|
@@ -503,133 +503,5 @@ class ChangesForV321 extends Migration
|
|||||||
\DB::update('UPDATE `transaction_currencies` SET `symbol` = "€", `name` = "Euro" WHERE `code` = "EUR";');
|
\DB::update('UPDATE `transaction_currencies` SET `symbol` = "€", `name` = "Euro" WHERE `code` = "EUR";');
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// public function doRenameInLimitRepetitions()
|
|
||||||
// {
|
|
||||||
// Schema::table(
|
|
||||||
// 'limit_repetitions', function (Blueprint $table) {
|
|
||||||
// $table->renameColumn('limit_id', 'budget_limit_id');
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doBudgetLimits()
|
|
||||||
// {
|
|
||||||
// Schema::rename('limits', 'budget_limits');
|
|
||||||
// Schema::table(
|
|
||||||
// 'budget_limits', function (Blueprint $table) {
|
|
||||||
// $table->integer('budget_id')->unsigned()->after('updated_at');
|
|
||||||
// $table->foreign('budget_id', 'bid_foreign')->references('id')->on('budgets')->onDelete('cascade');
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doPiggyBankEvents()
|
|
||||||
// {
|
|
||||||
// Schema::rename('piggybank_events', 'piggy_bank_events');
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doCreateCategoryTables()
|
|
||||||
// {
|
|
||||||
// Schema::create(
|
|
||||||
// 'categories', function (Blueprint $table) {
|
|
||||||
// $table->increments('id');
|
|
||||||
// $table->timestamps();
|
|
||||||
// $table->softDeletes();
|
|
||||||
// $table->string('name', 50);
|
|
||||||
// $table->integer('user_id')->unsigned();
|
|
||||||
// $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
|
||||||
// $table->unique(['user_id', 'name']);
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// Schema::create(
|
|
||||||
// 'category_transaction_journal', function (Blueprint $table) {
|
|
||||||
// $table->increments('id');
|
|
||||||
// $table->integer('category_id')->unsigned();
|
|
||||||
// $table->integer('transaction_journal_id')->unsigned();
|
|
||||||
// $table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
|
|
||||||
// $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade');
|
|
||||||
// $table->unique(['category_id', 'transaction_journal_id'], 'catid_tjid_unique');
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doUpdateTransactionTable()
|
|
||||||
// {
|
|
||||||
// Schema::table(
|
|
||||||
// 'transactions', function (Blueprint $table) {
|
|
||||||
// $table->dropForeign('transactions_piggybank_id_foreign');
|
|
||||||
// #$table->dropIndex('transactions_piggybank_id_foreign');
|
|
||||||
// $table->dropColumn('piggybank_id');
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doDropCompRecurTable()
|
|
||||||
// {
|
|
||||||
// Schema::drop('component_recurring_transaction');
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doDropCompTransTable()
|
|
||||||
// {
|
|
||||||
// Schema::drop('component_transaction');
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doMoveBudgets()
|
|
||||||
// {
|
|
||||||
// Component::where('class', 'Budget')->get()->each(
|
|
||||||
// function (Component $c) {
|
|
||||||
// $entry = [
|
|
||||||
// 'user_id' => $c->user_id,
|
|
||||||
// 'name' => $c->name
|
|
||||||
//
|
|
||||||
// ];
|
|
||||||
// $budget = Budget::firstOrCreate($entry);
|
|
||||||
// Log::debug('Migrated budget #' . $budget->id . ': ' . $budget->name);
|
|
||||||
// // create entry in budget_transaction_journal
|
|
||||||
// $connections = DB::table('component_transaction_journal')->where('component_id', $c->id)->get();
|
|
||||||
// foreach ($connections as $connection) {
|
|
||||||
// DB::table('budget_transaction_journal')->insert(
|
|
||||||
// [
|
|
||||||
// 'budget_id' => $budget->id,
|
|
||||||
// 'transaction_journal_id' => $connection->transaction_journal_id
|
|
||||||
// ]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doMoveCategories()
|
|
||||||
// {
|
|
||||||
// Component::where('class', 'Category')->get()->each(
|
|
||||||
// function (Component $c) {
|
|
||||||
// $entry = [
|
|
||||||
// 'user_id' => $c->user_id,
|
|
||||||
// 'name' => $c->name
|
|
||||||
//
|
|
||||||
// ];
|
|
||||||
// $category = Category::firstOrCreate($entry);
|
|
||||||
// Log::debug('Migrated category #' . $category->id . ': ' . $category->name);
|
|
||||||
// // create entry in category_transaction_journal
|
|
||||||
// $connections = DB::table('component_transaction_journal')->where('component_id', $c->id)->get();
|
|
||||||
// foreach ($connections as $connection) {
|
|
||||||
// DB::table('category_transaction_journal')->insert(
|
|
||||||
// [
|
|
||||||
// 'category_id' => $category->id,
|
|
||||||
// 'transaction_journal_id' => $connection->transaction_journal_id
|
|
||||||
// ]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public function doMoveLimitReferences()
|
|
||||||
// {
|
|
||||||
// throw new \FireflyIII\Exception\FireflyException('TODO');
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ class Reminders
|
|||||||
|
|
||||||
switch (get_class($reminder->remindersable)) {
|
switch (get_class($reminder->remindersable)) {
|
||||||
|
|
||||||
case 'Piggybank':
|
case 'PiggyBank':
|
||||||
$start = new Carbon;
|
$start = new Carbon;
|
||||||
$end = !is_null($reminder->remindersable->targetdate) ? clone $reminder->remindersable->targetdate : new Carbon;
|
$end = !is_null($reminder->remindersable->targetdate) ? clone $reminder->remindersable->targetdate : new Carbon;
|
||||||
$reminders = 0;
|
$reminders = 0;
|
||||||
@@ -93,7 +93,7 @@ class Reminders
|
|||||||
$reminder->active = 1;
|
$reminder->active = 1;
|
||||||
$reminder->user()->associate(\Auth::getUser());
|
$reminder->user()->associate(\Auth::getUser());
|
||||||
$reminder->remindersable_id = $piggyBank->id;
|
$reminder->remindersable_id = $piggyBank->id;
|
||||||
$reminder->remindersable_type = 'Piggybank';
|
$reminder->remindersable_type = 'PiggyBank';
|
||||||
$reminder->save();
|
$reminder->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ class Transaction extends Eloquent
|
|||||||
*/
|
*/
|
||||||
public function piggyBank()
|
public function piggyBank()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('Piggybank');
|
return $this->belongsTo('PiggyBank');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -55,7 +55,7 @@ class User extends Eloquent implements UserInterface, RemindableInterface
|
|||||||
*/
|
*/
|
||||||
public function piggyBanks()
|
public function piggyBanks()
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough('Piggybank', 'Account');
|
return $this->hasManyThrough('PiggyBank', 'Account');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -91,7 +91,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{route('accounts.show',$id)}}">{{{$info['name']}}}</a></td>
|
<td><a href="{{route('accounts.show',$id)}}">{{{$info['name']}}}</a></td>
|
||||||
<td>{{mf($info['balance'])}}</td>
|
<td>{{mf($info['balance'])}}</td>
|
||||||
<td>{{mf($info['leftForPiggybanks'])}}</td>
|
<td>{{mf($info['leftForPiggyBanks'])}}</td>
|
||||||
<td>{{mf($info['sumOfTargets'])}}</td>
|
<td>{{mf($info['sumOfTargets'])}}</td>
|
||||||
<td>{{mf($info['sumOfSaved'])}}</td>
|
<td>{{mf($info['sumOfSaved'])}}</td>
|
||||||
<td>{{mf($info['leftToSave'])}}</td>
|
<td>{{mf($info['leftToSave'])}}</td>
|
||||||
|
@@ -17,10 +17,10 @@
|
|||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
@if(in_array($account->id,$frontpageAccounts->data) || count($frontpageAccounts->data) == 0)
|
@if(in_array($account->id,$frontPageAccounts->data) || count($frontPageAccounts->data) == 0)
|
||||||
<input type="checkbox" name="frontpageAccounts[]" value="{{$account->id}}" checked> {{{$account->name}}}
|
<input type="checkbox" name="frontPageAccounts[]" value="{{$account->id}}" checked> {{{$account->name}}}
|
||||||
@else
|
@else
|
||||||
<input type="checkbox" name="frontpageAccounts[]" value="{{$account->id}}"> {{{$account->name}}}
|
<input type="checkbox" name="frontPageAccounts[]" value="{{$account->id}}"> {{{$account->name}}}
|
||||||
@endif
|
@endif
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user