Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Code cleanup for scrutinizer.
James Colef7b1168e7cbc
diff --git a/app/Export/Entry/Entry.php b/app/Export/Entry/Entry.phpindex c61dfe6cb8..b9b73ac463 100644--- a/app/Export/Entry/Entry.php+++ b/app/Export/Entry/Entry.php@@ -105,7 +105,7 @@ final class Entry** @return Entry*/- public static function fromTransaction(Transaction $transaction): self+ public static function fromTransaction(Transaction $transaction): Entry{$entry = new self();$entry->journal_id = $transaction->journal_id;diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.phpindex 4219a13068..33621ad862 100644--- a/app/Helpers/Collector/JournalCollector.php+++ b/app/Helpers/Collector/JournalCollector.php@@ -168,8 +168,8 @@ class JournalCollector implements JournalCollectorInterface$q1->where(function (EloquentBuilder $q2) use ($amount) {// amount < 0 and .amount > -$amount- $amount = bcmul($amount, '-1');- $q2->where('transactions.amount', '<', 0)->where('transactions.amount', '>', $amount);+ $invertedAmount = bcmul($amount, '-1');+ $q2->where('transactions.amount', '<', 0)->where('transactions.amount', '>', $invertedAmount);})->orWhere(@@ -196,8 +196,8 @@ class JournalCollector implements JournalCollectorInterface$q1->where(function (EloquentBuilder $q2) use ($amount) {// amount < 0 and .amount < -$amount- $amount = bcmul($amount, '-1');- $q2->where('transactions.amount', '<', 0)->where('transactions.amount', '<', $amount);+ $invertedAmount = bcmul($amount, '-1');+ $q2->where('transactions.amount', '<', 0)->where('transactions.amount', '<', $invertedAmount);})->orWhere(diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.phpindex cd5f5aa58a..829915e5ef 100644--- a/app/Http/Controllers/Auth/LoginController.php+++ b/app/Http/Controllers/Auth/LoginController.php@@ -74,9 +74,9 @@ class LoginController extends Controller/*** Handle a login request to the application.*- * @param \Illuminate\Http\Request $request+ * @param Request $request*- * @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Http\JsonResponse+ * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response|void*/public function login(Request $request){@@ -109,9 +109,10 @@ class LoginController extends Controller/*** Log the user out of the application.*- * @param \Illuminate\Http\Request $request+ * @param Request $request+ * @param CookieJar $cookieJar*- * @return \Illuminate\Http\Response+ * @return $this*/public function logout(Request $request, CookieJar $cookieJar){@@ -127,11 +128,10 @@ class LoginController extends Controller* Show the application's login form.** @param Request $request- * @param CookieJar $cookieJar*- * @return \Illuminate\Http\Response+ * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View*/- public function showLoginForm(Request $request, CookieJar $cookieJar)+ public function showLoginForm(Request $request){// check for presence of tables:$hasTable = Schema::hasTable('users');@@ -166,6 +166,6 @@ class LoginController extends Controller$email = $request->old('email');$remember = $request->old('remember');- return view('auth.login', compact('allowRegistration', 'email', 'remember')); //->withCookie($cookie);+ return view('auth.login', compact('allowRegistration', 'email', 'remember'));}}diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.phpindex a4a6866fe1..019d95a7f3 100644--- a/app/Http/Controllers/BudgetController.php+++ b/app/Http/Controllers/BudgetController.php@@ -85,7 +85,7 @@ class BudgetController extends Controller$start = Carbon::createFromFormat('Y-m-d', $request->get('start'));$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));$budgetLimit = $this->repository->updateLimitAmount($budget, $start, $end, $amount);- if (0 === $amount) {+ if (bccomp($amount,'0') === 0) {$budgetLimit = null;}diff --git a/app/Http/Controllers/Import/BankController.php b/app/Http/Controllers/Import/BankController.phpindex 2fbefc0d7b..9358481970 100644--- a/app/Http/Controllers/Import/BankController.php+++ b/app/Http/Controllers/Import/BankController.php@@ -88,6 +88,7 @@ class BankController extends Controller$remoteAccounts = array_keys($remoteAccounts);$class = config(sprintf('firefly.import_pre.%s', $bank));// get import file+ unset($remoteAccounts, $class);// get import config}diff --git a/app/Http/Controllers/Json/TransactionController.php b/app/Http/Controllers/Json/TransactionController.phpdeleted file mode 100644index f9292661cc..0000000000--- a/app/Http/Controllers/Json/TransactionController.php+++ /dev/null@@ -1,90 +0,0 @@-<?php-/**- * TransactionController.php- * Copyright (c) 2017 [email protected]- *- * This file is part of Firefly III.- *- * Firefly III is free software: you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation, either version 3 of the License, or- * (at your option) any later version.- *- * Firefly III is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.- */-declare(strict_types=1);--namespace FireflyIII\Http\Controllers\Json;--use FireflyIII\Http\Controllers\Controller;-use FireflyIII\Models\TransactionType;-use FireflyIII\Repositories\Journal\JournalRepositoryInterface;-use FireflyIII\Support\SingleCacheProperties;-use Illuminate\Http\Request;-use Response;--class TransactionController extends Controller-{- public function amounts(Request $request, JournalRepositoryInterface $repository)- {- $ids = $request->get('transactions');-- $cache = new SingleCacheProperties;- $cache->addProperty('json-reconcile-amounts');- $cache->addProperty($ids);- if ($cache->has()) {- return Response::json($cache->get());- }-- $totals = [];- // for each transaction, get amount(s)- foreach ($ids as $transactionId) {- $transaction = $repository->findTransaction(intval($transactionId));- $transactionType = $transaction->transactionJournal->transactionType->type;-- // default amount:- $currencyId = $transaction->transaction_currency_id;- if (!isset($totals[$currencyId])) {- $totals[$currencyId] = [- 'amount' => '0',- 'currency' => $transaction->transactionCurrency,- 'type' => $transactionType,- ];- }- // add default amount:- $totals[$currencyId]['amount'] = bcadd($totals[$currencyId]['amount'], app('steam')->positive($transaction->amount));-- // foreign amount:- if (null !== $transaction->foreign_amount) {- $currencyId = $transaction->foreign_currency_id;- if (!isset($totals[$currencyId])) {- $totals[$currencyId] = [- 'amount' => '0',- 'currency' => $transaction->foreignCurrency,- 'type' => $transactionType,- ];- }- // add foreign amount:- $totals[$currencyId]['amount'] = bcadd($totals[$currencyId]['amount'], app('steam')->positive($transaction->foreign_amount));- }- }- $entries = [];- foreach ($totals as $entry) {- $amount = $entry['amount'];- if (TransactionType::WITHDRAWAL === $entry['type']) {- $amount = bcmul($entry['amount'], '-1');- }- $entries[] = app('amount')->formatAnything($entry['currency'], $amount, false);- }- $result = ['amounts' => join(' / ', $entries)];- $cache->store($result);-- return Response::json($result);- }-}diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex 95d9fe440c..959b46b342 100644--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -34,6 +34,7 @@ use FireflyIII\Models\Preference;use FireflyIII\Repositories\User\UserRepositoryInterface;use FireflyIII\User;use Hash;+use Illuminate\Contracts\Auth\Guard;use Log;use Preferences;use Session;@@ -41,6 +42,8 @@ use View;/*** Class ProfileController.+ *+ * @method Guard guard()*/class ProfileController extends Controller{diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.phpindex 48cf6e9159..aebb061620 100644--- a/app/Http/Controllers/SearchController.php+++ b/app/Http/Controllers/SearchController.php@@ -25,6 +25,7 @@ namespace FireflyIII\Http\Controllers;use FireflyIII\Support\CacheProperties;use FireflyIII\Support\Search\SearchInterface;use Illuminate\Http\Request;+use Illuminate\Support\Collection;use Response;use View;@@ -70,8 +71,8 @@ class SearchController extends Controllerpublic function search(Request $request, SearchInterface $searcher){- $fullQuery = strval($request->get('query'));-+ $fullQuery = strval($request->get('query'));+ $transactions = new Collection;// cache$cache = new CacheProperties;$cache->addProperty('search');diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.phpindex ca4f85e350..866924014a 100644--- a/app/Http/Controllers/Transaction/LinkController.php+++ b/app/Http/Controllers/Transaction/LinkController.php@@ -143,7 +143,7 @@ class LinkController extends Controller** @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector*/- public function switch(LinkTypeRepositoryInterface $repository, TransactionJournalLink $link)+ public function switchLink(LinkTypeRepositoryInterface $repository, TransactionJournalLink $link){$repository->switchLink($link);diff --git a/app/Http/Middleware/StartFireflySession.php b/app/Http/Middleware/StartFireflySession.phpindex 2653c10f0f..1d9ee97647 100644--- a/app/Http/Middleware/StartFireflySession.php+++ b/app/Http/Middleware/StartFireflySession.php@@ -31,19 +31,6 @@ use Illuminate\Session\Middleware\StartSession;*/class StartFireflySession extends StartSession{- /**- * Handle an incoming request.- *- * @param \Illuminate\Http\Request $request- * @param Closure $next- *- * @return mixed- */- // public function handle($request, Closure $next)- // {- // return parent::handle($request, $next); // defer to the right stuff- // }-/*** Store the current URL for the request if necessary.*diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.phpindex 68e8599322..62ef14a3f3 100644--- a/app/Http/Middleware/TrustProxies.php+++ b/app/Http/Middleware/TrustProxies.php@@ -53,7 +53,7 @@ class TrustProxies extends Middleware/*** The trusted proxies for this application.*- * @var array+ * @var array|string*/protected $proxies;diff --git a/app/Models/Account.php b/app/Models/Account.phpindex f076c42aec..50c6ec7618 100644--- a/app/Models/Account.php+++ b/app/Models/Account.php@@ -115,7 +115,7 @@ class Account extends Model** @return Account*/- public static function routeBinder(self $value)+ public static function routeBinder(Account $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/Attachment.php b/app/Models/Attachment.phpindex 47075945dc..00ea1c5e89 100644--- a/app/Models/Attachment.php+++ b/app/Models/Attachment.php@@ -56,7 +56,7 @@ class Attachment extends Model** @return Attachment*/- public static function routeBinder(self $value)+ public static function routeBinder(Attachment $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/Bill.php b/app/Models/Bill.phpindex 2154088715..866bfbf4d3 100644--- a/app/Models/Bill.php+++ b/app/Models/Bill.php@@ -64,7 +64,7 @@ class Bill extends Model** @return Bill*/- public static function routeBinder(self $value)+ public static function routeBinder(Bill $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/Budget.php b/app/Models/Budget.phpindex ccc9774480..d319d2aa2b 100644--- a/app/Models/Budget.php+++ b/app/Models/Budget.php@@ -88,7 +88,7 @@ class Budget extends Model** @return Budget*/- public static function routeBinder(self $value)+ public static function routeBinder(Budget $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/Category.php b/app/Models/Category.phpindex 1edc7f8432..d72cd168e2 100644--- a/app/Models/Category.php+++ b/app/Models/Category.php@@ -87,7 +87,7 @@ class Category extends Model** @return Category*/- public static function routeBinder(self $value)+ public static function routeBinder(Category $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.phpindex ebb5f74887..b3a4e1fe90 100644--- a/app/Models/PiggyBank.php+++ b/app/Models/PiggyBank.php@@ -65,7 +65,7 @@ class PiggyBank extends Model** @return PiggyBank*/- public static function routeBinder(self $value)+ public static function routeBinder(PiggyBank $value){if (auth()->check()) {if (intval($value->account->user_id) === auth()->user()->id) {diff --git a/app/Models/Rule.php b/app/Models/Rule.phpindex 6e2101b1d4..4a37c9ab3d 100644--- a/app/Models/Rule.php+++ b/app/Models/Rule.php@@ -53,7 +53,7 @@ class Rule extends Model** @return Rule*/- public static function routeBinder(self $value)+ public static function routeBinder(Rule $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.phpindex e022f486d1..33c98ed0b1 100644--- a/app/Models/RuleGroup.php+++ b/app/Models/RuleGroup.php@@ -53,7 +53,7 @@ class RuleGroup extends Model** @return RuleGroup*/- public static function routeBinder(self $value)+ public static function routeBinder(RuleGroup $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Models/Tag.php b/app/Models/Tag.phpindex ff4b2dba32..555284408c 100644--- a/app/Models/Tag.php+++ b/app/Models/Tag.php@@ -91,7 +91,7 @@ class Tag extends Model** @return Tag*/- public static function routeBinder(self $value)+ public static function routeBinder(Tag $value){if (auth()->check()) {if (intval($value->user_id) === auth()->user()->id) {diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.phpindex 6910dad202..42ed53b3ce 100644--- a/app/Repositories/Account/FindAccountsTrait.php+++ b/app/Repositories/Account/FindAccountsTrait.php@@ -257,4 +257,11 @@ trait FindAccountsTraitreturn $account;}++ /**+ * @param array $data+ *+ * @return Account+ */+ abstract protected function storeAccount(array $data): Account;}diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex f51f3b5fd4..3bce70f739 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -487,7 +487,7 @@ class BillRepository implements BillRepositoryInterface$wordMatch = $this->doWordMatch($matches, $description);$amountMatch = $this->doAmountMatch($journal->amountPositive(), $bill->amount_min, $bill->amount_max);- // If both, update!+ // when both, update!if ($wordMatch && $amountMatch) {$journal->bill()->associate($bill);$journal->save();diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.phpindex 473c363512..5f41cbfd23 100644--- a/app/Repositories/Budget/BudgetRepositoryInterface.php+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php@@ -210,7 +210,7 @@ interface BudgetRepositoryInterface* @param Budget $budget* @param Carbon $start* @param Carbon $end- * @param int $amount+ * @param string $amount** @return BudgetLimit*/diff --git a/app/Services/Bunq/Object/NotificationFilter.php b/app/Services/Bunq/Object/NotificationFilter.phpindex aedc952109..ffcf92362c 100644--- a/app/Services/Bunq/Object/NotificationFilter.php+++ b/app/Services/Bunq/Object/NotificationFilter.php@@ -34,5 +34,6 @@ class NotificationFilter extends BunqObject*/public function __construct(array $data){+ unset($data);}}diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.phpindex f51541cf6a..20f0e4bbfe 100644--- a/app/Services/Currency/FixerIO.php+++ b/app/Services/Currency/FixerIO.php@@ -42,7 +42,6 @@ class FixerIO implements ExchangeRateInterface{$uri = sprintf('https://api.fixer.io/%s?base=%s&symbols=%s', $date->format('Y-m-d'), $fromCurrency->code, $toCurrency->code);$statusCode = -1;- $body = '';try {$result = Requests::get($uri);$statusCode = $result->status_code;diff --git a/app/Support/Navigation.php b/app/Support/Navigation.phpindex 402a48a666..158cdc16ab 100644--- a/app/Support/Navigation.php+++ b/app/Support/Navigation.php@@ -238,8 +238,6 @@ class Navigation'1W' => trans('config.week_in_year'),'week' => trans('config.week_in_year'),'weekly' => trans('config.week_in_year'),- //'3M' => trans('config.quarter_of_year'),- //'quarter' => trans('config.quarter_of_year'),'1M' => trans('config.month'),'month' => trans('config.month'),'monthly' => trans('config.month'),diff --git a/app/Support/Twig/Extension/TransactionJournal.php b/app/Support/Twig/Extension/TransactionJournal.phpindex 5f96804ff9..66affea81b 100644--- a/app/Support/Twig/Extension/TransactionJournal.php+++ b/app/Support/Twig/Extension/TransactionJournal.php@@ -22,7 +22,7 @@ declare(strict_types=1);namespace FireflyIII\Support\Twig\Extension;-use FireflyIII\Models\Transaction;+use FireflyIII\Models\Transaction as TransactionModel;use FireflyIII\Models\TransactionJournal as JournalModel;use FireflyIII\Models\TransactionType;use FireflyIII\Support\SingleCacheProperties;@@ -48,7 +48,7 @@ class TransactionJournal extends Twig_Extension$transactions = $journal->transactions()->where('amount', '>', 0)->get();$totals = [];$type = $journal->transactionType->type;- /** @var Transaction $transaction */+ /** @var TransactionModel $transaction */foreach ($transactions as $transaction) {$currencyId = $transaction->transaction_currency_id;$currency = $transaction->transactionCurrency;diff --git a/public/js/ff/accounts/reconcile.js b/public/js/ff/accounts/reconcile.jsindex a79764614f..6609efd287 100644--- a/public/js/ff/accounts/reconcile.js+++ b/public/js/ff/accounts/reconcile.js@@ -18,6 +18,8 @@* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/+/** global: overviewUri, transactionsUri, indexUri,accounting */+var balanceDifference = 0;var difference = 0;var selectedAmount = 0;@@ -101,14 +103,11 @@ function storeReconcile() {function checkReconciledBox(e) {var el = $(e.target);var amount = parseFloat(el.val());- console.log('Amount is ' + amount);// if checked, add to selected amountif (el.prop('checked') === true && el.data('younger') === false) {- console.log("Sum is: " + selectedAmount + " - " + amount + " = " + (selectedAmount - amount));selectedAmount = selectedAmount - amount;}if (el.prop('checked') === false && el.data('younger') === false) {- console.log("Sum is: " + selectedAmount + " + " + amount + " = " + (selectedAmount + amount));selectedAmount = selectedAmount + amount;}difference = balanceDifference - selectedAmount;diff --git a/public/js/ff/budgets/index.js b/public/js/ff/budgets/index.jsindex 7683f944cd..0fc5f64cc6 100644--- a/public/js/ff/budgets/index.js+++ b/public/js/ff/budgets/index.js@@ -18,8 +18,7 @@* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */-+/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting *//****/@@ -150,9 +149,6 @@ function updateBudgetedAmounts(e) {link.attr('href', 'budgets/show/' + id + '/' + data.limit);}});--- return;}/**diff --git a/public/js/ff/charts.js b/public/js/ff/charts.jsindex 03b8189cb9..d69efc3f66 100644--- a/public/js/ff/charts.js+++ b/public/js/ff/charts.js@@ -17,7 +17,7 @@* You should have received a copy of the GNU General Public License* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart */+/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart, todayText */var allCharts = {};@@ -131,7 +131,6 @@ function lineChart(URI, container) {function lineChartWithDay(URI, container, today) {"use strict";- console.log('in lineChartWithDay');var colorData = true;var options = $.extend(true, {}, defaultChartOptions);var chartType = 'line';@@ -342,7 +341,6 @@ function drawAChart(URI, container, chartType, options, colorData, today) {};if (today >= 0) {chartOpts.lineAtIndex.push(today - 1);- console.log('push opt');}allCharts[container] = new Chart(ctx, chartOpts);}diff --git a/public/js/ff/firefly.js b/public/js/ff/firefly.jsindex c852f35bf4..855ccff7d3 100644--- a/public/js/ff/firefly.js+++ b/public/js/ff/firefly.js@@ -17,7 +17,7 @@* You should have received a copy of the GNU General Public License* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: moment, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */+/** global: moment, token, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */$(function () {diff --git a/public/js/ff/index.js b/public/js/ff/index.jsindex 114ce5315a..1d9ac6739d 100644--- a/public/js/ff/index.js+++ b/public/js/ff/index.js@@ -18,7 +18,7 @@* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: accountFrontpageUri, token, billCount, accountExpenseUri, accountRevenueUri */+/** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */$(function () {"use strict";diff --git a/public/js/ff/intro/intro.js b/public/js/ff/intro/intro.jsindex 582f92251f..65cd7cf005 100644--- a/public/js/ff/intro/intro.js+++ b/public/js/ff/intro/intro.js@@ -18,7 +18,7 @@* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: routeForTour, routeStepsUri, routeForFinishedTour, forceDemoOff */+/** global: routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */$(function () {"use strict";diff --git a/public/js/ff/tags/show.js b/public/js/ff/tags/show.jsindex 07e0abbf7d..d51d3ef920 100644--- a/public/js/ff/tags/show.js+++ b/public/js/ff/tags/show.js@@ -18,7 +18,7 @@* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.*/-/** global: zoomLevel, latitude, longitude, google, doPlaceMarker */+/** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker *//*Some vars as prep for the map:diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.jsindex eb5a8f0acf..8d6b67152c 100644--- a/public/js/ff/transactions/list.js+++ b/public/js/ff/transactions/list.js@@ -156,29 +156,6 @@ function countChecked() {}}-function getAmounts() {- $('.mass_reconcile span').html(reconcile_selected_txt + ' (<i class="fa fa-spinner fa-spin "></i>)');- var checked = $('.select_all_single:checked');- var ids = [];- $.each(checked, function (i, v) {- ids.push(parseInt($(v).data('transaction')));- });-- // go to specially crafted URL:- var bases = document.getElementsByTagName('base');- var baseHref = null;-- if (bases.length > 0) {- baseHref = bases[0].href;- }-- $.getJSON(baseHref + 'json/transactions/amount', {transactions: ids}).done(function (data) {- $('.mass_reconcile span').text(reconcile_selected_txt + ' (' + data.amounts + ')');- console.log(data);- });- return;-}-/****/diff --git a/routes/web.php b/routes/web.phpindex dc9e6e30f2..86b29cb942 100755--- a/routes/web.php+++ b/routes/web.php@@ -473,9 +473,6 @@ Route::group(// frontpageRoute::get('frontpage/piggy-banks', ['uses' => 'Json\FrontpageController@piggyBanks', 'as' => 'fp.piggy-banks']);- // amount reconciliation- Route::get('transactions/amount', ['uses' => 'Json\TransactionController@amounts', 'as' => 'transactions.amounts']);-// currency conversion:Route::get('rate/{fromCurrencyCode}/{toCurrencyCode}/{date}', ['uses' => 'Json\ExchangeController@getRate', 'as' => 'rate']);@@ -774,7 +771,7 @@ Route::group(Route::post('store/{tj}', ['uses' => 'LinkController@store', 'as' => 'store']);Route::get('delete/{journalLink}', ['uses' => 'LinkController@delete', 'as' => 'delete']);- Route::get('switch/{journalLink}', ['uses' => 'LinkController@switch', 'as' => 'switch']);+ Route::get('switch/{journalLink}', ['uses' => 'LinkController@switchLink', 'as' => 'switch']);Route::post('destroy/{journalLink}', ['uses' => 'LinkController@destroy', 'as' => 'destroy']);}