Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Add and remove exchange rates
James Colef6e642f72ebb
diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php b/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.phpnew file mode 100644index 0000000000..f1575f0d4c--- /dev/null+++ b/app/Api/V2/Controllers/Model/ExchangeRate/DestroyController.php@@ -0,0 +1,66 @@+<?php+/*+ * DestroyController.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Controllers\Model\ExchangeRate;++use FireflyIII\Api\V2\Controllers\Controller;+use FireflyIII\Api\V2\Request\Model\ExchangeRate\DestroyRequest;+use FireflyIII\Models\TransactionCurrency;+use FireflyIII\Repositories\UserGroups\ExchangeRate\ExchangeRateRepositoryInterface;+use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;+use Illuminate\Http\JsonResponse;+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;++class DestroyController extends Controller+{+ use ValidatesUserGroupTrait;++ public const string RESOURCE_KEY = 'exchange-rates';++ private ExchangeRateRepositoryInterface $repository;++ public function __construct()+ {+ parent::__construct();+ $this->middleware(+ function ($request, $next) {+ $this->repository = app(ExchangeRateRepositoryInterface::class);+ $this->repository->setUserGroup($this->validateUserGroup($request));++ return $next($request);+ }+ );+ }++ public function destroy(DestroyRequest $request, TransactionCurrency $from, TransactionCurrency $to): JsonResponse+ {+ $date = $request->getDate();+ $rate = $this->repository->getSpecificRateOnDate($from, $to, $date);+ if (null === $rate) {+ throw new NotFoundHttpException();+ }+ $this->repository->deleteRate($rate);+ return response()->json([], 204);+ }++}diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php b/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.phpnew file mode 100644index 0000000000..4cc701320c--- /dev/null+++ b/app/Api/V2/Controllers/Model/ExchangeRate/StoreController.php@@ -0,0 +1,82 @@+<?php+/*+ * DestroyController.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Controllers\Model\ExchangeRate;++use FireflyIII\Api\V2\Controllers\Controller;+use FireflyIII\Api\V2\Request\Model\ExchangeRate\StoreRequest;+use FireflyIII\Api\V2\Request\Model\ExchangeRate\UpdateRequest;+use FireflyIII\Models\CurrencyExchangeRate;+use FireflyIII\Repositories\UserGroups\ExchangeRate\ExchangeRateRepositoryInterface;+use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;+use FireflyIII\Transformers\V2\ExchangeRateTransformer;+use Illuminate\Http\JsonResponse;++class StoreController extends Controller+{+ use ValidatesUserGroupTrait;++ public const string RESOURCE_KEY = 'exchange-rates';++ private ExchangeRateRepositoryInterface $repository;++ public function __construct()+ {+ parent::__construct();+ $this->middleware(+ function ($request, $next) {+ $this->repository = app(ExchangeRateRepositoryInterface::class);+ $this->repository->setUserGroup($this->validateUserGroup($request));++ return $next($request);+ }+ );+ }++ public function store(StoreRequest $request): JsonResponse+ {+ $date = $request->getDate();+ $rate = $request->getRate();+ $from = $request->getFromCurrency();+ $to = $request->getToCurrency();++ // already has rate?+ $object = $this->repository->getSpecificRateOnDate($from, $to, $date);+ if(null !== $object) {+ // just update it, no matter.+ $rate = $this->repository->updateExchangeRate($object, $rate, $date);+ }+ if(null === $object) {+ // store new+ $rate = $this->repository->storeExchangeRate($from, $to, $rate, $date);+ }++ $transformer = new ExchangeRateTransformer();+ $transformer->setParameters($this->parameters);++ return response()+ ->api($this->jsonApiObject(self::RESOURCE_KEY, $rate, $transformer))+ ->header('Content-Type', self::CONTENT_TYPE);+ }++}diff --git a/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php b/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.phpnew file mode 100644index 0000000000..367e17d96d--- /dev/null+++ b/app/Api/V2/Controllers/Model/ExchangeRate/UpdateController.php@@ -0,0 +1,69 @@+<?php+/*+ * DestroyController.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Controllers\Model\ExchangeRate;++use FireflyIII\Api\V2\Controllers\Controller;+use FireflyIII\Api\V2\Request\Model\ExchangeRate\UpdateRequest;+use FireflyIII\Models\CurrencyExchangeRate;+use FireflyIII\Repositories\UserGroups\ExchangeRate\ExchangeRateRepositoryInterface;+use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;+use FireflyIII\Transformers\V2\ExchangeRateTransformer;+use Illuminate\Http\JsonResponse;+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;++class UpdateController extends Controller+{+ use ValidatesUserGroupTrait;++ public const string RESOURCE_KEY = 'exchange-rates';++ private ExchangeRateRepositoryInterface $repository;++ public function __construct()+ {+ parent::__construct();+ $this->middleware(+ function ($request, $next) {+ $this->repository = app(ExchangeRateRepositoryInterface::class);+ $this->repository->setUserGroup($this->validateUserGroup($request));++ return $next($request);+ }+ );+ }++ public function update(UpdateRequest $request, CurrencyExchangeRate $exchangeRate): JsonResponse+ {+ $date = $request->getDate();+ $rate = $request->getRate();+ $exchangeRate = $this->repository->updateExchangeRate($exchangeRate, $rate, $date);+ $transformer = new ExchangeRateTransformer();+ $transformer->setParameters($this->parameters);++ return response()+ ->api($this->jsonApiObject(self::RESOURCE_KEY, $exchangeRate, $transformer))+ ->header('Content-Type', self::CONTENT_TYPE);+ }++}diff --git a/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php b/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.phpnew file mode 100644index 0000000000..0db1d18b3e--- /dev/null+++ b/app/Api/V2/Request/Model/ExchangeRate/DestroyRequest.php@@ -0,0 +1,51 @@+<?php+/*+ * DestroyRequest.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Request\Model\ExchangeRate;++use Carbon\Carbon;+use FireflyIII\Support\Request\ChecksLogin;+use FireflyIII\Support\Request\ConvertsDataTypes;+use Illuminate\Foundation\Http\FormRequest;++class DestroyRequest extends FormRequest+{+ use ChecksLogin;+ use ConvertsDataTypes;++ public function getDate(): Carbon+ {+ return $this->getCarbonDate('date');+ }++ /**+ * The rules that the incoming request must be matched against.+ */+ public function rules(): array+ {+ return [+ 'date' => 'required|date|after:1900-01-01|before:2099-12-31',+ ];+ }++}diff --git a/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php b/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.phpnew file mode 100644index 0000000000..16ae36cdf3--- /dev/null+++ b/app/Api/V2/Request/Model/ExchangeRate/StoreRequest.php@@ -0,0 +1,67 @@+<?php+/*+ * DestroyRequest.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Request\Model\ExchangeRate;++use Carbon\Carbon;+use FireflyIII\Models\TransactionCurrency;+use FireflyIII\Support\Request\ChecksLogin;+use FireflyIII\Support\Request\ConvertsDataTypes;+use Illuminate\Foundation\Http\FormRequest;++class StoreRequest extends FormRequest+{+ use ChecksLogin;+ use ConvertsDataTypes;++ public function getDate(): ?Carbon+ {+ return $this->getCarbonDate('date');+ }++ public function getRate(): string+ {+ return (string) $this->get('rate');+ }++ public function getFromCurrency(): TransactionCurrency {+ return TransactionCurrency::where('code', $this->get('from'))->first();+ }+ public function getToCurrency(): TransactionCurrency {+ return TransactionCurrency::where('code', $this->get('to'))->first();+ }++ /**+ * The rules that the incoming request must be matched against.+ */+ public function rules(): array+ {+ return [+ 'date' => 'required|date|after:1900-01-01|before:2099-12-31',+ 'rate' => 'required|numeric|gt:0',+ 'from' => 'required|exists:transaction_currencies,code',+ 'to' => 'required|exists:transaction_currencies,code',+ ];+ }++}diff --git a/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php b/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.phpnew file mode 100644index 0000000000..7bda832ba4--- /dev/null+++ b/app/Api/V2/Request/Model/ExchangeRate/UpdateRequest.php@@ -0,0 +1,56 @@+<?php+/*+ * DestroyRequest.php+ * Copyright (c) 2024 [email protected].+ *+ * 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\Api\V2\Request\Model\ExchangeRate;++use Carbon\Carbon;+use FireflyIII\Support\Request\ChecksLogin;+use FireflyIII\Support\Request\ConvertsDataTypes;+use Illuminate\Foundation\Http\FormRequest;++class UpdateRequest extends FormRequest+{+ use ChecksLogin;+ use ConvertsDataTypes;++ public function getDate(): ?Carbon+ {+ return $this->getCarbonDate('date');+ }++ public function getRate(): string {+ return (string) $this->get('rate');+ }++ /**+ * The rules that the incoming request must be matched against.+ */+ public function rules(): array+ {+ return [+ 'date' => 'date|after:1900-01-01|before:2099-12-31',+ 'rate' => 'required|numeric|gt:0',+ ];+ }++}diff --git a/app/Console/Commands/Integrity/UpdateGroupInformation.php b/app/Console/Commands/Integrity/UpdateGroupInformation.phpindex 57df0f52a6..3be6c7ee0d 100644--- a/app/Console/Commands/Integrity/UpdateGroupInformation.php+++ b/app/Console/Commands/Integrity/UpdateGroupInformation.php@@ -79,7 +79,7 @@ class UpdateGroupInformation extends Command{$group = $user->userGroup;if (null === $group) {- $this->friendlyWarning(sprintf('User "%s" has no group.', $user->email));+ $this->friendlyWarning(sprintf('User "%s" has no group. Please run "php artisan firefly-iii:create-group-memberships"', $user->email));return;}diff --git a/app/Factory/PiggyBankEventFactory.php b/app/Factory/PiggyBankEventFactory.phpindex 5ae8ed384e..7cfed006a5 100644--- a/app/Factory/PiggyBankEventFactory.php+++ b/app/Factory/PiggyBankEventFactory.php@@ -47,20 +47,13 @@ class PiggyBankEventFactory$piggyRepos = app(PiggyBankRepositoryInterface::class);$piggyRepos->setUser($journal->user);- $repetition = $piggyRepos->getRepetition($piggyBank);- if (null === $repetition) {- app('log')->error(sprintf('No piggy bank repetition on %s!', $journal->date->format('Y-m-d')));-- return;- }- app('log')->debug('Found repetition');- $amount = $piggyRepos->getExactAmount($piggyBank, $repetition, $journal);+ $amount = $piggyRepos->getExactAmount($piggyBank, $journal);if (0 === bccomp($amount, '0')) {app('log')->debug('Amount is zero, will not create event.');return;}// amount can be negative here- $piggyRepos->addAmountToRepetition($repetition, $amount, $journal);+ $piggyRepos->addAmountToPiggyBank($piggyBank, $amount, $journal);}}diff --git a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php b/app/Repositories/PiggyBank/ModifiesPiggyBanks.phpindex b3b13cc049..0722f69bf1 100644--- a/app/Repositories/PiggyBank/ModifiesPiggyBanks.php+++ b/app/Repositories/PiggyBank/ModifiesPiggyBanks.php@@ -30,7 +30,7 @@ use FireflyIII\Factory\PiggyBankFactory;use FireflyIII\Models\Account;use FireflyIII\Models\Note;use FireflyIII\Models\PiggyBank;-use FireflyIII\Models\PiggyBankRepetition;+use FireflyIII\Models\Transaction;use FireflyIII\Models\TransactionJournal;use FireflyIII\Repositories\ObjectGroup\CreatesObjectGroups;use FireflyIII\Support\Http\Api\ExchangeRateConverter;@@ -43,17 +43,20 @@ trait ModifiesPiggyBanks{use CreatesObjectGroups;- public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void+ public function addAmountToPiggyBank(PiggyBank $piggyBank, string $amount, TransactionJournal $journal): void{- throw new FireflyException('[a] Piggy bank repetitions are EOL.');- Log::debug(sprintf('addAmountToRepetition: %s', $amount));+ Log::debug(sprintf('addAmountToPiggyBank: %s', $amount));if (-1 === bccomp($amount, '0')) {+ /** @var Transaction $source */+ $source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first();Log::debug('Remove amount.');- $this->removeAmount($repetition->piggyBank, bcmul($amount, '-1'), $journal);+ $this->removeAmount($piggyBank, $source->account, bcmul($amount, '-1'), $journal);}if (1 === bccomp($amount, '0')) {+ /** @var Transaction $destination */+ $destination = $journal->transactions()->with(['account'])->where('amount', '>', 0)->first();Log::debug('Add amount.');- $this->addAmount($repetition->piggyBank, $amount, $journal);+ $this->addAmount($piggyBank, $destination->account, $amount, $journal);}}@@ -65,9 +68,9 @@ trait ModifiesPiggyBanks$pivot->native_current_amount = null;// also update native_current_amount.- $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);+ $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);if ($userCurrency->id !== $piggyBank->transaction_currency_id) {- $converter = new ExchangeRateConverter();+ $converter = new ExchangeRateConverter();$converter->setIgnoreSettings(true);$pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount);}@@ -88,9 +91,9 @@ trait ModifiesPiggyBanks$pivot->native_current_amount = null;// also update native_current_amount.- $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);+ $userCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);if ($userCurrency->id !== $piggyBank->transaction_currency_id) {- $converter = new ExchangeRateConverter();+ $converter = new ExchangeRateConverter();$converter->setIgnoreSettings(true);$pivot->native_current_amount = $converter->convert($piggyBank->transactionCurrency, $userCurrency, today(), $pivot->current_amount);}@@ -122,8 +125,8 @@ trait ModifiesPiggyBanksLog::debug(sprintf('Maximum amount: %s', $maxAmount));}- $compare = bccomp($amount, $maxAmount);- $result = $compare <= 0;+ $compare = bccomp($amount, $maxAmount);+ $result = $compare <= 0;Log::debug(sprintf('Compare <= 0? %d, so canAddAmount is %s', $compare, var_export($result, true)));@@ -157,11 +160,11 @@ trait ModifiesPiggyBankspublic function setCurrentAmount(PiggyBank $piggyBank, string $amount): PiggyBank{- $repetition = $this->getRepetition($piggyBank);+ $repetition = $this->getRepetition($piggyBank);if (null === $repetition) {return $piggyBank;}- $max = $piggyBank->target_amount;+ $max = $piggyBank->target_amount;if (1 === bccomp($amount, $max) && 0 !== bccomp($piggyBank->target_amount, '0')) {$amount = $max;}@@ -204,14 +207,14 @@ trait ModifiesPiggyBankspublic function update(PiggyBank $piggyBank, array $data): PiggyBank{- $piggyBank = $this->updateProperties($piggyBank, $data);+ $piggyBank = $this->updateProperties($piggyBank, $data);if (array_key_exists('notes', $data)) {$this->updateNote($piggyBank, (string) $data['notes']);}// update the order of the piggy bank:- $oldOrder = $piggyBank->order;- $newOrder = (int) ($data['order'] ?? $oldOrder);+ $oldOrder = $piggyBank->order;+ $newOrder = (int) ($data['order'] ?? $oldOrder);if ($oldOrder !== $newOrder) {$this->setOrder($piggyBank, $newOrder);}@@ -303,7 +306,7 @@ trait ModifiesPiggyBanksreturn;}- $dbNote = $piggyBank->notes()->first();+ $dbNote = $piggyBank->notes()->first();if (null === $dbNote) {$dbNote = new Note();$dbNote->noteable()->associate($piggyBank);@@ -314,16 +317,15 @@ trait ModifiesPiggyBankspublic function setOrder(PiggyBank $piggyBank, int $newOrder): bool{- $oldOrder = $piggyBank->order;+ $oldOrder = $piggyBank->order;// Log::debug(sprintf('Will move piggy bank #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder));if ($newOrder > $oldOrder) {PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')- ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')- ->where('accounts.user_id', $this->user->id)- ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder)- ->where('piggy_banks.id', '!=', $piggyBank->id)- ->distinct()->decrement('piggy_banks.order')- ;+ ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')+ ->where('accounts.user_id', $this->user->id)+ ->where('piggy_banks.order', '<=', $newOrder)->where('piggy_banks.order', '>', $oldOrder)+ ->where('piggy_banks.id', '!=', $piggyBank->id)+ ->distinct()->decrement('piggy_banks.order');$piggyBank->order = $newOrder;Log::debug(sprintf('[1] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder));@@ -332,12 +334,11 @@ trait ModifiesPiggyBanksreturn true;}PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')- ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')- ->where('accounts.user_id', $this->user->id)- ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder)- ->where('piggy_banks.id', '!=', $piggyBank->id)- ->distinct()->increment('piggy_banks.order')- ;+ ->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')+ ->where('accounts.user_id', $this->user->id)+ ->where('piggy_banks.order', '>=', $newOrder)->where('piggy_banks.order', '<', $oldOrder)+ ->where('piggy_banks.id', '!=', $piggyBank->id)+ ->distinct()->increment('piggy_banks.order');$piggyBank->order = $newOrder;Log::debug(sprintf('[2] Order of piggy #%d ("%s") from %d to %d', $piggyBank->id, $piggyBank->name, $oldOrder, $newOrder));diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.phpindex 37862c0a3c..127077083d 100644--- a/app/Repositories/PiggyBank/PiggyBankRepository.php+++ b/app/Repositories/PiggyBank/PiggyBankRepository.php@@ -129,10 +129,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface** @throws FireflyException*/- public function getExactAmount(PiggyBank $piggyBank, PiggyBankRepetition $repetition, TransactionJournal $journal): string+ public function getExactAmount(PiggyBank $piggyBank, TransactionJournal $journal): string{- throw new FireflyException('[c] Piggy bank repetitions are EOL.');- app('log')->debug(sprintf('Now in getExactAmount(%d, %d, %d)', $piggyBank->id, $repetition->id, $journal->id));+ app('log')->debug(sprintf('Now in getExactAmount(%d, %d)', $piggyBank->id, $journal->id));$operator = null;$currency = null;@@ -146,9 +145,8 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface$accountRepos->setUser($this->user);$defaultCurrency = app('amount')->getDefaultCurrencyByUserGroup($this->user->userGroup);- $piggyBankCurrency = $accountRepos->getAccountCurrency($piggyBank->account) ?? $defaultCurrency;- app('log')->debug(sprintf('Piggy bank #%d currency is %s', $piggyBank->id, $piggyBankCurrency->code));+ app('log')->debug(sprintf('Piggy bank #%d currency is %s', $piggyBank->id, $piggyBank->transactionCurrency->code));/** @var Transaction $source */$source = $journal->transactions()->with(['account'])->where('amount', '<', 0)->first();@@ -192,8 +190,9 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface}app('log')->debug(sprintf('The currency is %s and the amount is %s', $currency->code, $amount));- $room = bcsub($piggyBank->target_amount, $repetition->current_amount);- $compare = bcmul($repetition->current_amount, '-1');+ $currentAmount = $this->getCurrentAmount($piggyBank);+ $room = bcsub($piggyBank->target_amount, $currentAmount);+ $compare = bcmul($currentAmount, '-1');if (0 === bccomp($piggyBank->target_amount, '0')) {// amount is zero? then the "room" is positive amount of we wish to add or remove.@@ -215,7 +214,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface// amount is negative and $currentAmount is smaller than $amountif (-1 === bccomp($amount, '0') && 1 === bccomp($compare, $amount)) {- app('log')->debug(sprintf('Max amount to remove is %f', $repetition->current_amount));+ app('log')->debug(sprintf('Max amount to remove is %f', $currentAmount));app('log')->debug(sprintf('Cannot remove %f from piggy bank #%d ("%s")', $amount, $piggyBank->id, $piggyBank->name));app('log')->debug(sprintf('New amount is %f', $compare));diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.phpindex 739a830c8b..26486227ed 100644--- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php+++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php@@ -40,7 +40,7 @@ interface PiggyBankRepositoryInterface{public function addAmount(PiggyBank $piggyBank, Account $account, string $amount, ?TransactionJournal $journal = null): bool;- public function addAmountToRepetition(PiggyBankRepetition $repetition, string $amount, TransactionJournal $journal): void;+ public function addAmountToPiggyBank(PiggyBank $piggyBank, string $amount, TransactionJournal $journal): void;public function canAddAmount(PiggyBank $piggyBank, Account $account, string $amount): bool;@@ -80,7 +80,7 @@ interface PiggyBankRepositoryInterface/*** Used for connecting to a piggy bank.*/- public function getExactAmount(PiggyBank $piggyBank, PiggyBankRepetition $repetition, TransactionJournal $journal): string;+ public function getExactAmount(PiggyBank $piggyBank, TransactionJournal $journal): string;/*** Return note for piggy bank.diff --git a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.phpindex a528cddb88..727cae0dd6 100644--- a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php+++ b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepository.php@@ -24,6 +24,8 @@ declare(strict_types=1);namespace FireflyIII\Repositories\UserGroups\ExchangeRate;+use Carbon\Carbon;+use FireflyIII\Models\CurrencyExchangeRate;use FireflyIII\Models\TransactionCurrency;use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;use Illuminate\Database\Eloquent\Builder;@@ -39,19 +41,57 @@ class ExchangeRateRepository implements ExchangeRateRepositoryInterface// orderBy('date', 'DESC')->toRawSql();return$this->userGroup->currencyExchangeRates()- ->where(function (Builder $q1) use ($from, $to): void {- $q1->where(function (Builder $q) use ($from, $to): void {- $q->where('from_currency_id', $from->id)+ ->where(function (Builder $q1) use ($from, $to): void {+ $q1->where(function (Builder $q) use ($from, $to): void {+ $q->where('from_currency_id', $from->id)+ ->where('to_currency_id', $to->id);+ })->orWhere(function (Builder $q) use ($from, $to): void {+ $q->where('from_currency_id', $to->id)+ ->where('to_currency_id', $from->id);+ });+ })+ ->orderBy('date', 'DESC')+ ->get(['currency_exchange_rates.*']);++ }++ #[\Override] public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate+ {+ return+ $this->userGroup->currencyExchangeRates()+ ->where('from_currency_id', $from->id)->where('to_currency_id', $to->id)- ;- })->orWhere(function (Builder $q) use ($from, $to): void {- $q->where('from_currency_id', $to->id)- ->where('to_currency_id', $from->id)- ;- });- })- ->orderBy('date', 'DESC')->get(['currency_exchange_rates.*'])- ;+ ->where('date', $date->format('Y-m-d'))+ ->first();+ }++ #[\Override] public function deleteRate(CurrencyExchangeRate $rate): void+ {+ $this->userGroup->currencyExchangeRates()->where('id', $rate->id)->delete();+ }++ #[\Override] public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate+ {+ $object->rate = $rate;+ if (null !== $date) {+ $object->date = $date;+ }+ $object->save();+ return $object;+ }++ #[\Override] public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate+ {+ $object = new CurrencyExchangeRate();+ $object->user_id = auth()->user()->id;+ $object->user_group_id = $this->userGroup->id;+ $object->from_currency_id = $from->id;+ $object->to_currency_id = $to->id;+ $object->rate = $rate;+ $object->date = $date;+ $object->date_tz = $date->format('e');+ $object->save();+ return $object;}}diff --git a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.phpindex 7390261e34..e5c1035f42 100644--- a/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php+++ b/app/Repositories/UserGroups/ExchangeRate/ExchangeRateRepositoryInterface.php@@ -24,10 +24,21 @@ declare(strict_types=1);namespace FireflyIII\Repositories\UserGroups\ExchangeRate;+use Carbon\Carbon;+use FireflyIII\Models\CurrencyExchangeRate;use FireflyIII\Models\TransactionCurrency;use Illuminate\Support\Collection;interface ExchangeRateRepositoryInterface{public function getRates(TransactionCurrency $from, TransactionCurrency $to): Collection;++ public function getSpecificRateOnDate(TransactionCurrency $from, TransactionCurrency $to, Carbon $date): ?CurrencyExchangeRate;++ public function deleteRate(CurrencyExchangeRate $rate): void;++ public function updateExchangeRate(CurrencyExchangeRate $object, string $rate, ?Carbon $date = null): CurrencyExchangeRate;++ public function storeExchangeRate(TransactionCurrency $from, TransactionCurrency $to, string $rate, Carbon $date): CurrencyExchangeRate;+}diff --git a/app/Support/Binder/UserGroupExchangeRate.php b/app/Support/Binder/UserGroupExchangeRate.phpnew file mode 100644index 0000000000..af5a23cc5a--- /dev/null+++ b/app/Support/Binder/UserGroupExchangeRate.php@@ -0,0 +1,51 @@+<?php++/**+ * UserGroupTransaction.php+ * Copyright (c) 2024 [email protected]+ *+ * 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\Support\Binder;++use FireflyIII\Models\CurrencyExchangeRate;+use FireflyIII\User;+use Illuminate\Routing\Route;+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;++/**+ * Class UserGroupTransaction.+ */+class UserGroupExchangeRate implements BinderInterface+{+ public static function routeBinder(string $value, Route $route): CurrencyExchangeRate+ {+ if (auth()->check()) {+ /** @var User $user */+ $user = auth()->user();+ $rate = CurrencyExchangeRate::where('id', (int) $value)+ ->where('user_group_id', $user->user_group_id)+ ->first();+ if (null !== $rate) {+ return $rate;+ }+ }++ throw new NotFoundHttpException();+ }+}diff --git a/app/Support/Domain.php b/app/Support/Domain.phpindex c37a70e431..b193717884 100644--- a/app/Support/Domain.php+++ b/app/Support/Domain.php@@ -30,7 +30,7 @@ class Domain{public static function getBindables(): array{- return config('firefly.bindables');+ return config('bindables.bindables');}public static function getRuleActions(): arraydiff --git a/app/Support/Preferences.php b/app/Support/Preferences.phpindex 4bc5127e7e..46bca8be78 100644--- a/app/Support/Preferences.php+++ b/app/Support/Preferences.php@@ -47,16 +47,15 @@ class Preferences}return Preference::where('user_id', $user->id)- ->where('name', '!=', 'currencyPreference')- ->where(function (Builder $q) use ($user): void {- $q->whereNull('user_group_id');- $q->orWhere('user_group_id', $user->user_group_id);- })- ->get()- ;+ ->where('name', '!=', 'currencyPreference')+ ->where(function (Builder $q) use ($user): void {+ $q->whereNull('user_group_id');+ $q->orWhere('user_group_id', $user->user_group_id);+ })+ ->get();}- public function get(string $name, null|array|bool|int|string $default = null): ?Preference+ public function get(string $name, null | array | bool | int | string $default = null): ?Preference{/** @var null|User $user */$user = auth()->user();@@ -70,7 +69,7 @@ class Preferencesreturn $this->getForUser($user, $name, $default);}- public function getForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference+ public function getForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference{// don't care about user group ID, except for some specific preferences.$userGroupId = $this->getUserGroupId($user, $name);@@ -122,14 +121,16 @@ class PreferencesCache::put($key, '', 5);}- public function setForUser(User $user, string $name, null|array|bool|int|string $value): Preference+ public function setForUser(User $user, string $name, null | array | bool | int | string $value): Preference{- $fullName = sprintf('preference%s%s', $user->id, $name);- $groupId = $this->getUserGroupId($user, $name);+ $fullName = sprintf('preference%s%s', $user->id, $name);+ $groupId = $this->getUserGroupId($user, $name);+ $groupId = 0 === (int)$groupId ? null : (int) $groupId;+Cache::forget($fullName);/** @var null|Preference $pref */- $pref = Preference::where('user_group_id', $groupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']);+ $pref = Preference::where('user_group_id', $groupId)->where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']);if (null !== $pref && null === $value) {$pref->delete();@@ -144,6 +145,7 @@ class Preferences$pref->user_id = (int) $user->id;$pref->user_group_id = $groupId;$pref->name = $name;+}$pref->data = $value;$pref->save();@@ -171,13 +173,12 @@ class Preferences{$result = [];$preferences = Preference::where('user_id', $user->id)- ->where(function (Builder $q) use ($user): void {- $q->whereNull('user_group_id');- $q->orWhere('user_group_id', $user->user_group_id);- })- ->whereIn('name', $list)- ->get(['id', 'name', 'data'])- ;+ ->where(function (Builder $q) use ($user): void {+ $q->whereNull('user_group_id');+ $q->orWhere('user_group_id', $user->user_group_id);+ })+ ->whereIn('name', $list)+ ->get(['id', 'name', 'data']);/** @var Preference $preference */foreach ($preferences as $preference) {@@ -215,7 +216,7 @@ class Preferencesreturn $result;}- public function getEncryptedForUser(User $user, string $name, null|array|bool|int|string $default = null): ?Preference+ public function getEncryptedForUser(User $user, string $name, null | array | bool | int | string $default = null): ?Preference{$result = $this->getForUser($user, $name, $default);if ('' === $result->data) {@@ -236,7 +237,7 @@ class Preferencesreturn $result;}- public function getFresh(string $name, null|array|bool|int|string $default = null): ?Preference+ public function getFresh(string $name, null | array | bool | int | string $default = null): ?Preference{/** @var null|User $user */$user = auth()->user();@@ -287,7 +288,7 @@ class Preferencesreturn $this->set($name, $encrypted);}- public function set(string $name, null|array|bool|int|string $value): Preference+ public function set(string $name, null | array | bool | int | string $value): Preference{/** @var null|User $user */$user = auth()->user();diff --git a/config/bindables.php b/config/bindables.phpnew file mode 100644index 0000000000..fc660382e7--- /dev/null+++ b/config/bindables.php@@ -0,0 +1,126 @@+<?php+/*+ * bindables.php+ * Copyright (c) 2024 [email protected].+ *+ * 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);++use FireflyIII\Models\Account;+use FireflyIII\Models\Attachment;+use FireflyIII\Models\AvailableBudget;+use FireflyIII\Models\Bill;+use FireflyIII\Models\Budget;+use FireflyIII\Models\BudgetLimit;+use FireflyIII\Models\Category;+use FireflyIII\Models\InvitedUser;+use FireflyIII\Models\LinkType;+use FireflyIII\Models\ObjectGroup;+use FireflyIII\Models\PiggyBank;+use FireflyIII\Models\Preference;+use FireflyIII\Models\Recurrence;+use FireflyIII\Models\Rule;+use FireflyIII\Models\RuleGroup;+use FireflyIII\Models\Tag;+use FireflyIII\Models\TransactionCurrency;+use FireflyIII\Models\TransactionGroup;+use FireflyIII\Models\TransactionJournal;+use FireflyIII\Models\TransactionJournalLink;+use FireflyIII\Models\TransactionType;+use FireflyIII\Models\UserGroup;+use FireflyIII\Models\Webhook;+use FireflyIII\Models\WebhookAttempt;+use FireflyIII\Models\WebhookMessage;+use FireflyIII\Support\Binder\AccountList;+use FireflyIII\Support\Binder\BudgetList;+use FireflyIII\Support\Binder\CategoryList;+use FireflyIII\Support\Binder\CLIToken;+use FireflyIII\Support\Binder\CurrencyCode;+use FireflyIII\Support\Binder\Date;+use FireflyIII\Support\Binder\DynamicConfigKey;+use FireflyIII\Support\Binder\EitherConfigKey;+use FireflyIII\Support\Binder\JournalList;+use FireflyIII\Support\Binder\TagList;+use FireflyIII\Support\Binder\TagOrId;+use FireflyIII\Support\Binder\UserGroupAccount;+use FireflyIII\Support\Binder\UserGroupBill;+use FireflyIII\Support\Binder\UserGroupExchangeRate;+use FireflyIII\Support\Binder\UserGroupTransaction;+use FireflyIII\User;++return [+ 'bindables' => [+ // models+ 'account' => Account::class,+ 'attachment' => Attachment::class,+ 'availableBudget' => AvailableBudget::class,+ 'bill' => Bill::class,+ 'budget' => Budget::class,+ 'budgetLimit' => BudgetLimit::class,+ 'category' => Category::class,+ 'linkType' => LinkType::class,+ 'transactionType' => TransactionType::class,+ 'journalLink' => TransactionJournalLink::class,+ 'currency' => TransactionCurrency::class,+ 'objectGroup' => ObjectGroup::class,+ 'piggyBank' => PiggyBank::class,+ 'preference' => Preference::class,+ 'tj' => TransactionJournal::class,+ 'tag' => Tag::class,+ 'recurrence' => Recurrence::class,+ 'rule' => Rule::class,+ 'ruleGroup' => RuleGroup::class,+ 'transactionGroup' => TransactionGroup::class,+ 'user' => User::class,+ 'webhook' => Webhook::class,+ 'webhookMessage' => WebhookMessage::class,+ 'webhookAttempt' => WebhookAttempt::class,+ 'invitedUser' => InvitedUser::class,++ // strings+ 'currency_code' => CurrencyCode::class,++ // dates+ 'start_date' => Date::class,+ 'end_date' => Date::class,+ 'date' => Date::class,++ // lists+ 'accountList' => AccountList::class,+ 'doubleList' => AccountList::class,+ 'budgetList' => BudgetList::class,+ 'journalList' => JournalList::class,+ 'categoryList' => CategoryList::class,+ 'tagList' => TagList::class,++ // others+ 'fromCurrencyCode' => CurrencyCode::class,+ 'toCurrencyCode' => CurrencyCode::class,+ 'cliToken' => CLIToken::class,+ 'tagOrId' => TagOrId::class,+ 'dynamicConfigKey' => DynamicConfigKey::class,+ 'eitherConfigKey' => EitherConfigKey::class,++ // V2 API endpoints:+ 'userGroupAccount' => UserGroupAccount::class,+ 'userGroupTransaction' => UserGroupTransaction::class,+ 'userGroupBill' => UserGroupBill::class,+ 'userGroupExchangeRate' => UserGroupExchangeRate::class,+ 'userGroup' => UserGroup::class,+],+];diff --git a/config/firefly.php b/config/firefly.phpindex 33fd2f4360..82b079c994 100644--- a/config/firefly.php+++ b/config/firefly.php@@ -63,6 +63,7 @@ use FireflyIII\Support\Binder\TagList;use FireflyIII\Support\Binder\TagOrId;use FireflyIII\Support\Binder\UserGroupAccount;use FireflyIII\Support\Binder\UserGroupBill;+use FireflyIII\Support\Binder\UserGroupExchangeRate;use FireflyIII\Support\Binder\UserGroupTransaction;use FireflyIII\TransactionRules\Actions\AddTag;use FireflyIII\TransactionRules\Actions\ClearBudget;@@ -427,64 +428,7 @@ return ['transfers' => 'fa-exchange',],- 'bindables' => [- // models- 'account' => Account::class,- 'attachment' => Attachment::class,- 'availableBudget' => AvailableBudget::class,- 'bill' => Bill::class,- 'budget' => Budget::class,- 'budgetLimit' => BudgetLimit::class,- 'category' => Category::class,- 'linkType' => LinkType::class,- 'transactionType' => TransactionTypeModel::class,- 'journalLink' => TransactionJournalLink::class,- 'currency' => TransactionCurrency::class,- 'objectGroup' => ObjectGroup::class,- 'piggyBank' => PiggyBank::class,- 'preference' => Preference::class,- 'tj' => TransactionJournal::class,- 'tag' => Tag::class,- 'recurrence' => Recurrence::class,- 'rule' => Rule::class,- 'ruleGroup' => RuleGroup::class,- 'transactionGroup' => TransactionGroup::class,- 'user' => User::class,- 'webhook' => Webhook::class,- 'webhookMessage' => WebhookMessage::class,- 'webhookAttempt' => WebhookAttempt::class,- 'invitedUser' => InvitedUser::class,-- // strings- 'currency_code' => CurrencyCode::class,- // dates- 'start_date' => Date::class,- 'end_date' => Date::class,- 'date' => Date::class,-- // lists- 'accountList' => AccountList::class,- 'doubleList' => AccountList::class,- 'budgetList' => BudgetList::class,- 'journalList' => JournalList::class,- 'categoryList' => CategoryList::class,- 'tagList' => TagList::class,-- // others- 'fromCurrencyCode' => CurrencyCode::class,- 'toCurrencyCode' => CurrencyCode::class,- 'cliToken' => CLIToken::class,- 'tagOrId' => TagOrId::class,- 'dynamicConfigKey' => DynamicConfigKey::class,- 'eitherConfigKey' => EitherConfigKey::class,-- // V2 API endpoints:- 'userGroupAccount' => UserGroupAccount::class,- 'userGroupTransaction' => UserGroupTransaction::class,- 'userGroupBill' => UserGroupBill::class,- 'userGroup' => UserGroup::class,- ],'rule-actions' => ['set_category' => SetCategory::class,'clear_category' => ClearCategory::class,diff --git a/config/translations.php b/config/translations.phpindex 8b40d4b1fb..a9c2c9152c 100644--- a/config/translations.php+++ b/config/translations.php@@ -274,12 +274,18 @@ return ['exchange_rates_intro','exchange_rates_from_to','exchange_rates_intro_rates',+ 'header_exchange_rates_rates',+ 'header_exchange_rates_table',+ 'help_rate_form',+ 'add_new_rate',+ 'save_new_rate'],'form' => ['url','active','interest_date','title',+ 'date','book_date','process_date','due_date',@@ -292,6 +298,7 @@ return ['webhook_delivery','from_currency_to_currency','to_currency_from_currency',+ 'rate',],'list' => ['active',diff --git a/resources/assets/v1/src/components/exchange-rates/Rates.vue b/resources/assets/v1/src/components/exchange-rates/Rates.vueindex 053deb40ea..04678f0eb4 100644--- a/resources/assets/v1/src/components/exchange-rates/Rates.vue+++ b/resources/assets/v1/src/components/exchange-rates/Rates.vue@@ -74,7 +74,7 @@v-bind:placeholder="$t('firefly.date')"v-bind:title="$t('firefly.date')">- </td>+ </td><td><input type="number" class="form-control" min="0" v-model="rate.rate"></td>@@ -82,10 +82,18 @@<input type="number" class="form-control" min="0" v-model="rate.inverse"></td><td>- <button class="btn btn-danger" @click="deleteRate(index)">- <em class="fa fa-trash"></em>- </button>- update + delete+ <div class="btn-group">+ <button+ :disabled="saveButtonDisabled(index)"+ class="btn btn-default" :title="$t('firefly.submit')"+ @click="updateRate(index)">+ <em class="fa fa-save"></em>+ </button>+ <button class="btn btn-danger" :title="$t('firefly.delete')"+ @click="deleteRate(index)">+ <em class="fa fa-trash"></em>+ </button>+ </div></td></tr></tbody>@@ -94,6 +102,45 @@</div></div></div>+ <div class="row">+ <div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12 col-xs-12">+ <form class="form-horizontal nodisablebutton" @submit="submitRate">+ <div class="box box-default">+ <div class="box-header with-border">+ <h3 class="box-title">{{ $t('firefly.add_new_rate') }}</h3>+ </div>+ <div class="box-body">+ <p v-if="newError !=''" v-text="newError" class="text-danger">++ </p>+ <div class="form-group" id="name_holder">+ <label for="ffInput_date" class="col-sm-4 control-label"+ v-text="$t('form.date')"></label>+ <div class="col-sm-8">+ <input class="form-control" type="date" name="date" id="ffInput_date" :disabled="posting"+ autocomplete="off" spellcheck="false" v-model="newDate">+ </div>+ </div>+ <div class="form-group" id="rate_holder">+ <label for="ffInput_rate" class="col-sm-4 control-label"+ v-text="$t('form.rate')"></label>+ <div class="col-sm-8">+ <input class="form-control" type="number" name="rate" id="ffInput_rate" :disabled="posting"+ autocomplete="off" spellcheck="false" v-model="newRate" step="any">+ <p class="help-block" v-text="$t('firefly.help_rate_form', {from: from_code, to: to_code})">++ </p>+ </div>+ </div>+ </div>+ <div class="box-footer">+ <button type="submit" class="nodisablebutton btn pull-right btn-success" v-text="$t('firefly.save_new_rate')"></button>+ </div>+ </div>++ </form>+ </div>+ </div></div></template><script>@@ -104,6 +151,9 @@ export default {name: "Rates",data() {return {+ newDate: '',+ newRate: '1.0',+ newError: '',rates: [],tempRates: {},from_code: '',@@ -115,10 +165,13 @@ export default {name: ''},loading: true,+ posting: false,+ updating: false,};},mounted() {// get from and to code from URL+ this.newDate = format(new Date, 'yyyy-MM-dd');let parts = window.location.href.split('/');this.from_code = parts[parts.length - 2].substring(0, 3);this.to_code = parts[parts.length - 1].substring(0, 3);@@ -126,15 +179,90 @@ export default {this.downloadRates(1);},methods: {- deleteRate: function(index) {- console.log(this.rates[index].key);- this.rates.splice(index, 1);+ submitRate: function(e) {+ if(e) e.preventDefault();+ this.posting = true;++ axios.post("./api/v2/exchange-rates", {+ from: this.from_code,+ to: this.to_code,+ rate: this.newRate,+ date: this.newDate,+ }).then(() => {+ this.posting = false;+ this.downloadRates(1);+ }).catch((err) => {+ this.posting = false;+ this.newError = err.response.data.message;+ });+++ return false;+ },+ saveButtonDisabled: function (index) {+ return ('' === this.rates[index].rate && '' === this.rates[index].inverse) || this.updating;},- updateRate: function(index) {+ updateRate: function (index) {console.log('Update!');console.log(this.rates[index].key);+ let parts = this.spliceKey(this.rates[index].key);+ if (0 === parts.length) {+ return;+ }+ if ('' !== this.rates[index].rate) {+ // update rate+ console.log('Rate is ' + this.rates[index].rate);+ console.log('ID is ' + this.rates[index].rate_id);+ this.updating = true;+ axios.put("./api/v2/exchange-rates/" + this.rates[index].rate_id, {rate: this.rates[index].rate})+ .then(() => {+ this.updating = false;+ });+ }+ if ('' !== this.rates[index].inverse) {+ // update inverse+ console.log('Inverse is ' + this.rates[index].inverse);+ console.log('Inverse ID is ' + this.rates[index].inverse_id);+ this.updating = true;+ axios.put("./api/v2/exchange-rates/" + this.rates[index].inverse_id, {rate: this.rates[index].inverse})+ .then(() => {+ this.updating = false;+ });+ }+ },+ deleteRate: function (index) {+ console.log(this.rates[index].key);+ let parts = this.spliceKey(this.rates[index].key);+ if (0 === parts.length) {+ return;+ }+ console.log(parts);++ // delete A to B+ axios.delete("./api/v2/exchange-rates/rates/" + parts.from + '/' + parts.to + '?date=' + format(parts.date, 'yyyy-MM-dd'));+ // delete B to A.+ axios.delete("./api/v2/exchange-rates/rates/" + parts.to + '/' + parts.from + '?date=' + format(parts.date, 'yyyy-MM-dd'));++ this.rates.splice(index, 1);+ },++ spliceKey: function (key) {+ if (key.length !== 18) {+ return [];+ }+ let main = key.split('_');+ if (3 !== main.length) {+ return [];+ }+ let date = new Date(main[2]);+ return {+ from: main[0],+ to: main[1],+ date: date,+ };},downloadCurrencies: function () {+ this.loading = true;axios.get("./api/v2/currencies/" + this.from_code).then((response) => {this.from = {id: response.data.data.id,@@ -152,6 +280,9 @@ export default {});},downloadRates: function (page) {+ this.tempRates = {};+ this.rates = [];+ this.loading = true;axios.get("./api/v2/exchange-rates/rates/" + this.from_code + '/' + this.to_code + '?page=' + page).then((response) => {for (let i in response.data.data) {if (response.data.data.hasOwnProperty(i)) {@@ -161,36 +292,46 @@ export default {let to_code = current.attributes.to_currency_code;let rate = current.attributes.rate;let inverse = '';+ let rate_id = current.id;+ let inverse_id = '0';let key = from_code + '_' + to_code + '_' + format(date, 'yyyy-MM-dd');console.log('Key is now "' + key + '"');// perhaps the returned rate is actually the inverse rate.- if(from_code === this.to_code && to_code === this.from_code) {+ if (from_code === this.to_code && to_code === this.from_code) {console.log('Inverse rate found!');key = to_code + '_' + from_code + '_' + format(date, 'yyyy-MM-dd');rate = '';inverse = current.attributes.rate;+ inverse_id = current.id;console.log('Key updated to "' + key + '"');}- // inverse is not "" and existing inverse is ""?- if (this.tempRates.hasOwnProperty(key) && inverse !== '' && this.tempRates[key].inverse === '') {- this.tempRates[key].inverse = inverse;- }- // rate is not "" and existing rate is ""?- if (this.tempRates.hasOwnProperty(key) && rate !== '' && this.tempRates[key].rate === '') {- this.tempRates[key].rate = rate;- }if (!this.tempRates.hasOwnProperty(key)) {this.tempRates[key] = {key: key,date: date,+ rate_id: rate_id,+ inverse_id: inverse_id,date_formatted: format(date, this.$t('config.date_time_fns')),date_field: current.attributes.date.substring(0, 10),rate: rate,inverse: '',};}++ // inverse is not "" and existing inverse is ""?+ if (this.tempRates.hasOwnProperty(key) && inverse !== '' && this.tempRates[key].inverse === '') {+ this.tempRates[key].inverse = inverse;+ this.tempRates[key].inverse_id = inverse_id;+ }+ // rate is not "" and existing rate is ""?+ if (this.tempRates.hasOwnProperty(key) && rate !== '' && this.tempRates[key].rate === '') {+ this.tempRates[key].rate = rate;+ this.tempRates[key].rate_id = rate_id;+ }++}}if (parseInt(response.data.meta.pagination.current_page) < parseInt(response.data.meta.pagination.total_pages)) {diff --git a/resources/assets/v1/src/locales/bg.json b/resources/assets/v1/src/locales/bg.jsonindex 2cc775e535..dac499c8b3 100644--- a/resources/assets/v1/src/locales/bg.json+++ b/resources/assets/v1/src/locales/bg.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "\u0410\u043a\u0442\u0438\u0432\u0435\u043d","interest_date": "\u041f\u0430\u0434\u0435\u0436 \u043d\u0430 \u043b\u0438\u0445\u0432\u0430","title": "\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435",+ "date": "\u0414\u0430\u0442\u0430","book_date": "\u0414\u0430\u0442\u0430 \u043d\u0430 \u043e\u0441\u0447\u0435\u0442\u043e\u0432\u043e\u0434\u044f\u0432\u0430\u043d\u0435","process_date": "\u0414\u0430\u0442\u0430 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430","due_date": "\u0414\u0430\u0442\u0430 \u043d\u0430 \u043f\u0430\u0434\u0435\u0436",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u0410\u043a\u0442\u0438\u0432\u0435\u043d \u043b\u0438 \u0435?",diff --git a/resources/assets/v1/src/locales/ca.json b/resources/assets/v1/src/locales/ca.jsonindex d7e255796f..8aa11c8c02 100644--- a/resources/assets/v1/src/locales/ca.json+++ b/resources/assets/v1/src/locales/ca.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reiniciar el secret del webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Actiu","interest_date": "Data d'inter\u00e8s","title": "T\u00edtol",+ "date": "Data","book_date": "Data de registre","process_date": "Data de processament","due_date": "Data de venciment",@@ -151,7 +157,8 @@"webhook_trigger": "Activador","webhook_delivery": "Lliurament","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Est\u00e0 actiu?",diff --git a/resources/assets/v1/src/locales/cs.json b/resources/assets/v1/src/locales/cs.jsonindex 34c14d7b02..c339f3b69d 100644--- a/resources/assets/v1/src/locales/cs.json+++ b/resources/assets/v1/src/locales/cs.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Restartovat tajn\u00fd kl\u00ed\u010d webhooku","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktivn\u00ed","interest_date": "\u00darokov\u00e9 datum","title": "N\u00e1zev",+ "date": "Datum","book_date": "Datum rezervace","process_date": "Datum zpracov\u00e1n\u00ed","due_date": "Datum splatnosti",@@ -151,7 +157,8 @@"webhook_trigger": "Spou\u0161t\u011b\u010d","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktivn\u00ed?",diff --git a/resources/assets/v1/src/locales/da.json b/resources/assets/v1/src/locales/da.jsonindex bcddad1cb1..6307f8b998 100644--- a/resources/assets/v1/src/locales/da.json+++ b/resources/assets/v1/src/locales/da.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Nulstil webhook-hemmelighed","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktiv","interest_date": "Rentedato","title": "Titel",+ "date": "Dato","book_date": "Bogf\u00f8ringsdato","process_date": "Behandlingsdato","due_date": "Forfaldsdato",@@ -151,7 +157,8 @@"webhook_trigger": "Udl\u00f8ser","webhook_delivery": "Levering","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktiv?",diff --git a/resources/assets/v1/src/locales/de.json b/resources/assets/v1/src/locales/de.jsonindex 8526b80ac0..a3b66b504d 100644--- a/resources/assets/v1/src/locales/de.json+++ b/resources/assets/v1/src/locales/de.json@@ -130,16 +130,22 @@"response": "Antwort","visit_webhook_url": "Webhook-URL besuchen","reset_webhook_secret": "Webhook Secret zur\u00fccksetzen",- "header_exchange_rates": "Wechselkurse",- "exchange_rates_intro": "Firefly III unterst\u00fctzt das Herunterladen und Verwenden von Wechselkursen. Lesen Sie mehr dar\u00fcber in <a href=\u201ehttps:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\u201c>der Dokumentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "header_exchange_rates": "Exchange rates",+ "exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktiv","interest_date": "Zinstermin","title": "Titel",+ "date": "Datum","book_date": "Buchungsdatum","process_date": "Bearbeitungsdatum","due_date": "F\u00e4lligkeitstermin",@@ -151,7 +157,8 @@"webhook_trigger": "Ausl\u00f6ser","webhook_delivery": "Zustellung","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktiv?",diff --git a/resources/assets/v1/src/locales/el.json b/resources/assets/v1/src/locales/el.jsonindex 1269d128bd..3618448e89 100644--- a/resources/assets/v1/src/locales/el.json+++ b/resources/assets/v1/src/locales/el.json@@ -132,14 +132,20 @@"reset_webhook_secret": "\u0395\u03c0\u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03bc\u03c5\u03c3\u03c4\u03b9\u03ba\u03bf\u03cd webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 URL","active": "\u0395\u03bd\u03b5\u03c1\u03b3\u03cc","interest_date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03c4\u03bf\u03ba\u03b9\u03c3\u03bc\u03bf\u03cd","title": "\u03a4\u03af\u03c4\u03bb\u03bf\u03c2",+ "date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1","book_date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b5\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2","process_date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b5\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2","due_date": "\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03c0\u03c1\u03bf\u03b8\u03b5\u03c3\u03bc\u03af\u03b1\u03c2",@@ -151,7 +157,8 @@"webhook_trigger": "\u0395\u03bd\u03b5\u03c1\u03b3\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7","webhook_delivery": "\u03a0\u03b1\u03c1\u03ac\u03b4\u03bf\u03c3\u03b7","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u0395\u03af\u03bd\u03b1\u03b9 \u03b5\u03bd\u03b5\u03c1\u03b3\u03cc;",diff --git a/resources/assets/v1/src/locales/en-gb.json b/resources/assets/v1/src/locales/en-gb.jsonindex f97e5e27c4..f3471704ec 100644--- a/resources/assets/v1/src/locales/en-gb.json+++ b/resources/assets/v1/src/locales/en-gb.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Active","interest_date": "Interest date","title": "Title",+ "date": "Date","book_date": "Book date","process_date": "Processing date","due_date": "Due date",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Is active?",diff --git a/resources/assets/v1/src/locales/en.json b/resources/assets/v1/src/locales/en.jsonindex 2263d73548..0ebdb6170f 100644--- a/resources/assets/v1/src/locales/en.json+++ b/resources/assets/v1/src/locales/en.json@@ -133,13 +133,19 @@"header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.","exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Active","interest_date": "Interest date","title": "Title",+ "date": "Date","book_date": "Book date","process_date": "Processing date","due_date": "Due date",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Is active?",diff --git a/resources/assets/v1/src/locales/es.json b/resources/assets/v1/src/locales/es.jsonindex 39ca81d618..9407a2f4aa 100644--- a/resources/assets/v1/src/locales/es.json+++ b/resources/assets/v1/src/locales/es.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Restablecer secreto del webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Activo","interest_date": "Fecha de inter\u00e9s","title": "T\u00edtulo",+ "date": "Fecha","book_date": "Fecha de registro","process_date": "Fecha de procesamiento","due_date": "Fecha de vencimiento",@@ -151,7 +157,8 @@"webhook_trigger": "Disparador","webhook_delivery": "Entrega","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u00bfEst\u00e1 Activo?",diff --git a/resources/assets/v1/src/locales/fi.json b/resources/assets/v1/src/locales/fi.jsonindex 588d5b12cb..60e07447ff 100644--- a/resources/assets/v1/src/locales/fi.json+++ b/resources/assets/v1/src/locales/fi.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL-osoite","active": "Aktiivinen","interest_date": "Korkop\u00e4iv\u00e4","title": "Otsikko",+ "date": "P\u00e4iv\u00e4m\u00e4\u00e4r\u00e4","book_date": "Kirjausp\u00e4iv\u00e4","process_date": "K\u00e4sittelyp\u00e4iv\u00e4","due_date": "Er\u00e4p\u00e4iv\u00e4",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktiivinen?",diff --git a/resources/assets/v1/src/locales/fr.json b/resources/assets/v1/src/locales/fr.jsonindex d062ce857b..80c61e7bf4 100644--- a/resources/assets/v1/src/locales/fr.json+++ b/resources/assets/v1/src/locales/fr.json@@ -132,14 +132,20 @@"reset_webhook_secret": "R\u00e9initialiser le secret du webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "Liens","active": "Actif","interest_date": "Date de valeur (int\u00e9r\u00eats)","title": "Titre",+ "date": "Date","book_date": "Date d'enregistrement","process_date": "Date de traitement","due_date": "\u00c9ch\u00e9ance",@@ -151,7 +157,8 @@"webhook_trigger": "D\u00e9clencheur","webhook_delivery": "Distribution","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Actif ?",diff --git a/resources/assets/v1/src/locales/hu.json b/resources/assets/v1/src/locales/hu.jsonindex c401eb35f3..ac01e9d779 100644--- a/resources/assets/v1/src/locales/hu.json+++ b/resources/assets/v1/src/locales/hu.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Webhook titok vissza\u00e1ll\u00edt\u00e1sa","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Akt\u00edv","interest_date": "Kamatfizet\u00e9si id\u0151pont","title": "C\u00edm",+ "date": "D\u00e1tum","book_date": "K\u00f6nyvel\u00e9s d\u00e1tuma","process_date": "Feldolgoz\u00e1s d\u00e1tuma","due_date": "Lej\u00e1rati id\u0151pont",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Akt\u00edv?",diff --git a/resources/assets/v1/src/locales/id.json b/resources/assets/v1/src/locales/id.jsonindex d9d4708bd9..830b7e5688 100644--- a/resources/assets/v1/src/locales/id.json+++ b/resources/assets/v1/src/locales/id.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktif","interest_date": "Tanggal bunga","title": "Judul",+ "date": "Tanggal","book_date": "Tanggal buku","process_date": "Tanggal pemrosesan","due_date": "Batas tanggal terakhir",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktif?",diff --git a/resources/assets/v1/src/locales/it.json b/resources/assets/v1/src/locales/it.jsonindex adcc5a272f..8247418bb8 100644--- a/resources/assets/v1/src/locales/it.json+++ b/resources/assets/v1/src/locales/it.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reimposta il segreto del webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Attivo","interest_date": "Data di valuta","title": "Titolo",+ "date": "Data","book_date": "Data contabile","process_date": "Data elaborazione","due_date": "Data scadenza",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Consegna","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Attivo",diff --git a/resources/assets/v1/src/locales/ja.json b/resources/assets/v1/src/locales/ja.jsonindex 2350ddeef1..f1e5888eda 100644--- a/resources/assets/v1/src/locales/ja.json+++ b/resources/assets/v1/src/locales/ja.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Webhook\u306e\u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3092\u30ea\u30bb\u30c3\u30c8","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "\u6709\u52b9","interest_date": "\u5229\u606f\u65e5","title": "\u30bf\u30a4\u30c8\u30eb",+ "date": "\u65e5\u4ed8","book_date": "\u8a18\u5e33\u65e5","process_date": "\u51e6\u7406\u65e5","due_date": "\u671f\u65e5",@@ -151,7 +157,8 @@"webhook_trigger": "\u30c8\u30ea\u30ac\u30fc","webhook_delivery": "\u914d\u4fe1","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u6709\u52b9",diff --git a/resources/assets/v1/src/locales/ko.json b/resources/assets/v1/src/locales/ko.jsonindex 398194ef6a..57d7c02669 100644--- a/resources/assets/v1/src/locales/ko.json+++ b/resources/assets/v1/src/locales/ko.json@@ -132,14 +132,20 @@"reset_webhook_secret": "\uc6f9\ud6c5 \uc2dc\ud06c\ub9bf \uc7ac\uc124\uc815","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "\ud65c\uc131","interest_date": "\uc774\uc790 \ub0a0\uc9dc","title": "\uc81c\ubaa9",+ "date": "\ub0a0\uc9dc","book_date": "\uc608\uc57d\uc77c","process_date": "\ucc98\ub9ac\uc77c","due_date": "\uae30\ud55c",@@ -151,7 +157,8 @@"webhook_trigger": "\ud2b8\ub9ac\uac70","webhook_delivery": "\uc804\ub2ec","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\ud65c\uc131 \uc0c1\ud0dc\uc785\ub2c8\uae4c?",diff --git a/resources/assets/v1/src/locales/nb.json b/resources/assets/v1/src/locales/nb.jsonindex 3d855b994f..bf5b40ea44 100644--- a/resources/assets/v1/src/locales/nb.json+++ b/resources/assets/v1/src/locales/nb.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Tilbakestill Webhook n\u00f8kkel","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "Nettadresse","active": "Aktiv","interest_date": "Rentedato","title": "Tittel",+ "date": "Dato","book_date": "Bokf\u00f8ringsdato","process_date": "Prosesseringsdato","due_date": "Forfallsdato",@@ -151,7 +157,8 @@"webhook_trigger": "Utl\u00f8ser","webhook_delivery": "Levering","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Er aktiv?",diff --git a/resources/assets/v1/src/locales/nl.json b/resources/assets/v1/src/locales/nl.jsonindex 7199d055ef..4c91f0f3c5 100644--- a/resources/assets/v1/src/locales/nl.json+++ b/resources/assets/v1/src/locales/nl.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook-geheim","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Actief","interest_date": "Rentedatum","title": "Titel",+ "date": "Datum","book_date": "Boekdatum","process_date": "Verwerkingsdatum","due_date": "Vervaldatum",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Bericht","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Actief?",diff --git a/resources/assets/v1/src/locales/nn.json b/resources/assets/v1/src/locales/nn.jsonindex 6eee4ce10e..657dbe58ce 100644--- a/resources/assets/v1/src/locales/nn.json+++ b/resources/assets/v1/src/locales/nn.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Tilbakestill Webhook hemmelegheit","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "Nettadresse","active": "Aktiv","interest_date": "Rentedato","title": "Tittel",+ "date": "Dato","book_date": "Bokf\u00f8ringsdato","process_date": "Prosesseringsdato","due_date": "Forfallsdato",@@ -151,7 +157,8 @@"webhook_trigger": "Utl\u00f8ser","webhook_delivery": "Levering","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Er aktiv?",diff --git a/resources/assets/v1/src/locales/pl.json b/resources/assets/v1/src/locales/pl.jsonindex 77a28b3246..fca2630724 100644--- a/resources/assets/v1/src/locales/pl.json+++ b/resources/assets/v1/src/locales/pl.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Resetuj sekret webhooka","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktywny","interest_date": "Data odsetek","title": "Tytu\u0142",+ "date": "Data","book_date": "Data ksi\u0119gowania","process_date": "Data przetworzenia","due_date": "Termin realizacji",@@ -151,7 +157,8 @@"webhook_trigger": "Wyzwalacz","webhook_delivery": "Dor\u0119czenie","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Jest aktywny?",diff --git a/resources/assets/v1/src/locales/pt-br.json b/resources/assets/v1/src/locales/pt-br.jsonindex 31d04d08d1..5a9c58b5f4 100644--- a/resources/assets/v1/src/locales/pt-br.json+++ b/resources/assets/v1/src/locales/pt-br.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Redefinir chave do webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Ativo","interest_date": "Data do juros","title": "T\u00edtulo",+ "date": "Data","book_date": "Data de lan\u00e7amento","process_date": "Data de processamento","due_date": "Data de vencimento",@@ -151,7 +157,8 @@"webhook_trigger": "Gatilho","webhook_delivery": "Entrega","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Est\u00e1 ativo?",diff --git a/resources/assets/v1/src/locales/pt.json b/resources/assets/v1/src/locales/pt.jsonindex f1798798bf..91bc8f037a 100644--- a/resources/assets/v1/src/locales/pt.json+++ b/resources/assets/v1/src/locales/pt.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Redefinir segredo webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Ativo","interest_date": "Data de juros","title": "T\u00edtulo",+ "date": "Data","book_date": "Data de registo","process_date": "Data de processamento","due_date": "Data de vencimento",@@ -151,7 +157,8 @@"webhook_trigger": "Gatilho","webhook_delivery": "Entrega","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Esta ativo?",diff --git a/resources/assets/v1/src/locales/ro.json b/resources/assets/v1/src/locales/ro.jsonindex df6d2b7810..eea958ac58 100644--- a/resources/assets/v1/src/locales/ro.json+++ b/resources/assets/v1/src/locales/ro.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Resetare secret webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Activ","interest_date": "Data de interes","title": "Titlu",+ "date": "Dat\u0103","book_date": "Rezerv\u0103 dat\u0103","process_date": "Data proces\u0103rii","due_date": "Data scadent\u0103",@@ -151,7 +157,8 @@"webhook_trigger": "Declan\u0219ator","webhook_delivery": "Livrare","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Este activ?",diff --git a/resources/assets/v1/src/locales/ru.json b/resources/assets/v1/src/locales/ru.jsonindex cbeb70d17d..7f3218a265 100644--- a/resources/assets/v1/src/locales/ru.json+++ b/resources/assets/v1/src/locales/ru.json@@ -132,14 +132,20 @@"reset_webhook_secret": "","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "\u0421\u0441\u044b\u043b\u043a\u0430","active": "\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439","interest_date": "\u0414\u0430\u0442\u0430 \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432","title": "\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",+ "date": "\u0414\u0430\u0442\u0430","book_date": "\u0414\u0430\u0442\u0430 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f","process_date": "\u0414\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438","due_date": "\u0421\u0440\u043e\u043a \u043e\u043f\u043b\u0430\u0442\u044b",@@ -151,7 +157,8 @@"webhook_trigger": "\u0421\u043e\u0431\u044b\u0442\u0438\u044f","webhook_delivery": "\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u0410\u043a\u0442\u0438\u0432\u0435\u043d?",diff --git a/resources/assets/v1/src/locales/sk.json b/resources/assets/v1/src/locales/sk.jsonindex f355fa6a7b..4d22663eab 100644--- a/resources/assets/v1/src/locales/sk.json+++ b/resources/assets/v1/src/locales/sk.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Akt\u00edvne","interest_date": "\u00darokov\u00fd d\u00e1tum","title": "N\u00e1zov",+ "date": "D\u00e1tum","book_date": "D\u00e1tum rezerv\u00e1cie","process_date": "D\u00e1tum spracovania","due_date": "D\u00e1tum splatnosti",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Akt\u00edvne?",diff --git a/resources/assets/v1/src/locales/sl.json b/resources/assets/v1/src/locales/sl.jsonindex b6fbfca81f..0fd0f5a43e 100644--- a/resources/assets/v1/src/locales/sl.json+++ b/resources/assets/v1/src/locales/sl.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Ponastavi skrivno kodo webhooka","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktivno","interest_date": "Datum obresti","title": "Naslov",+ "date": "Datum","book_date": "Datum knji\u017eenja","process_date": "Datum obdelave","due_date": "Datum zapadlosti",@@ -151,7 +157,8 @@"webhook_trigger": "Spro\u017eilec","webhook_delivery": "Dostava","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktiviran?",diff --git a/resources/assets/v1/src/locales/sv.json b/resources/assets/v1/src/locales/sv.jsonindex 1e5fb21166..59e6d0f912 100644--- a/resources/assets/v1/src/locales/sv.json+++ b/resources/assets/v1/src/locales/sv.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "L\u00e4nk","active": "Aktiv","interest_date": "R\u00e4ntedatum","title": "Titel",+ "date": "Datum","book_date": "Bokf\u00f6ringsdatum","process_date": "Behandlingsdatum","due_date": "F\u00f6rfallodatum",@@ -151,7 +157,8 @@"webhook_trigger": "Utl\u00f6sare","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u00c4r aktiv?",diff --git a/resources/assets/v1/src/locales/tr.json b/resources/assets/v1/src/locales/tr.jsonindex 7924c193a0..d0660e7f30 100644--- a/resources/assets/v1/src/locales/tr.json+++ b/resources/assets/v1/src/locales/tr.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "Aktif","interest_date": "Faiz tarihi","title": "Ba\u015fl\u0131k",+ "date": "Tarih","book_date": "Kitap Tarihi","process_date": "\u0130\u015flem tarihi","due_date": "Biti\u015f Tarihi",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "Aktif mi?",diff --git a/resources/assets/v1/src/locales/uk.json b/resources/assets/v1/src/locales/uk.jsonindex 1cd8336bf4..b664e78b9a 100644--- a/resources/assets/v1/src/locales/uk.json+++ b/resources/assets/v1/src/locales/uk.json@@ -132,14 +132,20 @@"reset_webhook_secret": "\u0412\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0441\u0456\u043a\u0440\u0435\u0442 \u0432\u0435\u0431-\u0445\u0443\u043a\u0430","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL-\u0430\u0434\u0440\u0435\u0441\u0430","active": "\u0410\u043a\u0442\u0438\u0432\u043d\u043e","interest_date": "\u0414\u0430\u0442\u0430 \u043d\u0430\u0440\u0430\u0445\u0443\u0432\u0430\u043d\u043d\u044f \u0432\u0456\u0434\u0441\u043e\u0442\u043a\u0456\u0432","title": "\u041d\u0430\u0437\u0432\u0430",+ "date": "\u0414\u0430\u0442\u0430","book_date": "\u0414\u0430\u0442\u0430 \u0431\u0440\u043e\u043d\u044e\u0432\u0430\u043d\u043d\u044f","process_date": "\u0414\u0430\u0442\u0430 \u043e\u043f\u0440\u0430\u0446\u044e\u0432\u0430\u043d\u043d\u044f","due_date": "\u0414\u0430\u0442\u0430 \u0437\u0430\u043a\u0456\u043d\u0447\u0435\u043d\u043d\u044f",@@ -151,7 +157,8 @@"webhook_trigger": "\u0422\u0440\u0438\u0433\u0435\u0440","webhook_delivery": "\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u0427\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0439?",diff --git a/resources/assets/v1/src/locales/vi.json b/resources/assets/v1/src/locales/vi.jsonindex 4c41803e3c..41667c0b2b 100644--- a/resources/assets/v1/src/locales/vi.json+++ b/resources/assets/v1/src/locales/vi.json@@ -132,14 +132,20 @@"reset_webhook_secret": "C\u00e0i l\u1ea1i kh\u00f3a webhook","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "H\u00e0nh \u0111\u1ed9ng","interest_date": "Ng\u00e0y l\u00e3i","title": "Ti\u00eau \u0111\u1ec1",+ "date": "Ng\u00e0y","book_date": "Ng\u00e0y \u0111\u1eb7t s\u00e1ch","process_date": "Ng\u00e0y x\u1eed l\u00fd","due_date": "Ng\u00e0y \u0111\u00e1o h\u1ea1n",@@ -151,7 +157,8 @@"webhook_trigger": "K\u00edch ho\u1ea1t","webhook_delivery": "Ph\u00e2n ph\u1ed1i","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u0110ang ho\u1ea1t \u0111\u1ed9ng?",diff --git a/resources/assets/v1/src/locales/zh-cn.json b/resources/assets/v1/src/locales/zh-cn.jsonindex ff54f2ce84..1983b79d00 100644--- a/resources/assets/v1/src/locales/zh-cn.json+++ b/resources/assets/v1/src/locales/zh-cn.json@@ -132,14 +132,20 @@"reset_webhook_secret": "\u91cd\u7f6e webhook \u5bc6\u94a5","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "\u7f51\u5740","active": "\u542f\u7528","interest_date": "\u5229\u606f\u65e5\u671f","title": "\u6807\u9898",+ "date": "\u65e5\u671f","book_date": "\u767b\u8bb0\u65e5\u671f","process_date": "\u5904\u7406\u65e5\u671f","due_date": "\u5230\u671f\u65e5",@@ -151,7 +157,8 @@"webhook_trigger": "\u89e6\u53d1\u6761\u4ef6","webhook_delivery": "\u53d1\u9001\u683c\u5f0f","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u662f\u5426\u542f\u7528\uff1f",diff --git a/resources/assets/v1/src/locales/zh-tw.json b/resources/assets/v1/src/locales/zh-tw.jsonindex ade882af8a..50c197cf19 100644--- a/resources/assets/v1/src/locales/zh-tw.json+++ b/resources/assets/v1/src/locales/zh-tw.json@@ -132,14 +132,20 @@"reset_webhook_secret": "Reset webhook secret","header_exchange_rates": "Exchange rates","exchange_rates_intro": "Firefly III supports downloading and using exchange rates. Read more about this in <a href=\"https:\/\/docs.firefly-iii.org\/LOL_NOT_FINISHED_YET_TODO\">the documentation<\/a>.",- "exchange_rates_from_to": "Between {from} and {to} (and the other way around)",- "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates."+ "exchange_rates_from_to": "Between :from and :to",+ "exchange_rates_intro_rates": "Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.",+ "header_exchange_rates_rates": "Exchange rates",+ "header_exchange_rates_table": "Table with exchange rates",+ "help_rate_form": "On this day, how many {to} will you get for one {from}?",+ "add_new_rate": "Add a new exchange rate",+ "save_new_rate": "Save new rate"},"form": {"url": "URL","active": "\u555f\u7528","interest_date": "\u5229\u7387\u65e5\u671f","title": "\u6a19\u984c",+ "date": "\u65e5\u671f","book_date": "\u767b\u8a18\u65e5\u671f","process_date": "\u8655\u7406\u65e5\u671f","due_date": "\u5230\u671f\u65e5",@@ -151,7 +157,8 @@"webhook_trigger": "Trigger","webhook_delivery": "Delivery","from_currency_to_currency": "{from} → {to}",- "to_currency_from_currency": "{to} → {from}"+ "to_currency_from_currency": "{to} → {from}",+ "rate": "Rate"},"list": {"active": "\u662f\u5426\u555f\u7528\uff1f",diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.phpindex 548cfbb421..b07159e4cc 100644--- a/resources/lang/en_US/firefly.php+++ b/resources/lang/en_US/firefly.php@@ -1400,8 +1400,11 @@ return ['exchange_rates_intro' => 'Firefly III supports downloading and using exchange rates. Read more about this in <a href="https://docs.firefly-iii.org/LOL_NOT_FINISHED_YET_TODO">the documentation</a>.','exchange_rates_from_to' => 'Between {from} and {to} (and the other way around)','header_exchange_rates_rates' => 'Exchange rates',- 'exchange_rates_intro_rates' => 'Firefly III bla bla bla exchange rates.',+ 'exchange_rates_intro_rates' => 'Firefly III bla bla bla exchange rates. Inverse is automatically calculated if not provided. Will go back to last found rate.','header_exchange_rates_table' => 'Table with exchange rates',+ 'help_rate_form' => 'On this day, how many {to} will you get for one {from}?',+ 'save_new_rate' => 'Save new rate',+ 'add_new_rate' => 'Add a new exchange rate',// Financial administrations'administration_index' => 'Financial administration',diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.phpindex daa59bf741..5eaab4684c 100644--- a/resources/lang/en_US/form.php+++ b/resources/lang/en_US/form.php@@ -115,6 +115,7 @@ return [// exchange rates'from_currency_to_currency' => '{from} → {to}','to_currency_from_currency' => '{to} → {from}',+ 'rate' => 'Rate','under' => 'Under','symbol' => 'Symbol',diff --git a/routes/api.php b/routes/api.phpindex b0d31ec8b5..8bb1a61bad 100644--- a/routes/api.php+++ b/routes/api.php@@ -115,7 +115,9 @@ Route::group(static function (): void {Route::get('', ['uses' => 'IndexController@index', 'as' => 'index']);Route::get('rates/{fromCurrencyCode}/{toCurrencyCode}', ['uses' => 'ShowController@show', 'as' => 'show']);- // Route::post('', ['uses' => 'StoreController@store', 'as' => 'store']);+ Route::delete('rates/{fromCurrencyCode}/{toCurrencyCode}', ['uses' => 'DestroyController@destroy', 'as' => 'destroy']);+ Route::put('{userGroupExchangeRate}', ['uses' => 'UpdateController@update', 'as' => 'update']);+ Route::post('', ['uses' => 'StoreController@store', 'as' => 'store']);//// Route::put('{userGroup}', ['uses' => 'UpdateController@update', 'as' => 'update']);// Route::post('{userGroup}/use', ['uses' => 'UpdateController@useUserGroup', 'as' => 'use']);