Merge branch 'release/5.3.0-beta.1' into main

This commit is contained in:
James Cole 2020-06-28 09:25:30 +02:00
commit bc5b2085b9
179 changed files with 960 additions and 1463 deletions

View File

@ -10,7 +10,7 @@ APP_DEBUG=false
SITE_OWNER=mail@example.com
# The encryption key for your sessions. Keep this very secure.
# If you generate a new one existing data must be considered LOST.
# If you generate a new one all existing attachments must be considered LOST.
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
APP_KEY=SomeRandomStringOf32CharsExactly
@ -108,8 +108,8 @@ COOKIE_SECURE=false
# If you want Firefly III to mail you, update these settings
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
MAIL_DRIVER=log
MAIL_HOST=smtp.mailtrap.io
MAIL_MAILER=log
MAIL_HOST=null
MAIL_PORT=2525
MAIL_FROM=changeme@example.com
MAIL_USERNAME=null
@ -304,7 +304,6 @@ PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
USE_ENCRYPTION=false
IS_SANDSTORM=false
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1

View File

@ -50,8 +50,9 @@ use League\Fractal\Resource\Item;
class AccountController extends Controller
{
use AccountFilter, TransactionFilter;
/** @var AccountRepositoryInterface The account repository */
private $repository;
private AccountRepositoryInterface $repository;
public const RESOURCE_KEY = 'accounts';
/**
* AccountController constructor.
@ -150,7 +151,7 @@ class AccountController extends Controller
$transformer = app(AccountTransformer::class);
$transformer->setParameters($this->parameters);
$resource = new FractalCollection($accounts, $transformer, 'accounts');
$resource = new FractalCollection($accounts, $transformer, self::RESOURCE_KEY);
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
@ -208,7 +209,7 @@ class AccountController extends Controller
/** @var AccountTransformer $transformer */
$transformer = app(AccountTransformer::class);
$transformer->setParameters($this->parameters);
$resource = new Item($account, $transformer, 'accounts');
$resource = new Item($account, $transformer, self::RESOURCE_KEY);
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
}
@ -230,7 +231,7 @@ class AccountController extends Controller
$transformer = app(AccountTransformer::class);
$transformer->setParameters($this->parameters);
$resource = new Item($account, $transformer, 'accounts');
$resource = new Item($account, $transformer, self::RESOURCE_KEY);
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
}
@ -304,7 +305,7 @@ class AccountController extends Controller
/** @var AccountTransformer $transformer */
$transformer = app(AccountTransformer::class);
$transformer->setParameters($this->parameters);
$resource = new Item($account, $transformer, 'accounts');
$resource = new Item($account, $transformer, self::RESOURCE_KEY);
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json');
}

View File

@ -141,49 +141,6 @@ class CategoryController extends Controller
}
}
// foreach ([] as $set) {
// foreach ($set as $currency) {
// $inKey = sprintf('%d-i', $currency['currency_id']);
// $outKey = sprintf('%d-e', $currency['currency_id']);
// $categories[] = (string)trans('firefly.no_category');
// // make data arrays if not yet present.
// $tempData[$inKey] = $tempData[$inKey] ?? [
// 'currency_id' => $currency['currency_id'],
// 'label' => (string)trans('firefly.box_earned_in_currency', ['currency' => $currency['currency_name']]),
// 'currency_code' => $currency['currency_code'],
// 'currency_symbol' => $currency['currency_symbol'],
// 'currency_decimal_places' => $currency['currency_decimal_places'],
// 'type' => 'bar', // line, area or bar
// 'yAxisID' => 0, // 0, 1, 2
// 'entries' => [
// // per category:
// // "category" => 5,
// ],
// ];
// $tempData[$outKey] = $tempData[$outKey] ?? [
// 'currency_id' => $currency['currency_id'],
// 'label' => (string)trans('firefly.box_spent_in_currency', ['currency' => $currency['currency_name']]),
// 'currency_code' => $currency['currency_code'],
// 'currency_symbol' => $currency['currency_symbol'],
// 'currency_decimal_places' => $currency['currency_decimal_places'],
// 'type' => 'bar', // line, area or bar
// 'yAxisID' => 0, // 0, 1, 2
// 'entries' => [
// // per category:
// // "category" => 5,
// ],
// ];
// foreach ($currency['transaction_journals'] as $journal) {
// // is it expense or income?
// $letter = -1 === bccomp($journal['amount'], '0') ? 'e' : 'i';
// $currentKey = sprintf('%d-%s', $currency['currency_id'], $letter);
// $name = (string)trans('firefly.no_category');
// $tempData[$currentKey]['entries'][$name] = $tempData[$currentKey]['entries'][$name] ?? '0';
// $tempData[$currentKey]['entries'][$name] = bcadd($tempData[$currentKey]['entries'][$name], $journal['amount']);
// }
// }
// }
// re-sort every spent array and add 0 for missing entries.
foreach ($tempData as $index => $set) {
$oldSet = $set['entries'];

View File

@ -577,7 +577,8 @@ class CurrencyController extends Controller
{
$manager = $this->getManager();
$currency = app('amount')->getDefaultCurrencyByUser(auth()->user());
$this->parameters->set('defaultCurrency', $currency);
/** @var CurrencyTransformer $transformer */
$transformer = app(CurrencyTransformer::class);
$transformer->setParameters($this->parameters);

View File

@ -263,17 +263,13 @@ class TransactionUpdateRequest extends Request
// TODO if the transaction_journal_id is empty, some fields are mandatory, like the amount!
// all journals must have a description
//$this->validateDescriptions($validator);
// // validate foreign currency info
// $this->validateForeignCurrencyInformation($validator);
//
//
// // make sure all splits have valid source + dest info
// $this->validateSplitAccounts($validator);
// the group must have a description if > 1 journal.
// $this->validateGroupDescription($validator);
}
);
}

View File

@ -159,7 +159,6 @@ class DecryptDatabase extends Command
if ('The MAC is invalid.' === $e->getMessage()) {
throw new FireflyException($e->getMessage()); // @codeCoverageIgnore
}
//Log::debug(sprintf('Could not decrypt. %s', $e->getMessage()));
}
return $value;

View File

@ -211,7 +211,6 @@ class MigrateToRules extends Command
$lang = app('preferences')->getForUser($user, 'language', 'en_US');
$groupTitle = (string) trans('firefly.rulegroup_for_bills_title', [], $lang->data);
$ruleGroup = $this->ruleGroupRepository->findByTitle($groupTitle);
//$currency = $this->getCurrency($user);
if (null === $ruleGroup) {
$ruleGroup = $this->ruleGroupRepository->store(

View File

@ -341,19 +341,17 @@ class TransferCurrenciesCorrections extends Command
if (isset($this->accountCurrencies[$accountId]) && $this->accountCurrencies[$accountId] instanceof TransactionCurrency) {
return $this->accountCurrencies[$accountId]; // @codeCoverageIgnore
}
// TODO we can use getAccountCurrency() instead
$currencyId = (int) $this->accountRepos->getMetaValue($account, 'currency_id');
$result = $this->currencyRepos->findNull($currencyId);
if (null === $result) {
$currency = $this->accountRepos->getAccountCurrency($account);
if (null === $currency) {
// @codeCoverageIgnoreStart
$this->accountCurrencies[$accountId] = 0;
return null;
// @codeCoverageIgnoreEnd
}
$this->accountCurrencies[$accountId] = $result;
$this->accountCurrencies[$accountId] = $currency;
return $result;
return $currency;
}
/**

View File

@ -367,19 +367,6 @@ class TransactionJournalFactory
// verify that journal has two transactions. Otherwise, delete and cancel.
// TODO this can't be faked so it can't be tested.
// $count = $journal->transactions()->count();
// if (2 !== $count) {
// // @codeCoverageIgnoreStart
// Log::error(sprintf('The journal unexpectedly has %d transaction(s). This is not OK. Cancel operation.', $count));
// try {
// $journal->delete();
// } catch (Exception $e) {
// Log::debug(sprintf('Dont care: %s.', $e->getMessage()));
// }
//
// return null;
// // @codeCoverageIgnoreEnd
// }
$journal->completed = true;
$journal->save();

View File

@ -58,4 +58,6 @@ trait CollectorProperties
private $total;
/** @var User The user object. */
private $user;
private bool $hasJoinedMetaTables;
}

View File

@ -310,4 +310,36 @@ trait MetaCollection
}
/**
* @inheritDoc
*/
public function setExternalId(string $externalId): GroupCollectorInterface
{
if (false === $this->hasJoinedMetaTables) {
$this->hasJoinedMetaTables = true;
$this->query->leftJoin('journal_meta', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id');
}
$this->query->where('journal_meta.name', '=', 'external_id');
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $externalId));
return $this;
}
/**
* @inheritDoc
*/
public function setInternalReference(string $internalReference): GroupCollectorInterface
{
if (false === $this->hasJoinedMetaTables) {
$this->hasJoinedMetaTables = true;
$this->query->leftJoin('journal_meta', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id');
}
$this->query->where('journal_meta.name', '=', 'internal_reference');
$this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $internalReference));
return $this;
}
}

View File

@ -65,6 +65,7 @@ class GroupCollector implements GroupCollectorInterface
$this->hasNotesInformation = false;
$this->hasJoinedTagTables = false;
$this->hasJoinedAttTables = false;
$this->hasJoinedMetaTables = false;
$this->integerFields = [
'transaction_group_id',
'user_id',
@ -167,13 +168,8 @@ class GroupCollector implements GroupCollectorInterface
*/
public function getGroups(): Collection
{
//$start = microtime(true);
/** @var Collection $result */
$result = $this->query->get($this->fields);
//$end = round(microtime(true) - $start, 5);
// log info about query time.
//Log::info(sprintf('Query took Firefly III %s seconds', $end));
//Log::info($this->query->toSql(), $this->query->getBindings());
// now to parse this into an array.
$collection = $this->parseArray($result);
@ -312,7 +308,7 @@ class GroupCollector implements GroupCollectorInterface
$this->query->where(
static function (EloquentBuilder $q) use ($array) {
$q->where(
function (EloquentBuilder $q1) use ($array) {
static function (EloquentBuilder $q1) use ($array) {
foreach ($array as $word) {
$keyword = sprintf('%%%s%%', $word);
$q1->where('transaction_journals.description', 'LIKE', $keyword);
@ -687,5 +683,4 @@ class GroupCollector implements GroupCollectorInterface
->orderBy('transaction_journals.description', 'DESC')
->orderBy('source.amount', 'DESC');
}
}

View File

@ -426,4 +426,22 @@ interface GroupCollectorInterface
*/
public function withoutCategory(): GroupCollectorInterface;
/**
* Look for specific external ID's.
*
* @param string $externalId
*
* @return GroupCollectorInterface
*/
public function setExternalId(string $externalId): GroupCollectorInterface;
/**
* Look for specific external ID's.
*
* @param string $externalId
*
* @return GroupCollectorInterface
*/
public function setInternalReference(string $externalId): GroupCollectorInterface;
}

View File

@ -25,7 +25,6 @@ namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Middleware\IsSandStormUser;
use FireflyIII\Http\Requests\ConfigurationRequest;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
@ -55,7 +54,6 @@ class ConfigurationController extends Controller
}
);
$this->middleware(IsDemoUser::class)->except(['index']);
$this->middleware(IsSandStormUser::class);
}
/**

View File

@ -25,7 +25,6 @@ namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Events\AdminRequestedTestMessage;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Middleware\IsSandStormUser;
use FireflyIII\User;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
@ -48,7 +47,6 @@ class HomeController extends Controller
{
parent::__construct();
$this->middleware(IsDemoUser::class)->except(['index']);
$this->middleware(IsSandStormUser::class)->except(['index']);
}
/**
@ -61,9 +59,8 @@ class HomeController extends Controller
Log::channel('audit')->info('User visits admin index.');
$title = (string) trans('firefly.administration');
$mainTitleIcon = 'fa-hand-spock-o';
$sandstorm = 1 === (int) getenv('SANDSTORM');
return view('admin.index', compact('title', 'mainTitleIcon', 'sandstorm'));
return view('admin.index', compact('title', 'mainTitleIcon'));
}
/**

View File

@ -26,7 +26,6 @@ namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Helpers\Update\UpdateTrait;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Middleware\IsSandStormUser;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
@ -57,7 +56,6 @@ class UpdateController extends Controller
}
);
$this->middleware(IsDemoUser::class)->except(['index']);
$this->middleware(IsSandStormUser::class)->except(['index']);
}
/**

View File

@ -24,7 +24,6 @@ namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Middleware\IsSandStormUser;
use FireflyIII\Http\Requests\UserFormRequest;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
@ -57,7 +56,6 @@ class UserController extends Controller
}
);
$this->middleware(IsDemoUser::class)->except(['index', 'show']);
$this->middleware(IsSandStormUser::class);
}
/**

View File

@ -79,7 +79,6 @@ class ShowController extends Controller
*/
public function show(Request $request, Category $category, Carbon $start = null, Carbon $end = null)
{
//Log::debug('Now in show()');
/** @var Carbon $start */
$start = $start ?? session('start', Carbon::now()->startOfMonth());
/** @var Carbon $end */
@ -106,8 +105,6 @@ class ShowController extends Controller
$groups = $collector->getPaginatedGroups();
$groups->setPath($path);
//Log::debug('End of show()');
return view('categories.show', compact('category','attachments', 'groups', 'periods', 'subTitle', 'subTitleIcon', 'start', 'end'));
}

View File

@ -111,7 +111,6 @@ class BudgetController extends Controller
$loopStart = app('navigation')->startOfPeriod($loopStart, $step);
$currencies = [];
$defaultEntries = [];
// echo '<hr>';
while ($end >= $loopStart) {
/** @var Carbon $currentEnd */
$loopEnd = app('navigation')->endOfPeriod($loopStart, $step);

View File

@ -85,8 +85,6 @@ class CategoryController extends Controller
$start = app('navigation')->startOfPeriod($start, $range);
$end = $this->getDate();
//Log::debug(sprintf('Full range is %s to %s', $start->format('Y-m-d'), $end->format('Y-m-d')));
/** @var WholePeriodChartGenerator $generator */
$generator = app(WholePeriodChartGenerator::class);
$chartData = $generator->generate($category, $start, $end);

View File

@ -64,61 +64,6 @@ class CategoryReportController extends Controller
);
}
//
// /**
// * Chart for expenses grouped by expense account.
// *
// * TODO this chart is not multi-currency aware.
// *
// * @param Collection $accounts
// * @param Collection $categories
// * @param Carbon $start
// * @param Carbon $end
// * @param string $others
// *
// * @return JsonResponse
// */
// public function accountExpense(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse
// {
// /** @var MetaPieChartInterface $helper */
// $helper = app(MetaPieChartInterface::class);
// $helper->setAccounts($accounts)->setCategories($categories)->setStart($start)->setEnd($end)->setCollectOtherObjects(1 === (int)$others);
//
// $chartData = $helper->generate('expense', 'account');
// $data = $this->generator->pieChart($chartData);
//
// return response()->json($data);
// }
//
// /**
// * Chart for income grouped by revenue account.
// *
// * TODO this chart is not multi-currency aware.
// *
// * @param Collection $accounts
// * @param Collection $categories
// * @param Carbon $start
// * @param Carbon $end
// * @param string $others
// *
// * @return JsonResponse
// */
// public function accountIncome(Collection $accounts, Collection $categories, Carbon $start, Carbon $end, string $others): JsonResponse
// {
// /** @var MetaPieChartInterface $helper */
// $helper = app(MetaPieChartInterface::class);
// $helper->setAccounts($accounts);
// $helper->setCategories($categories);
// $helper->setStart($start);
// $helper->setEnd($end);
// $helper->setCollectOtherObjects(1 === (int)$others);
// $chartData = $helper->generate('income', 'account');
// $data = $this->generator->pieChart($chartData);
//
// return response()->json($data);
// }
/**
* @param Collection $accounts
* @param Collection $categories

View File

@ -391,6 +391,7 @@ class AutoCompleteController extends Controller
foreach ($piggies as $piggy) {
$currency = $accountRepos->getAccountCurrency($piggy->account) ?? $defaultCurrency;
$currentAmount = $repository->getRepetition($piggy)->currentamount ?? '0';
$piggy->objectGroup = $piggy->objectGroups->first();
$piggy->name_with_amount = sprintf(
'%s (%s / %s)',
$piggy->name,

View File

@ -158,7 +158,7 @@ class IndexController extends Controller
}
foreach ($piggyBanks as $groupOrder => $group) {
$groupId = $group['object_group_id'];
$piggyBanks[$groupOrder]['sums'] = $sums[$groupId];
$piggyBanks[$groupOrder]['sums'] = $sums[$groupId] ?? [];
}
return $piggyBanks;

View File

@ -28,7 +28,6 @@ use FireflyIII\Events\UserChangedEmail;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Exceptions\ValidationException;
use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Middleware\IsSandStormUser;
use FireflyIII\Http\Requests\DeleteAccountFormRequest;
use FireflyIII\Http\Requests\EmailFormRequest;
use FireflyIII\Http\Requests\ProfileFormRequest;
@ -85,7 +84,38 @@ class ProfileController extends Controller
$this->externalIdentity = 'eloquent' === $loginProvider || 'remote_user_guard' === $authGuard;
$this->middleware(IsDemoUser::class)->except(['index']);
$this->middleware(IsSandStormUser::class)->except('index');
}
/**
*
*/
public function logoutOtherSessions()
{
//
return view('profile.logout-other-sessions');
}
/**
* @param Request $request
*
* @return \Illuminate\Contracts\Foundation\Application|RedirectResponse|Redirector
*/
public function postLogoutOtherSessions(Request $request)
{
$creds = [
'email' => auth()->user()->email,
'password' => $request->get('password'),
];
if (Auth::once($creds)) {
Auth::logoutOtherDevices($request->get('password'));
session()->flash('info', (string) trans('firefly.other_sessions_logged_out'));
return redirect(route('profile.index'));
}
session()->flash('error', (string) trans('auth.failed'));
return redirect(route('profile.index'));
}
/**
@ -207,20 +237,16 @@ class ProfileController extends Controller
/** @var Collection $set */
$set = app('preferences')->findByName('email_change_confirm_token');
$user = null;
//Log::debug(sprintf('Found %d preferences', $set->count()));
/** @var Preference $preference */
foreach ($set as $preference) {
if ($preference->data === $token) {
//Log::debug('Found user');
$user = $preference->user;
}
}
// update user to clear blocked and blocked_code.
if (null === $user) {
//Log::debug('Found no user');
throw new FireflyException('Invalid token.');
}
//Log::debug('Will unblock user.');
$repository->unblockUser($user);
// return to login.
@ -342,7 +368,7 @@ class ProfileController extends Controller
/**
* @return Factory|View
*/
public function newBackupCodes()
public function newBackupCodes(Request $request)
{
if ($this->externalIdentity) {
$request->session()->flash('error', trans('firefly.external_user_mgt_disabled'));

View File

@ -121,10 +121,6 @@ class IndexController extends Controller
}
}
//if (0 !== $recurrence->recurrenceRepetitions->count()) {
//$array['ocurrences'] = array_slice($this->recurring->getOccurrencesInRange($recurrence->recurrenceRepetitions->first(), $today, $year), 0, 1);
//}
$recurring[] = $array;
}
$paginator = new LengthAwarePaginator($recurring, $total, $pageSize, $page);

View File

@ -489,287 +489,6 @@ class DoubleController extends Controller
return $result;
}
//
//
// /**
// * Generates the overview per budget.
// *
// * @param Collection $accounts
// * @param Collection $expense
// * @param Carbon $start
// * @param Carbon $end
// *
// * @return string
// */
// public function budget(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): string
// {
// // Properties for cache:
// $cache = new CacheProperties;
// $cache->addProperty($start);
// $cache->addProperty($end);
// $cache->addProperty('expense-budget');
// $cache->addProperty($accounts->pluck('id')->toArray());
// $cache->addProperty($expense->pluck('id')->toArray());
// if ($cache->has()) {
// return $cache->get(); // @codeCoverageIgnore
// }
// $combined = $this->combineAccounts($expense);
// $all = new Collection;
// foreach ($combined as $combi) {
// $all = $all->merge($combi);
// }
// // now find spent / earned:
// $spent = $this->spentByBudget($accounts, $all, $start, $end);
// // join arrays somehow:
// $together = [];
// foreach ($spent as $categoryId => $spentInfo) {
// if (!isset($together[$categoryId])) {
// $together[$categoryId]['spent'] = $spentInfo;
// $together[$categoryId]['budget'] = $spentInfo['name'];
// $together[$categoryId]['grand_total'] = '0';
// }
// $together[$categoryId]['grand_total'] = bcadd($spentInfo['grand_total'], $together[$categoryId]['grand_total']);
// }
// try {
// $result = view('reports.partials.exp-budgets', compact('together'))->render();
// // @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::error(sprintf('Could not render category::budget: %s', $e->getMessage()));
// $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
// }
// // @codeCoverageIgnoreEnd
// $cache->store($result);
//
// return $result;
// }
//
//
//
// /**
// * Generates the overview per category (spent and earned).
// *
// * @param Collection $accounts
// * @param Collection $expense
// * @param Carbon $start
// * @param Carbon $end
// *
// * @return string
// */
// public function category(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): string
// {
// // Properties for cache:
// $cache = new CacheProperties;
// $cache->addProperty($start);
// $cache->addProperty($end);
// $cache->addProperty('expense-category');
// $cache->addProperty($accounts->pluck('id')->toArray());
// $cache->addProperty($expense->pluck('id')->toArray());
// if ($cache->has()) {
// return $cache->get(); // @codeCoverageIgnore
// }
// $combined = $this->combineAccounts($expense);
// $all = new Collection;
// foreach ($combined as $combi) {
// $all = $all->merge($combi);
// }
// // now find spent / earned:
// $spent = $this->spentByCategory($accounts, $all, $start, $end);
// $earned = $this->earnedByCategory($accounts, $all, $start, $end);
// // join arrays somehow:
// $together = [];
// foreach ($spent as $categoryId => $spentInfo) {
// if (!isset($together[$categoryId])) {
// $together[$categoryId]['spent'] = $spentInfo;
// $together[$categoryId]['category'] = $spentInfo['name'];
// $together[$categoryId]['grand_total'] = '0';
// }
// $together[$categoryId]['grand_total'] = bcadd($spentInfo['grand_total'], $together[$categoryId]['grand_total']);
// }
// foreach ($earned as $categoryId => $earnedInfo) {
// if (!isset($together[$categoryId])) {
// $together[$categoryId]['earned'] = $earnedInfo;
// $together[$categoryId]['category'] = $earnedInfo['name'];
// $together[$categoryId]['grand_total'] = '0';
// }
// $together[$categoryId]['grand_total'] = bcadd($earnedInfo['grand_total'], $together[$categoryId]['grand_total']);
// }
// try {
// $result = view('reports.partials.exp-categories', compact('together'))->render();
// // @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
// $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
// }
// // @codeCoverageIgnoreEnd
// $cache->store($result);
//
// return $result;
// }
//
//
// /**
// * Overview of spending.
// *
// * @param Collection $accounts
// * @param Collection $expense
// * @param Carbon $start
// * @param Carbon $end
// *
// * @return array|mixed|string
// */
// public function spent(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
// {
// // chart properties for cache:
// $cache = new CacheProperties;
// $cache->addProperty($start);
// $cache->addProperty($end);
// $cache->addProperty('expense-spent');
// $cache->addProperty($accounts->pluck('id')->toArray());
// $cache->addProperty($expense->pluck('id')->toArray());
// if ($cache->has()) {
// return $cache->get(); // @codeCoverageIgnore
// }
//
// $combined = $this->combineAccounts($expense);
// $result = [];
//
// foreach ($combined as $name => $combi) {
// /**
// * @var string
// * @var Collection $combi
// */
// $spent = $this->spentInPeriod($accounts, $combi, $start, $end);
// $earned = $this->earnedInPeriod($accounts, $combi, $start, $end);
// $result[$name] = [
// 'spent' => $spent,
// 'earned' => $earned,
// ];
// }
// try {
// $result = view('reports.partials.exp-not-grouped', compact('result'))->render();
// // @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::error(sprintf('Could not render category::expenses: %s', $e->getMessage()));
// $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
// }
// // @codeCoverageIgnoreEnd
// $cache->store($result);
//
// return $result;
// // for period, get spent and earned for each account (by name)
// }
//
//
// /**
// * List of top expenses.
// *
// * @param Collection $accounts
// * @param Collection $expense
// * @param Carbon $start
// * @param Carbon $end
// *
// * @return string
// */
// public function topExpense(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): string
// {
// // Properties for cache:
// $cache = new CacheProperties;
// $cache->addProperty($start);
// $cache->addProperty($end);
// $cache->addProperty('top-expense');
// $cache->addProperty($accounts->pluck('id')->toArray());
// $cache->addProperty($expense->pluck('id')->toArray());
// if ($cache->has()) {
// return $cache->get(); // @codeCoverageIgnore
// }
// $combined = $this->combineAccounts($expense);
// $all = new Collection;
// foreach ($combined as $combi) {
// $all = $all->merge($combi);
// }
// // get all expenses in period:
// /** @var GroupCollectorInterface $collector */
// $collector = app(GroupCollectorInterface::class);
//
// $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAccounts($accounts);
// $collector->setAccounts($all)->withAccountInformation();
// $sorted = $collector->getExtractedJournals();
//
// usort($sorted, function ($a, $b) {
// return $a['amount'] <=> $b['amount']; // @codeCoverageIgnore
// });
//
// try {
// $result = view('reports.partials.top-transactions', compact('sorted'))->render();
// // @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::error(sprintf('Could not render category::topExpense: %s', $e->getMessage()));
// $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
// }
// // @codeCoverageIgnoreEnd
// $cache->store($result);
//
// return $result;
// }
//
// /**
// * List of top income.
// *
// * @param Collection $accounts
// * @param Collection $expense
// * @param Carbon $start
// * @param Carbon $end
// *
// * @return mixed|string
// */
// public function topIncome(Collection $accounts, Collection $expense, Carbon $start, Carbon $end)
// {
// // Properties for cache:
// $cache = new CacheProperties;
// $cache->addProperty($start);
// $cache->addProperty($end);
// $cache->addProperty('top-income');
// $cache->addProperty($accounts->pluck('id')->toArray());
// $cache->addProperty($expense->pluck('id')->toArray());
// if ($cache->has()) {
// return $cache->get(); // @codeCoverageIgnore
// }
// $combined = $this->combineAccounts($expense);
// $all = new Collection;
// foreach ($combined as $combi) {
// $all = $all->merge($combi);
// }
// // get all expenses in period:
//
// /** @var GroupCollectorInterface $collector */
// $collector = app(GroupCollectorInterface::class);
//
// $total = $accounts->merge($all);
// $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAccounts($total)->withAccountInformation();
// $sorted = $collector->getExtractedJournals();
//
// foreach (array_keys($sorted) as $key) {
// $sorted[$key]['amount'] = bcmul($sorted[$key]['amount'], '-1');
// }
//
// usort($sorted, function ($a, $b) {
// return $a['amount'] <=> $b['amount']; // @codeCoverageIgnore
// });
//
// try {
// $result = view('reports.partials.top-transactions', compact('sorted'))->render();
// // @codeCoverageIgnoreStart
// } catch (Throwable $e) {
// Log::error(sprintf('Could not render category::topIncome: %s', $e->getMessage()));
// $result = sprintf('An error prevented Firefly III from rendering: %s. Apologies.', $e->getMessage());
// }
// // @codeCoverageIgnoreEnd
// $cache->store($result);
//
// return $result;
// }
/**
* TODO this method is double.
*

View File

@ -24,15 +24,14 @@ namespace FireflyIII\Http\Controllers\Rule;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\Rule;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use FireflyIII\Support\Http\Controllers\RuleManagement;
use FireflyIII\User;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Illuminate\View\View;
/**
@ -66,20 +65,6 @@ class IndexController extends Controller
);
}
/**
* Move rule down in list.
*
* @param Rule $rule
*
* @return RedirectResponse|Redirector
*/
public function down(Rule $rule)
{
$this->ruleRepos->moveDown($rule);
return redirect(route('rules.index'));
}
/**
* Index of all rules and groups.
*
@ -135,17 +120,18 @@ class IndexController extends Controller
/**
* Move rule ip.
* @param Request $request
* @param Rule $rule
* @param RuleGroup $ruleGroup
*
* @param Rule $rule
*
* @return RedirectResponse|Redirector
* @return JsonResponse
*/
public function up(Rule $rule)
public function moveRule(Request $request, Rule $rule, RuleGroup $ruleGroup): JsonResponse
{
$this->ruleRepos->moveUp($rule);
$order = (int) $request->get('order');
$this->ruleRepos->moveRule($rule, $ruleGroup, (int) $order);
return redirect(route('rules.index'));
return response()->json([]);
}
}

View File

@ -182,8 +182,6 @@ class MassController extends Controller
$count++;
} catch (FireflyException $e) { // @codeCoverageIgnore
// do something with error.
//echo $e->getMessage();
//exit;
}
}

View File

@ -31,7 +31,6 @@ use FireflyIII\Http\Middleware\InterestingMessage;
use FireflyIII\Http\Middleware\IsAdmin;
use FireflyIII\Http\Middleware\Range;
use FireflyIII\Http\Middleware\RedirectIfAuthenticated;
use FireflyIII\Http\Middleware\Sandstorm;
use FireflyIII\Http\Middleware\SecureHeaders;
use FireflyIII\Http\Middleware\StartFireflySession;
use FireflyIII\Http\Middleware\TrimStrings;
@ -45,6 +44,7 @@ use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
use Illuminate\Routing\Middleware\ThrottleRequests;
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Laravel\Passport\Http\Middleware\CreateFreshApiToken;
use PragmaRX\Google2FALaravel\Middleware as MFAMiddleware;
@ -85,13 +85,13 @@ class Kernel extends HttpKernel
// does not check 2fa
// does not check activation
'web' => [
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
CreateFreshApiToken::class,
AuthenticateSession::class,
],
// only the basic variable binders.
@ -105,7 +105,6 @@ class Kernel extends HttpKernel
// MUST NOT be logged in. Does not care about 2FA or confirmation.
'user-not-logged-in' => [
Installer::class,
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,
@ -119,7 +118,6 @@ class Kernel extends HttpKernel
// don't care about confirmation:
'user-logged-in-no-2fa' => [
Installer::class,
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,
@ -134,7 +132,6 @@ class Kernel extends HttpKernel
// don't care about 2fa
// don't care about confirmation.
'user-simple-auth' => [
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,
@ -149,7 +146,6 @@ class Kernel extends HttpKernel
// MUST be confirmed.
// (this group includes the other Firefly middleware)
'user-full-auth' => [
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,
@ -168,7 +164,6 @@ class Kernel extends HttpKernel
// MUST have owner role
// (this group includes the other Firefly middleware)
'admin' => [
Sandstorm::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartFireflySession::class,

View File

@ -46,7 +46,6 @@ class InterestingMessage
*/
public function handle(Request $request, Closure $next)
{
//Log::debug(sprintf('Interesting Message middleware for URI %s', $request->url()));
if ($this->testing()) {
return $next($request);
}

View File

@ -1,59 +0,0 @@
<?php
/**
* IsSandStormUser.php
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
/**
* Class IsSandStormUser.
*/
class IsSandStormUser
{
/**
* Handle an incoming request. May not be a limited user (ie. Sandstorm env. or demo user).
*
* @param Request $request
* @param Closure $next
* @param string|null $guard
*
* @return mixed
*/
public function handle(Request $request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->guest()) {
// don't care when not logged in, usual stuff applies:
return $next($request);
}
if (1 === (int) getenv('SANDSTORM')) {
app('session')->flash('warning', (string) trans('firefly.sandstorm_not_available'));
return response()->redirectTo(route('index'));
}
return $next($request);
}
}

View File

@ -1,107 +0,0 @@
<?php
/**
* Sandstorm.php
* Copyright (c) 2019 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
declare(strict_types=1);
namespace FireflyIII\Http\Middleware;
use Auth;
use Closure;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Http\Request;
use Log;
/**
* Class Sandstorm.
*/
class Sandstorm
{
/**
* Detects if is using Sandstorm, and responds by logging the user
* in and/or creating an account.
*
* @param Request $request
* @param Closure $next
* @param string|null $guard
*
* @return mixed
*/
public function handle(Request $request, Closure $next, $guard = null)
{
// is in Sandstorm environment?
$sandstorm = 1 === (int) getenv('SANDSTORM');
app('view')->share('SANDSTORM', $sandstorm);
if (!$sandstorm) {
return $next($request);
}
// we're in sandstorm! is user a guest?
if (Auth::guard($guard)->guest()) {
/** @var UserRepositoryInterface $repository */
$repository = app(UserRepositoryInterface::class);
$userId = (string) $request->header('X-Sandstorm-User-Id');
// catch anonymous:
$userId = '' === $userId ? 'anonymous' : $userId;
$email = $userId . '@firefly';
// always grab the first user in the Sandstorm DB:
$user = $repository->findByEmail($email) ?? $repository->first();
// or create somebody if necessary.
$user = $user ?? $this->createUser($email);
// then log this user in:
Log::info(sprintf('Sandstorm user ID is "%s"', $userId));
Log::info(sprintf('Access to database under "%s"', $email));
Auth::guard($guard)->login($user);
$repository->attachRole($user, 'owner');
app('view')->share('SANDSTORM_ANON', false);
}
return $next($request);
}
/**
* Create a user.
*
* @param string $email
*
* @return User
* @codeCoverageIgnore
*/
private function createUser(string $email): User
{
$repository = app(UserRepositoryInterface::class);
return $repository->store(
[
'blocked' => false,
'blocked_code' => null,
'email' => $email,
]
);
}
}

View File

@ -315,9 +315,6 @@ class CreateRecurringTransactions implements ShouldQueue
$this->created++;
Log::info(sprintf('Created new transaction group #%d', $group->id));
// link to piggy:
//$this->linkGroupToPiggies($recurrence, $group);
// trigger event:
event(new StoredTransactionGroup($group, $recurrence->apply_rules));

View File

@ -54,14 +54,12 @@ class AuthServiceProvider extends ServiceProvider
{
Auth::provider(
'remote_user_provider', function ($app, array $config) {
//Log::debug('Creating remote_user_provider in Closure');
return new RemoteUserProvider($app, $config);
}
);
Auth::extend(
'remote_user_guard', static function ($app, string $name, array $config) {
//Log::debug('Creating remote_user_guard in Closure');
return new RemoteUserGuard(Auth::createUserProvider($config['provider']), $app);
}
);

View File

@ -121,8 +121,7 @@ class AttachmentRepository implements AttachmentRepositoryInterface
try {
$unencryptedContent = Crypt::decrypt($encryptedContent); // verified
} catch (DecryptException $e) {
//Log::debug(sprintf('Could not decrypt: %e', $e->getMessage()));
$unencryptedContent = $encryptedContent;
$unencryptedContent = $encryptedContent;
}
}

View File

@ -594,12 +594,9 @@ class BillRepository implements BillRepositoryInterface
}
// find the most recent date for this bill NOT in the future. Cache this date:
$start = clone $bill->date;
//Log::debug('nextDateMatch: Start is ' . $start->format('Y-m-d'));
while ($start < $date) {
//Log::debug(sprintf('$start (%s) < $date (%s)', $start->format('Y-m-d'), $date->format('Y-m-d')));
$start = app('navigation')->addPeriod($start, $bill->repeat_freq, $bill->skip);
//Log::debug('Start is now ' . $start->format('Y-m-d'));
}
$end = app('navigation')->addPeriod($start, $bill->repeat_freq, $bill->skip);

View File

@ -191,7 +191,6 @@ class BudgetRepository implements BudgetRepositoryInterface
*/
public function getActiveBudgets(): Collection
{
//throw new \RuntimeException;
/** @var Collection $set */
$set = $this->user->budgets()->where('active', 1)
->orderBy('order', 'ASC')

View File

@ -170,14 +170,6 @@ class CurrencyRepository implements CurrencyRepositoryInterface
return 'current_default';
}
// // is the default currency for the system
// $defaultSystemCode = config('firefly.default_currency', 'EUR');
// $result = $currency->code === $defaultSystemCode;
// if (true === $result) {
// Log::info('Is the default currency of the SYSTEM, return true.');
//
// return 'system_fallback';
// }
Log::debug('Currency is not used, return false.');
return null;

View File

@ -281,6 +281,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
$currency = app('amount')->getDefaultCurrency();
$set = $this->getPiggyBanks();
/** @var PiggyBank $piggy */
foreach ($set as $piggy) {
$currentAmount = $this->getRepetition($piggy)->currentamount ?? '0';

View File

@ -282,7 +282,6 @@ class RecurringRepository implements RecurringRepositoryInterface
/** @var RecurrenceMeta $meta */
foreach ($transaction->recurrenceTransactionMeta as $meta) {
if ('tags' === $meta->name && '' !== $meta->value) {
//$tags = explode(',', $meta->value);
$tags = json_decode($meta->value, true, 512, JSON_THROW_ON_ERROR);
}
}

View File

@ -483,4 +483,18 @@ class RuleRepository implements RuleRepositoryInterface
return $newRule;
}
/**
* @inheritDoc
*/
public function moveRule(Rule $rule, RuleGroup $ruleGroup, int $order): Rule
{
$rule->order = $order;
if ($rule->rule_group_id !== $ruleGroup->id) {
$rule->rule_group_id = $ruleGroup->id;
}
$rule->save();
return $rule;
}
}

View File

@ -39,6 +39,15 @@ interface RuleRepositoryInterface
*/
public function count(): int;
/**
* @param Rule $rule
* @param RuleGroup $ruleGroup
* @param int $order
*
* @return Rule
*/
public function moveRule(Rule $rule, RuleGroup $ruleGroup, int $order): Rule;
/**
* @param Rule $rule
*

View File

@ -277,6 +277,9 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
->get(['piggy_bank_events.*']);
/** @var PiggyBankEvent $row */
foreach ($data as $row) {
if(null === $row->piggyBank) {
continue;
}
// get currency preference.
$currencyPreference = AccountMeta
::where('account_id', $row->piggyBank->account_id)

View File

@ -179,7 +179,7 @@ class UpdateRequest implements UpdateRequestInterface
Log::error('Ran into Guzzle error.');
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
$return['message'] = sprintf('Guzzle: %s', $e->getMessage());
$return['message'] = sprintf('Guzzle: %s', strip_tags($e->getMessage()));
return $return;
}

View File

@ -243,24 +243,6 @@ trait RecurringTransactionTrait
return $result ?? $repository->getCashAccount();
}
// /**
// * Update meta data for recurring transaction.
// *
// * @param Recurrence $recurrence
// * @param array $data
// */
// protected function updateMetaData(Recurrence $recurrence, array $data): void
// {
// // only two special meta fields right now. Let's just hard code them.
// $piggyId = (int)($data['meta']['piggy_bank_id'] ?? 0.0);
// $piggyName = $data['meta']['piggy_bank_name'] ?? '';
// $this->updatePiggyBank($recurrence, $piggyId, $piggyName);
//
// $tags = $data['meta']['tags'] ?? [];
// $this->updateTags($recurrence, $tags);
//
// }
/**
* @param RecurrenceTransaction $transaction
* @param int $piggyId

View File

@ -81,7 +81,6 @@ class RemoteUserGuard implements Guard
*/
public function guest(): bool
{
//Log::debug(sprintf('Now at %s', __METHOD__));
return !$this->check();
}
@ -90,7 +89,6 @@ class RemoteUserGuard implements Guard
*/
public function id(): ?User
{
//Log::debug(sprintf('Now at %s', __METHOD__));
return $this->user;
}
@ -99,7 +97,6 @@ class RemoteUserGuard implements Guard
*/
public function setUser(Authenticatable $user)
{
//Log::debug(sprintf('Now at %s', __METHOD__));
$this->user = $user;
}
@ -108,7 +105,6 @@ class RemoteUserGuard implements Guard
*/
public function user(): ?User
{
//Log::debug(sprintf('Now in user(). Will return NULL: %s', var_export(null === $this->user, true)));
return $this->user;
}

View File

@ -17,16 +17,6 @@ use Str;
*/
class RemoteUserProvider implements UserProvider
{
/**
* RemoteUserProvider constructor.
*
* @param Application $app
* @param array $config
*/
public function __construct(Application $app, array $config)
{
//Log::debug('In RemoteUserProvider constructor.');
}
/**
* @inheritDoc

View File

@ -44,9 +44,7 @@ class AccountList implements BinderInterface
*/
public static function routeBinder(string $value, Route $route): Collection
{
//Log::debug(sprintf('Now in AccountList::routeBinder("%s")', $value));
if (auth()->check()) {
//Log::debug('User is logged in.');
$collection = new Collection;
if ('allAssetAccounts' === $value) {
/** @var Collection $collection */
@ -65,7 +63,6 @@ class AccountList implements BinderInterface
->whereIn('accounts.id', $list)
->orderBy('accounts.name', 'ASC')
->get(['accounts.*']);
//Log::debug(sprintf('Collection length is %d', $collection->count()));
}
if ($collection->count() > 0) {

View File

@ -66,7 +66,6 @@ class BudgetList implements BinderInterface
->where('active', 1)
->whereIn('id', $list)
->get();
//Log::debug(sprintf('Found %d active budgets', $collection->count()), $list);
// add empty budget if applicable.
if (in_array(0, $list, true)) {
@ -75,11 +74,9 @@ class BudgetList implements BinderInterface
}
if ($collection->count() > 0) {
//Log::debug(sprintf('List length is > 0 (%d), so return it.', $collection->count()));
return $collection;
}
//Log::debug('List length is zero, fall back to 404.');
}
Log::warning('BudgetList fallback to 404.');
throw new NotFoundHttpException;

View File

@ -47,17 +47,43 @@ class PiggyBankForm
*/
public function piggyBankList(string $name, $value = null, array $options = null): string
{
// make repositories
/** @var PiggyBankRepositoryInterface $repository */
$repository = app(PiggyBankRepositoryInterface::class);
$piggyBanks = $repository->getPiggyBanksWithAmount();
$array = [
0 => (string)trans('firefly.none_in_select_list'),
$title = (string) trans('firefly.default_group_title_name');
$array = [];
$subList = [
0 => [
'group' => [
'title' => $title,
],
'piggies' => [
(string) trans('firefly.none_in_select_list'),
],
],
];
/** @var PiggyBank $piggy */
foreach ($piggyBanks as $piggy) {
$array[$piggy->id] = $piggy->name;
$group = $piggy->objectGroups->first();
$groupTitle = null;
$groupOrder = 0;
if (null !== $group) {
$groupTitle = $group->title;
$groupOrder = $group->order;
}
$subList[$groupOrder] = $subList[$groupOrder] ?? [
'group' => [
'title' => $groupTitle,
],
'piggies' => [],
];
$subList[$groupOrder]['piggies'][$piggy->id] = $piggy->name;
}
ksort($subList);
foreach ($subList as $info) {
$groupTitle = $info['group']['title'];
$array[$groupTitle] = $info['piggies'];
}
return $this->select($name, $array, $value, $options);

View File

@ -106,12 +106,9 @@ trait GetConfigurationData
// first range is the current range:
$title => [$start, $end],
];
//Log::debug(sprintf('viewRange is %s', $viewRange));
//Log::debug(sprintf('isCustom is %s', var_export($isCustom, true)));
// when current range is a custom range, add the current period as the next range.
if ($isCustom) {
//Log::debug('Custom is true.');
$index = app('navigation')->periodShow($start, $viewRange);
$customPeriodStart = app('navigation')->startOfPeriod($start, $viewRange);
$customPeriodEnd = app('navigation')->endOfPeriod($customPeriodStart, $viewRange);

View File

@ -166,7 +166,6 @@ trait RequestInformation
// both must be array and either must be > 0
if (count($intro) > 0 || count($specialIntro) > 0) {
$shownDemo = app('preferences')->get($key, false)->data;
//Log::debug(sprintf('Check if user has already seen intro with key "%s". Result is %s', $key, var_export($shownDemo, true)));
}
if (!is_bool($shownDemo)) {
$shownDemo = true; // @codeCoverageIgnore

View File

@ -40,10 +40,6 @@ use Log;
trait UserNavigation
{
//if (!$this->isEditableAccount($account)) {
// return $this->redirectAccountToAccount($account); // @codeCoverageIgnore
// }
/**
* Will return false if you cant edit this account type.
*

View File

@ -539,7 +539,6 @@ class Navigation
$subtract = $subtract ?? 1;
$date = clone $theDate;
// 1D 1W 1M 3M 6M 1Y
//Log::debug(sprintf('subtractPeriod: date is %s, repeat frequency is %s and subtract is %d', $date->format('Y-m-d'), $repeatFreq, $subtract));
$functionMap = [
'1D' => 'subDays',
'daily' => 'subDays',
@ -563,16 +562,12 @@ class Navigation
if (isset($functionMap[$repeatFreq])) {
$function = $functionMap[$repeatFreq];
$date->$function($subtract);
//Log::debug(sprintf('%s is in function map, execute %s with argument %d', $repeatFreq, $function, $subtract));
//Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d')));
return $date;
}
if (isset($modifierMap[$repeatFreq])) {
$subtract *= $modifierMap[$repeatFreq];
$date->subMonths($subtract);
//Log::debug(sprintf('%s is in modifier map with value %d, execute subMonths with argument %d', $repeatFreq, $modifierMap[$repeatFreq], $subtract));
//Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d')));
return $date;
}
@ -585,11 +580,8 @@ class Navigation
/** @var Carbon $tEnd */
$tEnd = session('end', Carbon::now()->endOfMonth());
$diffInDays = $tStart->diffInDays($tEnd);
//Log::debug(sprintf('repeatFreq is %s, start is %s and end is %s (session data).', $repeatFreq, $tStart->format('Y-m-d'), $tEnd->format('Y-m-d')));
//Log::debug(sprintf('Diff in days is %d', $diffInDays));
$date->subDays($diffInDays * $subtract);
//Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d')));
return $date;
}

View File

@ -102,7 +102,7 @@ class Search implements SearchInterface
{
$string = implode(' ', $this->words);
if ('' === $string) {
return \is_string($this->originalQuery) ? $this->originalQuery : '';
return is_string($this->originalQuery) ? $this->originalQuery : '';
}
return $string;
@ -132,6 +132,11 @@ class Search implements SearchInterface
$filteredQuery = str_replace($match, '', $filteredQuery);
}
$filteredQuery = trim(str_replace(['"', "'"], '', $filteredQuery));
// str replace some stuff:
$search = ['%', '=', '/', '<', '>', '(', ')', ';'];
$filteredQuery = str_replace($search, ' ', $filteredQuery);
if ('' !== $filteredQuery) {
$this->words = array_map('trim', explode(' ', $filteredQuery));
}
@ -298,6 +303,12 @@ class Search implements SearchInterface
$updatedAt = new Carbon($modifier['value']);
$collector->setUpdatedAt($updatedAt);
break;
case 'external_id':
$collector->setExternalId($modifier['value']);
break;
case 'internal_reference':
$collector->setInternalReference($modifier['value']);
break;
}
}
$collector->setAccounts($totalAccounts);

View File

@ -55,7 +55,7 @@ class CurrencyTransformer extends AbstractTransformer
$isDefault = false;
$defaultCurrency = $this->parameters->get('defaultCurrency');
if (null !== $defaultCurrency) {
$isDefault = $defaultCurrency->id === $currency->id;
$isDefault = (int) $defaultCurrency->id === (int) $currency->id;
}
$data = [
'id' => (int)$currency->id,

View File

@ -48,7 +48,6 @@ trait RecurrenceValidation
*/
public function valUpdateAccountInfo(Validator $validator): void
{
//Log::debug('Now in validateAccountInformation()');
$data = $validator->getData();
$transactionType = $data['type'] ?? 'invalid';

View File

@ -3,26 +3,36 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [5.3.0 (API 1.2.0) - 2020-08-01
## [5.3.0 (API 1.2.0) - 2020-xx-xx
Several alpha and beta releases preceded this release.
- 5.3.0-alpha.1 on 2020-06-22
- 5.3.0-beta.1 on 2020-06-28
### Added
- Piggy banks can be divided over groups. Groups can be sorted on a separate page. This may prove to be useful to organize piggy banks. The feature will
expand to other objects in the future.
expand to other objects in the future. Empty groups will be automatically deleted; you can only create groups by editing piggy banks.
- [Issue 3392](https://github.com/firefly-iii/firefly-iii/issues/3392) Notes will be included in the export.
- [Issue 3184](https://github.com/firefly-iii/firefly-iii/issues/3184) You can now use the `REMOTE_USER` field to authenticate. Read [the documentation](https://docs.firefly-iii.org/advanced-installation/authentication#remote-user) carefully.
- [Issue 3403](https://github.com/firefly-iii/firefly-iii/issues/3403) More triggers have been added that respond to the date of a transaction. Read [the documentation](https://docs.firefly-iii.org/advanced-concepts/rules)
- You can now add an attachments to recurring transactions.
- You can now add attachments to recurring transactions.
- You can invalidate other logins, check out the button on the `/profile` page.
- It is now possible to search for `internal_reference:abc` and / or `external_id:123`.
- [Issue 3398](https://github.com/firefly-iii/firefly-iii/issues/3398) You can clear the cache directly from the admin.
### Changed
- Firefly III now requires **PHP 7.4**
- The Docker image is running on **port 8080**
- Firefly III now requires **PHP 7.4**. PHP7.4 specific features have been introduced to make sure you upgrade.
- The Docker image is running on **port 8080**. Update your configuration.
- Firefly III has been upgraded to Laravel 7.
- [Issue 3455](https://github.com/firefly-iii/firefly-iii/issues/3455) Translations for the debug page.
- [Issue 3461](https://github.com/firefly-iii/firefly-iii/issues/3461) Inactive rules are no longer applied.
- From this release on, the Dockerfile and default configuration will install MySQL (using MariaDB) instead of PostgreSQL. This doesn't influence existing
installations.
- Example environment file has several fixes to make it more clear what features are for.
- Sandstorm support is now entirely decrepated.
- [Issue 3440](https://github.com/firefly-iii/firefly-iii/issues/3440) You can now sort rules more easily.
- [Issue 3493](https://github.com/firefly-iii/firefly-iii/issues/3493) Fix API issue when handling default currencies.
### Removed
- All import routines have been removed. Use the separate importers. Read [the documentation](https://docs.firefly-iii.org/importing-data/introduction).
@ -33,13 +43,17 @@ Several alpha and beta releases preceded this release.
- [Issue 3437](https://github.com/firefly-iii/firefly-iii/issues/3437) Better "days left" counter.
- Fixed bad UUID generation.
- Fixed a null pointer in session date.
- [Issue 3427](https://github.com/firefly-iii/firefly-iii/issues/3427) HTML included in error codes
- [Issue 3489](https://github.com/firefly-iii/firefly-iii/issues/3489) Several unescaped strings.
- [Issue 3490](https://github.com/firefly-iii/firefly-iii/issues/3490) Fix search issues when using special characters.
- [Issue 3488](https://github.com/firefly-iii/firefly-iii/issues/3488) Fix token text box.
### API
- New API for object groups.
- Expanded API for piggy banks to support object groups.
### Known issues
- You may run into date conversion problems if you're living on the right side of GMT. If transactions appear a day early, let me know.
- You may run into date conversion problems if you're living on the right side of GMT. If transactions appear a day early, let me know.
## [5.2.8 (API 1.1.0)] - 2020-06-02

128
composer.lock generated
View File

@ -893,16 +893,16 @@
},
{
"name": "fideloper/proxy",
"version": "4.3.0",
"version": "4.4.0",
"source": {
"type": "git",
"url": "https://github.com/fideloper/TrustedProxy.git",
"reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a"
"reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
"reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a",
"url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8",
"reference": "9beebf48a1c344ed67c1d36bb1b8709db7c3c1a8",
"shasum": ""
},
"require": {
@ -943,7 +943,7 @@
"proxy",
"trusted proxy"
],
"time": "2020-02-22T01:51:47+00:00"
"time": "2020-06-23T01:36:47+00:00"
},
{
"name": "firebase/php-jwt",
@ -1414,16 +1414,16 @@
},
{
"name": "laravel/framework",
"version": "v7.16.1",
"version": "v7.17.2",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b"
"reference": "d16ff3a0a66d98e04163456b39c4b7302cf50a40"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/dc9cd8338d222dec2d9962553639e08c4585fa5b",
"reference": "dc9cd8338d222dec2d9962553639e08c4585fa5b",
"url": "https://api.github.com/repos/laravel/framework/zipball/d16ff3a0a66d98e04163456b39c4b7302cf50a40",
"reference": "d16ff3a0a66d98e04163456b39c4b7302cf50a40",
"shasum": ""
},
"require": {
@ -1567,7 +1567,7 @@
"framework",
"laravel"
],
"time": "2020-06-16T14:31:25+00:00"
"time": "2020-06-24T13:11:25+00:00"
},
{
"name": "laravel/passport",
@ -1832,16 +1832,16 @@
},
{
"name": "league/commonmark",
"version": "1.5.0",
"version": "1.5.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "fc33ca12575e98e57cdce7d5f38b2ca5335714b3"
"reference": "6d74caf6abeed5fd85d6ec20da23d7269cd0b46f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/fc33ca12575e98e57cdce7d5f38b2ca5335714b3",
"reference": "fc33ca12575e98e57cdce7d5f38b2ca5335714b3",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6d74caf6abeed5fd85d6ec20da23d7269cd0b46f",
"reference": "6d74caf6abeed5fd85d6ec20da23d7269cd0b46f",
"shasum": ""
},
"require": {
@ -1923,7 +1923,7 @@
"type": "tidelift"
}
],
"time": "2020-06-21T20:50:13+00:00"
"time": "2020-06-27T12:50:08+00:00"
},
{
"name": "league/csv",
@ -5450,20 +5450,20 @@
},
{
"name": "symfony/psr-http-message-bridge",
"version": "v2.0.0",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/psr-http-message-bridge.git",
"reference": "ce709cd9c90872c08c2427b45739d5f3c781ab4f"
"reference": "e44f249afab496b4e8c0f7461fb8140eaa4b24d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/ce709cd9c90872c08c2427b45739d5f3c781ab4f",
"reference": "ce709cd9c90872c08c2427b45739d5f3c781ab4f",
"url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/e44f249afab496b4e8c0f7461fb8140eaa4b24d2",
"reference": "e44f249afab496b4e8c0f7461fb8140eaa4b24d2",
"shasum": ""
},
"require": {
"php": "^7.1",
"php": ">=7.1",
"psr/http-message": "^1.0",
"symfony/http-foundation": "^4.4 || ^5.0"
},
@ -5510,7 +5510,21 @@
"psr-17",
"psr-7"
],
"time": "2020-01-02T08:07:11+00:00"
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-06-25T08:21:47+00:00"
},
{
"name": "symfony/routing",
@ -6657,16 +6671,16 @@
},
{
"name": "composer/composer",
"version": "1.10.7",
"version": "1.10.8",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
"reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
"reference": "56e0e094478f30935e9128552188355fa9712291"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
"reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
"url": "https://api.github.com/repos/composer/composer/zipball/56e0e094478f30935e9128552188355fa9712291",
"reference": "56e0e094478f30935e9128552188355fa9712291",
"shasum": ""
},
"require": {
@ -6685,12 +6699,11 @@
"symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
},
"conflict": {
"symfony/console": "2.8.38",
"symfony/phpunit-bridge": "3.4.40"
"symfony/console": "2.8.38"
},
"require-dev": {
"phpspec/prophecy": "^1.10",
"symfony/phpunit-bridge": "^3.4"
"symfony/phpunit-bridge": "^4.2"
},
"suggest": {
"ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@ -6748,7 +6761,7 @@
"type": "tidelift"
}
],
"time": "2020-06-03T08:03:56+00:00"
"time": "2020-06-24T19:23:30+00:00"
},
{
"name": "composer/semver",
@ -7430,20 +7443,20 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.9.5",
"version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
"reference": "5796d127b0c4ff505b77455148ea9d5269d99758"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
"reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5796d127b0c4ff505b77455148ea9d5269d99758",
"reference": "5796d127b0c4ff505b77455148ea9d5269d99758",
"shasum": ""
},
"require": {
"php": "^7.1"
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@ -7474,7 +7487,13 @@
"object",
"object graph"
],
"time": "2020-01-17T21:11:47+00:00"
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2020-06-28T07:02:41+00:00"
},
{
"name": "netresearch/jsonmapper",
@ -7924,25 +7943,25 @@
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.1.0",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"dev-2.x": "2.x-dev"
}
},
"autoload": {
@ -7969,7 +7988,7 @@
"reflection",
"static analysis"
],
"time": "2020-04-27T09:25:28+00:00"
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
@ -8026,25 +8045,24 @@
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.2.0",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "30441f2752e493c639526b215ed81d54f369d693"
"reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30441f2752e493c639526b215ed81d54f369d693",
"reference": "30441f2752e493c639526b215ed81d54f369d693",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
"reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
"shasum": ""
},
"require": {
"php": "^7.2",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "^7.2",
"mockery/mockery": "~1"
"ext-tokenizer": "*"
},
"type": "library",
"extra": {
@ -8068,7 +8086,7 @@
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2020-06-19T20:22:09+00:00"
"time": "2020-06-27T10:12:23+00:00"
},
{
"name": "phpspec/prophecy",
@ -9648,16 +9666,16 @@
},
{
"name": "vimeo/psalm",
"version": "3.12.0",
"version": "3.12.1",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "d46283075d76ed244f7825b378eeb1cee246af73"
"reference": "9b860214d58c48b5cbe99bdb17914d0eb723c9cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/d46283075d76ed244f7825b378eeb1cee246af73",
"reference": "d46283075d76ed244f7825b378eeb1cee246af73",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/9b860214d58c48b5cbe99bdb17914d0eb723c9cd",
"reference": "9b860214d58c48b5cbe99bdb17914d0eb723c9cd",
"shasum": ""
},
"require": {
@ -9741,7 +9759,7 @@
"inspection",
"php"
],
"time": "2020-06-22T15:39:46+00:00"
"time": "2020-06-23T00:24:34+00:00"
},
{
"name": "webmozart/assert",

View File

@ -143,7 +143,7 @@ return [
],
//'encryption' => null === env('USE_ENCRYPTION') || true === env('USE_ENCRYPTION'),
'version' => '5.3.0-alpha.1',
'version' => '5.3.0-beta.1',
'api_version' => '1.2.0',
'db_version' => 14,
'maxUploadSize' => 15242880,
@ -152,7 +152,6 @@ return [
'send_registration_mail' => env('SEND_REGISTRATION_MAIL', true),
'demo_username' => env('DEMO_USERNAME', ''),
'demo_password' => env('DEMO_PASSWORD', ''),
'is_sandstorm' => env('IS_SANDSTORM', 'unknown'),
'fixer_api_key' => env('FIXER_API_KEY', ''),
'mapbox_api_key' => env('MAPBOX_API_KEY', ''),
'trusted_proxies' => env('TRUSTED_PROXIES', ''),
@ -185,6 +184,7 @@ return [
Tag::class,
Transaction::class,
TransactionJournal::class,
Recurrence::class,
],
'allowedMimes' => [
/* plain files */
@ -574,7 +574,8 @@ return [
'default_locale' => envNonEmpty('DEFAULT_LOCALE', 'equal'),
'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category',
'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on',
'updated_on',],
'updated_on', 'external_id', 'internal_reference',],
// TODO notes has_attachments
'cer_providers' => [

View File

@ -1,5 +1,13 @@
<template>
<table class="table table-striped">
<caption>A table containing transactions.</caption>
<thead>
<tr>
<th>TODO</th>
<th>TODO</th>
</tr>
</thead>
<tbody>
<tr v-for="transaction in transactions">
<td>
<a href="#">
@ -18,6 +26,7 @@
</span>
</td>
</tr>
</tbody>
</table>
</template>

View File

@ -91,12 +91,10 @@ p {
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
text-decoration-style: dotted;
text-decoration-line: underline;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
@ -31218,4 +31216,4 @@ a.text-muted:hover {
[class*="accent-"] a.btn-dark {
color: #ffffff;
}
/*# sourceMappingURL=adminlte.css.map */
/*# sourceMappingURL=adminlte.css.map */

View File

@ -90,6 +90,9 @@ p.tagcloud .label {
.piggy-handle {
cursor: move;
}
.rule-handle {
cursor: move;
}
body.waiting * {
cursor: progress;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -31,18 +31,11 @@ var fixHelper = function (e, tr) {
$(function () {
"use strict";
$('.rule-triggers').sortable(
{
helper: fixHelper,
stop: sortStop,
cursor: "move"
}
);
$('.rule-actions').sortable(
$('.group-rules').find('tbody').sortable(
{
helper: fixHelper,
stop: sortStop,
handle: '.rule-handle',
cursor: "move"
}
@ -102,27 +95,35 @@ function disableRuleSpinners() {
function sortStop(event, ui) {
"use strict";
var current = $(ui.item);
var parent = current.parent();
var ruleId = current.parent().data('id');
var entries = [];
// who am i?
$.each(parent.children(), function (i, v) {
var trigger = $(v);
var id = trigger.data('id');
entries.push(id);
// resort / move rule
$.each($('.group-rules'), function(i,v) {
$.each($('tr.single-rule', $(v)), function (i, v) {
var holder = $(v);
var position = parseInt(holder.data('position'));
var ruleGroupId = holder.data('group-id');
var ruleId = holder.data('id');
var originalOrder = parseInt(holder.data('order'));
var newOrder;
if (position === i) {
// not changed, position is what it should be.
return;
}
if (position < i) {
// position is less.
console.log('Rule #' + ruleId + ' moved down from position ' + originalOrder + ' to ' + (i + 1));
}
if (position > i) {
console.log('Rule #' + ruleId + ' moved up from position ' + originalOrder + ' to ' + (i + 1));
}
// update position:
holder.data('position', i);
newOrder = i+1;
$.post('rules/move-rule/' + ruleId + '/' + ruleGroupId, {order: newOrder, _token: token});
});
});
if (parent.hasClass('rule-triggers')) {
$.post('rules/trigger/order/' + ruleId, {triggers: entries, _token: token}).fail(function () {
alert('Could not re-order rule triggers. Please refresh the page.');
});
} else {
$.post('rules/action/order/' + ruleId, {actions: entries, _token: token}).fail(function () {
alert('Could not re-order rule actions. Please refresh the page.');
});
}
}

File diff suppressed because one or more lines are too long

View File

@ -162,7 +162,7 @@
<p>
{{ $t('firefly.profile_personal_access_token_explanation') }}
</p>
<pre><textarea id="tokenHidden" style="width:100%;" rows="20" class="form-control">{{ accessToken }}</textarea></pre>
<pre><textarea readonly id="tokenHidden" style="width:100%;" rows="20" class="form-control">{{ accessToken }}</textarea></pre>
</div>
<!-- Modal Actions -->

View File

@ -831,11 +831,11 @@
selectedSourceAccount: function (index, model) {
console.log('Now in selectedSourceAccount()');
if (typeof model === 'string') {
console.log('model is string.')
//console.log('model is string.')
// cant change types, only name.
this.transactions[index].source_account.name = model;
} else {
console.log('model is NOT string.')
//console.log('model is NOT string.')
this.transactions[index].source_account = {
id: model.id,
name: model.name,

View File

@ -17,14 +17,19 @@
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<template>
<div class="form-group"
v-bind:class="{ 'has-error': hasError()}"
v-if="typeof this.transactionType !== 'undefined' && this.transactionType === 'Transfer'">
<div class="col-sm-12 text-sm">
{{ $t('firefly.piggy_bank') }}
</div>
<div class="col-sm-12">
<select name="piggy_bank[]" ref="piggy" @input="handleInput" class="form-control" v-if="this.piggies.length > 0">
<option v-for="piggy in this.piggies" :label="piggy.name_with_amount" :value="piggy.id">{{piggy.name_with_amount}}</option>
<select name="piggy_bank[]" ref="piggy" @input="handleInput" class="form-control">
<optgroup v-for="(option, key) in this.piggies" v-bind:label="key">
<option v-for="piggy in option.piggies" :label="piggy.name_with_amount" :value="piggy.id">{{piggy.name_with_amount}}</option>
</optgroup>
</select>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
@ -55,17 +60,52 @@
loadPiggies: function () {
let URI = document.getElementsByTagName('base')[0].href + "json/piggy-banks";
axios.get(URI, {}).then((res) => {
this.piggies = [
{
name_with_amount: this.no_piggy_bank,
id: 0,
let tempList = {
0: {
group: {
title: this.$t('firefly.default_group_title_name')
},
piggies: [
{
name_with_amount: this.no_piggy_bank,
id: 0,
}
],
}
];
};
for (const key in res.data) {
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
// add to temp list
let currentPiggy = res.data[key];
if (currentPiggy.objectGroup) {
let groupOrder = currentPiggy.objectGroup.order;
if (!tempList[groupOrder]) {
tempList[groupOrder] = {
group: {
title: currentPiggy.objectGroup.title
},
piggies: [],
};
}
tempList[groupOrder].piggies.push({name_with_amount: currentPiggy.name_with_amount, id: currentPiggy.id});
}
if (!currentPiggy.objectGroup) {
// add to empty one:
tempList[0].piggies.push({name_with_amount: currentPiggy.name_with_amount, id: currentPiggy.id});
}
//console.log(currentPiggy);
this.piggies.push(res.data[key]);
}
}
const ordered = {};
Object.keys(tempList).sort().forEach(function(key) {
let groupName = tempList[key].group.title;
ordered[groupName] = tempList[key];
});
// final list:
this.piggies = ordered;
console.log(ordered);
});
}
}
@ -74,4 +114,4 @@
<style scoped>
</style>
</style>

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Pokladni\u010dka"
},
"form": {
"interest_date": "\u00darokov\u00e9 datum",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Neuen Schl\u00fcssel erstellen",
"profile_create_token": "Schl\u00fcssel erstellen",
"profile_create": "Erstellen",
"profile_save_changes": "\u00c4nderungen speichern"
"profile_save_changes": "\u00c4nderungen speichern",
"default_group_title_name": "(ohne Gruppierung)",
"piggy_bank": "Sparschwein"
},
"form": {
"interest_date": "Zinstermin",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "\u039a\u03bf\u03c5\u03bc\u03c0\u03b1\u03c1\u03ac\u03c2"
},
"form": {
"interest_date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03c4\u03bf\u03ba\u03b9\u03c3\u03bc\u03bf\u03cd",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Piggy bank"
},
"form": {
"interest_date": "Interest date",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Crear nuevo token",
"profile_create_token": "Crear token",
"profile_create": "Crear",
"profile_save_changes": "Guardar cambios"
"profile_save_changes": "Guardar cambios",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Alcanc\u00eda"
},
"form": {
"interest_date": "Fecha de inter\u00e9s",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Luo",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ryhmittelem\u00e4tt\u00f6m\u00e4t)",
"piggy_bank": "S\u00e4\u00e4st\u00f6possu"
},
"form": {
"interest_date": "Korkop\u00e4iv\u00e4",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Cr\u00e9er un nouveau jeton",
"profile_create_token": "Cr\u00e9er un jeton",
"profile_create": "Cr\u00e9er",
"profile_save_changes": "Enregistrer les modifications"
"profile_save_changes": "Enregistrer les modifications",
"default_group_title_name": "(Sans groupement)",
"piggy_bank": "Tirelire"
},
"form": {
"interest_date": "Date de valeur (int\u00e9r\u00eats)",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Malacpersely"
},
"form": {
"interest_date": "Kamatfizet\u00e9si id\u0151pont",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Celengan"
},
"form": {
"interest_date": "Tanggal bunga",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Crea nuovo token",
"profile_create_token": "Crea token",
"profile_create": "Crea",
"profile_save_changes": "Salva modifiche"
"profile_save_changes": "Salva modifiche",
"default_group_title_name": "(non in un gruppo)",
"piggy_bank": "Salvadanaio"
},
"form": {
"interest_date": "Data interesse",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Sparegris"
},
"form": {
"interest_date": "Rentedato",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Nieuwe token aanmaken",
"profile_create_token": "Token aanmaken",
"profile_create": "Cre\u00ebr",
"profile_save_changes": "Aanpassingen opslaan"
"profile_save_changes": "Aanpassingen opslaan",
"default_group_title_name": "(ongegroepeerd)",
"piggy_bank": "Spaarpotje"
},
"form": {
"interest_date": "Rentedatum",

View File

@ -44,9 +44,9 @@
"edit": "Modyfikuj",
"delete": "Usu\u0144",
"name": "Nazwa",
"profile_whoops": "Whoops!",
"profile_something_wrong": "Something went wrong!",
"profile_try_again": "Something went wrong. Please try again.",
"profile_whoops": "Uuuups!",
"profile_something_wrong": "Co\u015b posz\u0142o nie tak!",
"profile_try_again": "Co\u015b posz\u0142o nie tak. Spr\u00f3buj ponownie.",
"profile_oauth_clients": "Klienci OAuth",
"profile_oauth_no_clients": "Nie utworzy\u0142e\u015b \u017cadnych klient\u00f3w OAuth.",
"profile_oauth_clients_header": "Klienci",
@ -56,9 +56,9 @@
"profile_oauth_create_new_client": "Utw\u00f3rz nowego klienta",
"profile_oauth_create_client": "Utw\u00f3rz klienta",
"profile_oauth_edit_client": "Edytuj klienta",
"profile_oauth_name_help": "Something your users will recognize and trust.",
"profile_oauth_name_help": "Co\u015b, co Twoi u\u017cytkownicy b\u0119d\u0105 rozpoznawa\u0107 i ufa\u0107.",
"profile_oauth_redirect_url": "Przekierowanie URL",
"profile_oauth_redirect_url_help": "Your application's authorization callback URL.",
"profile_oauth_redirect_url_help": "Adres URL wywo\u0142ania zwrotnego autoryzacji aplikacji.",
"profile_authorized_apps": "Autoryzowane aplikacje",
"profile_authorized_clients": "Autoryzowani klienci",
"profile_scopes": "Zakresy",
@ -66,11 +66,13 @@
"profile_personal_access_tokens": "Osobiste tokeny dost\u0119pu",
"profile_personal_access_token": "Osobisty token dost\u0119pu",
"profile_personal_access_token_explanation": "Oto tw\u00f3j nowy osobisty token dost\u0119pu. Jest to jedyny raz, gdy zostanie wy\u015bwietlony, wi\u0119c nie zgub go! Mo\u017cesz teraz u\u017cy\u0107 tego tokenu, aby wykona\u0107 zapytania API.",
"profile_no_personal_access_token": "You have not created any personal access tokens.",
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_no_personal_access_token": "Nie utworzy\u0142e\u015b \u017cadnych osobistych token\u00f3w.",
"profile_create_new_token": "Utw\u00f3rz nowy token",
"profile_create_token": "Utw\u00f3rz token",
"profile_create": "Utw\u00f3rz",
"profile_save_changes": "Zapisz zmiany",
"default_group_title_name": "(bez grupy)",
"piggy_bank": "Skarbonka"
},
"form": {
"interest_date": "Data odsetek",

View File

@ -5,7 +5,7 @@
"flash_success": "Sucesso!",
"close": "Fechar",
"split_transaction_title": "Descri\u00e7\u00e3o da transa\u00e7\u00e3o dividida",
"errors_submission": "There was something wrong with your submission. Please check out the errors below.",
"errors_submission": "Tem alguma coisa de errada com o seu envio. Por favor, cheque os erros abaixo.",
"split": "Dividir",
"transaction_stored_link": "<a href=\"transactions\/show\/{ID}\">Transa\u00e7\u00e3o #{ID} (\"{title}\")<\/a> foi salva.",
"transaction_updated_link": "<a href=\"transactions\/show\/{ID}\">Transa\u00e7\u00e3o #{ID}<\/a> foi atualizada.",
@ -13,12 +13,12 @@
"transaction_journal_information": "Informa\u00e7\u00e3o da transa\u00e7\u00e3o",
"no_budget_pointer": "Parece que voc\u00ea ainda n\u00e3o tem or\u00e7amentos. Voc\u00ea deve criar alguns na p\u00e1gina de <a href=\"\/budgets\">or\u00e7amentos<\/a>. Or\u00e7amentos podem ajud\u00e1-lo a manter o controle das despesas.",
"source_account": "Conta origem",
"hidden_fields_preferences": "You can enable more transaction options in your <a href=\"\/preferences\">settings<\/a>.",
"hidden_fields_preferences": "Voc\u00ea pode ativar mais op\u00e7\u00f5es de transa\u00e7\u00f5es em suas <a href=\"\/preferences\">configura\u00e7\u00f5es<\/a>.",
"destination_account": "Conta destino",
"add_another_split": "Adicionar outra divis\u00e3o",
"submission": "Submission",
"create_another": "After storing, return here to create another one.",
"reset_after": "Reset form after submission",
"submission": "Envio",
"create_another": "Depois de armazenar, retorne aqui para criar outro.",
"reset_after": "Resetar o formul\u00e1rio ap\u00f3s o envio",
"submit": "Enviar",
"amount": "Valor",
"date": "Data",
@ -28,37 +28,37 @@
"attachments": "Anexos",
"notes": "Notas",
"update_transaction": "Atualizar transa\u00e7\u00e3o",
"after_update_create_another": "After updating, return here to continue editing.",
"after_update_create_another": "Depois de atualizar, retorne aqui para continuar editando.",
"store_as_new": "Store as a new transaction instead of updating.",
"split_title_help": "Se voc\u00ea criar uma transa\u00e7\u00e3o dividida, \u00e9 necess\u00e1rio haver uma descri\u00e7\u00e3o global para todas as partes da transa\u00e7\u00e3o.",
"none_in_select_list": "(nenhum)",
"no_piggy_bank": "(nenhum cofrinho)",
"description": "Descri\u00e7\u00e3o",
"split_transaction_title_help": "If you create a split transaction, there must be a global description for all splits of the transaction.",
"split_transaction_title_help": "Se voc\u00ea criar uma transa\u00e7\u00e3o dividida, deve haver uma descri\u00e7\u00e3o global para todas as partes da transa\u00e7\u00e3o.",
"destination_account_reconciliation": "Voc\u00ea n\u00e3o pode editar a conta de origem de uma transa\u00e7\u00e3o de reconcilia\u00e7\u00e3o.",
"source_account_reconciliation": "Voc\u00ea n\u00e3o pode editar a conta de origem de uma transa\u00e7\u00e3o de reconcilia\u00e7\u00e3o.",
"budget": "Or\u00e7amento",
"you_create_withdrawal": "You're creating a withdrawal.",
"you_create_transfer": "You're creating a transfer.",
"you_create_deposit": "You're creating a deposit.",
"you_create_withdrawal": "Voc\u00ea est\u00e1 criando uma retirada.",
"you_create_transfer": "Voc\u00ea est\u00e1 criando uma transfer\u00eancia.",
"you_create_deposit": "Voc\u00ea est\u00e1 criando um deposito.",
"edit": "Editar",
"delete": "Apagar",
"name": "Nome",
"profile_whoops": "Ops!",
"profile_something_wrong": "Alguma coisa deu errado!",
"profile_try_again": "Something went wrong. Please try again.",
"profile_oauth_clients": "OAuth Clients",
"profile_oauth_no_clients": "You have not created any OAuth clients.",
"profile_oauth_clients": "Clientes OAuth",
"profile_oauth_no_clients": "Voc\u00ea n\u00e3o criou nenhum cliente OAuth.",
"profile_oauth_clients_header": "Clientes",
"profile_oauth_client_id": "Client ID",
"profile_oauth_client_name": "Nome",
"profile_oauth_client_secret": "Segredo",
"profile_oauth_create_new_client": "Create New Client",
"profile_oauth_create_client": "Create Client",
"profile_oauth_create_new_client": "Criar um novo cliente",
"profile_oauth_create_client": "Criar um cliente",
"profile_oauth_edit_client": "Edit Client",
"profile_oauth_name_help": "Something your users will recognize and trust.",
"profile_oauth_redirect_url": "Redirect URL",
"profile_oauth_redirect_url_help": "Your application's authorization callback URL.",
"profile_oauth_name_help": "Alguma coisa que seus usu\u00e1rios v\u00e3o reconhecer e identificar.",
"profile_oauth_redirect_url": "URL de redirecionamento",
"profile_oauth_redirect_url_help": "A URL de retorno da sua solicita\u00e7\u00e3o de autoriza\u00e7\u00e3o.",
"profile_authorized_apps": "Authorized applications",
"profile_authorized_clients": "Clientes autorizados",
"profile_scopes": "Escopos",
@ -66,11 +66,13 @@
"profile_personal_access_tokens": "Tokens de acesso pessoal",
"profile_personal_access_token": "Token de acesso pessoal",
"profile_personal_access_token_explanation": "Here is your new personal access token. This is the only time it will be shown so don't lose it! You may now use this token to make API requests.",
"profile_no_personal_access_token": "You have not created any personal access tokens.",
"profile_no_personal_access_token": "Voc\u00ea n\u00e3o criou nenhum token de acesso pessoal.",
"profile_create_new_token": "Criar novo token",
"profile_create_token": "Criar token",
"profile_create": "Criar",
"profile_save_changes": "Salvar altera\u00e7\u00f5es"
"profile_save_changes": "Salvar altera\u00e7\u00f5es",
"default_group_title_name": "(n\u00e3o agrupado)",
"piggy_bank": "Cofrinho"
},
"form": {
"interest_date": "Data de interesse",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Creaz\u0103 un nou token",
"profile_create_token": "Creaz\u0103 token",
"profile_create": "Creaz\u0103",
"profile_save_changes": "Salveaz\u0103 modific\u0103rile"
"profile_save_changes": "Salveaz\u0103 modific\u0103rile",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Pu\u0219culi\u021b\u0103"
},
"form": {
"interest_date": "Data de interes",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(\u0431\u0435\u0437 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438)",
"piggy_bank": "\u041a\u043e\u043f\u0438\u043b\u043a\u0430"
},
"form": {
"interest_date": "\u0414\u0430\u0442\u0430 \u0432\u044b\u043f\u043b\u0430\u0442\u044b",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Piggy bank"
},
"form": {
"interest_date": "R\u00e4ntedatum",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "Kumbara"
},
"form": {
"interest_date": "Faiz tarihi",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "T\u1ea1o m\u00e3 m\u1edbi",
"profile_create_token": "T\u1ea1o m\u00e3",
"profile_create": "T\u1ea1o",
"profile_save_changes": "L\u01b0u thay \u0111\u1ed5i"
"profile_save_changes": "L\u01b0u thay \u0111\u1ed5i",
"default_group_title_name": "(ch\u01b0a nh\u00f3m)",
"piggy_bank": "Heo \u0111\u1ea5t"
},
"form": {
"interest_date": "Ng\u00e0y l\u00e3i",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "\u5b58\u94b1\u7f50"
},
"form": {
"interest_date": "\u5229\u7387\u65e5\u671f",

View File

@ -70,7 +70,9 @@
"profile_create_new_token": "Create new token",
"profile_create_token": "Create token",
"profile_create": "Create",
"profile_save_changes": "Save changes"
"profile_save_changes": "Save changes",
"default_group_title_name": "(ungrouped)",
"piggy_bank": "\u5c0f\u8c6c\u64b2\u6eff"
},
"form": {
"interest_date": "\u5229\u7387\u65e5\u671f",

View File

@ -61,4 +61,5 @@ return [
'telemetry_view' => 'Zobrazit telemetrii',
'edit_object_group' => 'Edit group ":title"',
'delete_object_group' => 'Delete group ":title"',
'logout_others' => 'Logout other sessions'
];

View File

@ -278,6 +278,8 @@ return [
'search_modifier_after' => 'Datum transakce je po :value',
'search_modifier_created_on' => 'Transaction was created on :value',
'search_modifier_updated_on' => 'Transaction was last updated on :value',
'search_modifier_external_id' => 'External ID is ":value"',
'search_modifier_internal_reference' => 'Internal reference is ":value"',
'modifiers_applies_are' => 'The following modifiers are applied to the search as well:',
'general_search_error' => 'An error occurred while searching. Please check the log files for more information.',
'search_box' => 'Hledat',
@ -616,6 +618,7 @@ return [
// profile:
'permanent_delete_stuff' => 'Be careful with these buttons. Deleting stuff is permanent.',
'other_sessions_logged_out' => 'All your other sessions have been logged out.',
'delete_all_budgets' => 'Delete ALL your budgets',
'delete_all_categories' => 'Smazat VŠECHNY vaše kategorie',
'delete_all_tags' => 'Smazat VŠECHNY vaše štítky',
@ -1136,6 +1139,7 @@ return [
'currency' => 'Měna',
'preferences' => 'Předvolby',
'logout' => 'Odhlásit se',
'logout_other_sessions' => 'Logout all other sessions',
'toggleNavigation' => 'Vyp/zap. navigaci',
'searchPlaceholder' => 'Hledat…',
'version' => 'Verze',
@ -1421,6 +1425,9 @@ return [
'send_message' => 'Poslat zprávu',
'send_test_triggered' => 'Test was triggered. Check your inbox and the log files.',
'give_admin_careful' => 'Users who are given admin rights can take away yours. Be careful.',
'admin_maintanance_title' => 'Maintenance',
'admin_maintanance_expl' => 'Some nifty buttons for Firefly III maintenance',
'admin_maintenance_clear_cache' => 'Clear cache',
'split_transaction_title' => 'Popis rozúčtování',
'split_transaction_title_help' => 'If you create a split transaction, there must be a global description for all splits of the transaction.',
@ -1506,9 +1513,6 @@ return [
'reset_after' => 'Reset form after submission',
'errors_submission' => 'There was something wrong with your submission. Please check out the errors below.',
// sandstorm.io errors and messages:
'sandstorm_not_available' => 'Tato funkce není k dispozici, když používáte Firefly III v prostředí Sandstorm.io.',
// object groups
'default_group_title_name' => '(ungrouped)',

View File

@ -61,4 +61,5 @@ return [
'telemetry_view' => 'Telemetrie anzeigen',
'edit_object_group' => 'Gruppe „:title” bearbeiten',
'delete_object_group' => 'Gruppe „:title” löschen',
'logout_others' => 'Alle anderen Sitzungen abmelden'
];

View File

@ -278,6 +278,8 @@ return [
'search_modifier_after' => 'Buchungsdatum ist nach :value',
'search_modifier_created_on' => 'Buchung wurde am :value erstellt',
'search_modifier_updated_on' => 'Buchung wurde zuletzt am :value aktualisiert',
'search_modifier_external_id' => 'Externe ID lautet „::value”',
'search_modifier_internal_reference' => 'Interne Referenz lautet „:value”',
'modifiers_applies_are' => 'Die folgenden Einschränkungen werden ebenfalls auf die Suche angewendet:',
'general_search_error' => 'Bei der Suche ist ein Fehler aufgetreten. Bitte überprüfen Sie die Protokolldateien für weitere Informationen.',
'search_box' => 'Suche',
@ -616,6 +618,7 @@ return [
// profile:
'permanent_delete_stuff' => 'Seien Sie vorsichtig mit diesen Schaltflächen. Das Löschen kann nicht widerrufen werden.',
'other_sessions_logged_out' => 'All your other sessions have been logged out.',
'delete_all_budgets' => 'ALLE Ihre Budgets löschen',
'delete_all_categories' => 'Alle Ihre Kategorien löschen',
'delete_all_tags' => 'Alle Ihre Stichwörter löschen',
@ -647,7 +650,7 @@ return [
'secure_pw_should' => 'Soll ich die Box ankreuzen?',
'secure_pw_long_password' => 'Ja. Damit vergewissern Sie sich immer, dass ihr Passwort sicher ist.',
'command_line_token' => 'Kommandozeilen-Authentifizierungsschlüssel',
'explain_command_line_token' => 'You need this token to perform command line options, such as exporting data. Without it, that sensitive command will not work. Do not share your command line token. Nobody will ask you for this token, not even me. If you fear you lost this, or when you\'re paranoid, regenerate this token using the button.',
'explain_command_line_token' => 'Sie benötigen dieses Token, um Kommandozeilenoptionen auszuführen, wie z. B. den Export von Daten. Ohne diese werden solche sensiblen Befehle nicht funktionieren. Teilen Sie Ihren Kommandozeilen-Authentifizierungsschlüssel nicht mit anderen. Niemand wird Sie um diesen Schlüssel bitten, nicht einmal ich. Wenn Sie befürchten, dass Sie diesen verloren haben, erneuern Sie den Schlüssel mit der Schaltfläche.',
'regenerate_command_line_token' => 'Kommandozeilen-Authentifizierungsschlüssel erneut generieren',
'token_regenerated' => 'Ein neuer Kommandozeilen-Authentifizierungsschlüssel wurde generiert',
'change_your_email' => 'E-Mail Adresse ändern',
@ -857,11 +860,11 @@ return [
'auto_budget_help' => 'Mehr über diese Funktion können Sie in der Hilfe nachlesen. Klicken Sie oben rechts auf das ❓-Symbol.',
'auto_budget_reset_icon' => 'Dieses Budget wird regelmäßig festgelegt',
'auto_budget_rollover_icon' => 'Der Budgetbetrag wird regelmäßig erhöht',
'remove_budgeted_amount' => 'Remove budgeted amount in :currency',
'remove_budgeted_amount' => 'Budgetbetrag in :currency entfernen',
// bills:
'not_expected_period' => 'Not expected this period',
'not_or_not_yet' => 'Not (yet)',
'not_expected_period' => 'In diesem Zeitraum nicht erwartet',
'not_or_not_yet' => '(Noch) nicht',
'match_between_amounts' => 'Rechnung passt zu Transaktionen zwischen :low und :high.',
'running_again_loss' => 'Zuvor verknüpfte Buchungen mit dieser Rechnung können ihre Verbindung verlieren, wenn sie (nicht mehr) der/den Regel(n) entsprechen.',
'bill_related_rules' => 'Regeln mit Verknüpfung zu dieser Rechnung',
@ -1136,6 +1139,7 @@ return [
'currency' => 'Währung',
'preferences' => 'Einstellungen',
'logout' => 'Abmelden',
'logout_other_sessions' => 'Alle anderen Sitzungen abmelden',
'toggleNavigation' => 'Navigation umschalten',
'searchPlaceholder' => 'Suchen...',
'version' => 'Version',
@ -1421,6 +1425,9 @@ return [
'send_message' => 'Nachricht senden',
'send_test_triggered' => 'Der Test wurde ausgelöst. Überprüfen Sie Ihren Posteingang und die Protokolldateien.',
'give_admin_careful' => 'Benutzer mit Admin-Rechten können Ihnen Ihre Rechte entziehen. Seien Sie vorsichtig.',
'admin_maintanance_title' => 'Wartungsarbeiten',
'admin_maintanance_expl' => 'Einige praktische Schaltflächen für die Wartung von Firefly III',
'admin_maintenance_clear_cache' => 'Cache leeren',
'split_transaction_title' => 'Beschreibung der Splittbuchung',
'split_transaction_title_help' => 'Wenn Sie eine Splittbuchung anlegen, muss es eine eindeutige Beschreibung für alle Aufteilungen der Buchung geben.',
@ -1506,11 +1513,8 @@ return [
'reset_after' => 'Formular nach der Übermittlung zurücksetzen',
'errors_submission' => 'Problem bei der Übermittlung. Bitte überprüfen Sie die nachfolgenden Fehler.',
// sandstorm.io errors and messages:
'sandstorm_not_available' => 'Diese Funktion ist nicht verfügbar, wenn Sie Firefly III in einer Sandstorm.io-Umgebung verwenden.',
// object groups
'default_group_title_name' => '(ungrouped)',
'default_group_title_name' => '(ohne Gruppierung)',
// empty lists? no objects? instructions:
'no_accounts_title_asset' => 'Lassen Sie uns jetzt ein Bestandskonto anlegen!',

File diff suppressed because one or more lines are too long

View File

@ -61,4 +61,5 @@ return [
'telemetry_view' => 'Προβολή τηλεμετρίας',
'edit_object_group' => 'Edit group ":title"',
'delete_object_group' => 'Delete group ":title"',
'logout_others' => 'Logout other sessions'
];

View File

@ -278,6 +278,8 @@ return [
'search_modifier_after' => 'Η ημερομηνία συναλλαγής είναι μετά τις :value',
'search_modifier_created_on' => 'Η συναλλαγή δημιουργήθηκε στις :value',
'search_modifier_updated_on' => 'Η συναλλαγή ενημερώθηκε στις :value',
'search_modifier_external_id' => 'External ID is ":value"',
'search_modifier_internal_reference' => 'Internal reference is ":value"',
'modifiers_applies_are' => 'Οι ακόλουθοι τροποποιητές εφαρμόστηκαν στην αναζήτηση επίσης:',
'general_search_error' => 'Ένα σφάλμα προέκυψε κατά την αναζήτηση. Παρακαλώ ελέγξτε τα αρχεία καταγραφής για περισσότερες πληροφορίες.',
'search_box' => 'Αναζήτηση',
@ -616,6 +618,7 @@ return [
// profile:
'permanent_delete_stuff' => 'Προσοχή με αυτά τα κουμπιά. Η διαγραφή είναι μόνιμη.',
'other_sessions_logged_out' => 'All your other sessions have been logged out.',
'delete_all_budgets' => 'Διαγραφή ΟΛΩΝ των προϋπολογισμών σας',
'delete_all_categories' => 'Διαγραφή ΟΛΩΝ των κατηγοριών',
'delete_all_tags' => 'Διαγραφή ΟΛΩΝ των ετικετών',
@ -1136,6 +1139,7 @@ return [
'currency' => 'Νόμισμα',
'preferences' => 'Προτιμήσεις',
'logout' => 'Αποσύνδεση',
'logout_other_sessions' => 'Logout all other sessions',
'toggleNavigation' => 'Εναλλαγή περιήγησης',
'searchPlaceholder' => 'Αναζήτηση...',
'version' => 'Έκδοση',
@ -1421,6 +1425,9 @@ return [
'send_message' => 'Αποστολή μηνύματος',
'send_test_triggered' => 'Η δοκιμή ενεργοποιήθηκε. Ελέγξτε τα εισερχόμενα μηνύματα στο Email σας και τα αρχεία καταγραφής.',
'give_admin_careful' => 'Οι χρήστες στους οποίους έχουν δοθεί δικαιώματα διαχειριστή μπορούν να καθαιρέσουν τη δική σας πρόσβαση. Ενεργήστε με προσοχή.',
'admin_maintanance_title' => 'Maintenance',
'admin_maintanance_expl' => 'Some nifty buttons for Firefly III maintenance',
'admin_maintenance_clear_cache' => 'Clear cache',
'split_transaction_title' => 'Περιγραφή της συναλλαγής με διαχωρισμό',
'split_transaction_title_help' => 'Εάν δημιουργήσετε μια διαχωρισμένη συναλλαγή, πρέπει να υπάρχει μια καθολική περιγραφή για όλους τους διαχωρισμούς της συναλλαγής.',
@ -1506,9 +1513,6 @@ return [
'reset_after' => 'Επαναφορά φόρμας μετά την υποβολή',
'errors_submission' => 'Υπήρξε κάποιο λάθος με την υποβολή σας. Ελέγξτε τα παρακάτω σφάλματα.',
// sandstorm.io errors and messages:
'sandstorm_not_available' => 'Αυτή η λειτουργία δεν είναι διαθέσιμη όταν χρησιμοποιείτε το Firefly III σε περιβάλλον Sandstorm.io.',
// object groups
'default_group_title_name' => '(ungrouped)',

File diff suppressed because one or more lines are too long

View File

@ -61,4 +61,5 @@ return [
'telemetry_view' => 'View telemetry',
'edit_object_group' => 'Edit group ":title"',
'delete_object_group' => 'Delete group ":title"',
'logout_others' => 'Logout other sessions'
];

Some files were not shown because too many files have changed in this diff Show More