mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-08 15:05:29 +00:00
Compare commits
33 Commits
develop-20
...
develop-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a00e8b976c | ||
|
|
e5b3c3e6bd | ||
|
|
4d7f63273e | ||
|
|
04553f6fc5 | ||
|
|
54676715c0 | ||
|
|
23246e8f5a | ||
|
|
4ccd65b4d7 | ||
|
|
2209087b94 | ||
|
|
f655dcbcf8 | ||
|
|
13bb064734 | ||
|
|
5a3edbe68f | ||
|
|
76657b5519 | ||
|
|
775deb2142 | ||
|
|
8220d491f9 | ||
|
|
6dd2627a6a | ||
|
|
22074568ae | ||
|
|
df03899588 | ||
|
|
7f4f95097b | ||
|
|
c96ada053f | ||
|
|
523ec7c0a1 | ||
|
|
61444e9660 | ||
|
|
8235c24c13 | ||
|
|
7ca96a766f | ||
|
|
27586a7ec2 | ||
|
|
dc3c3bb092 | ||
|
|
7287c29778 | ||
|
|
7d374b22f9 | ||
|
|
e0542f1270 | ||
|
|
73a9be0605 | ||
|
|
1f343bda1a | ||
|
|
1c8eaf93a6 | ||
|
|
ccfee25000 | ||
|
|
07c6dac766 |
60
.ci/php-cs-fixer/composer.lock
generated
60
.ci/php-cs-fixer/composer.lock
generated
@@ -402,16 +402,16 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.92.3",
|
||||
"version": "v3.92.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8"
|
||||
"reference": "9e7488b19403423e02e8403cc1eb596baf4673b0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
|
||||
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9e7488b19403423e02e8403cc1eb596baf4673b0",
|
||||
"reference": "9e7488b19403423e02e8403cc1eb596baf4673b0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -443,17 +443,17 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"facile-it/paraunit": "^1.3.1 || ^2.7",
|
||||
"infection/infection": "^0.31.0",
|
||||
"justinrainbow/json-schema": "^6.5",
|
||||
"keradus/cli-executor": "^2.2",
|
||||
"infection/infection": "^0.31",
|
||||
"justinrainbow/json-schema": "^6.6",
|
||||
"keradus/cli-executor": "^2.3",
|
||||
"mikey179/vfsstream": "^1.6.12",
|
||||
"php-coveralls/php-coveralls": "^2.9",
|
||||
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6",
|
||||
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6",
|
||||
"phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34",
|
||||
"phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.46",
|
||||
"symfony/polyfill-php85": "^1.33",
|
||||
"symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0",
|
||||
"symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0"
|
||||
"symfony/var-dumper": "^5.4.48 || ^6.4.26 || ^7.4.0 || ^8.0",
|
||||
"symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "For handling output formats in XML",
|
||||
@@ -494,7 +494,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.3"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.92.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -502,7 +502,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-18T10:45:02+00:00"
|
||||
"time": "2026-01-04T00:38:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
@@ -1252,16 +1252,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v8.0.1",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "fcb73f69d655b48fcb894a262f074218df08bd58"
|
||||
"reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58",
|
||||
"reference": "fcb73f69d655b48fcb894a262f074218df08bd58",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/6145b304a5c1ea0bdbd0b04d297a5864f9a7d587",
|
||||
"reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1318,7 +1318,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v8.0.1"
|
||||
"source": "https://github.com/symfony/console/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1338,7 +1338,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-05T15:25:33+00:00"
|
||||
"time": "2025-12-23T14:52:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
@@ -1640,16 +1640,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v8.0.0",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291"
|
||||
"reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291",
|
||||
"reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/dd3a2953570a283a2ba4e17063bb98c734cf5b12",
|
||||
"reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1684,7 +1684,7 @@
|
||||
"description": "Finds files and directories via an intuitive fluent interface",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/finder/tree/v8.0.0"
|
||||
"source": "https://github.com/symfony/finder/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1704,7 +1704,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-05T14:36:47+00:00"
|
||||
"time": "2025-12-23T14:52:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
@@ -2358,16 +2358,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v8.0.0",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149"
|
||||
"reference": "0cbbd88ec836f8757641c651bb995335846abb78"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149",
|
||||
"reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78",
|
||||
"reference": "0cbbd88ec836f8757641c651bb995335846abb78",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2399,7 +2399,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v8.0.0"
|
||||
"source": "https://github.com/symfony/process/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2419,7 +2419,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-10-16T16:25:44+00:00"
|
||||
"time": "2025-12-19T10:01:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
|
||||
@@ -4,6 +4,7 @@ Over time, many people have contributed to Firefly III. Their efforts are not al
|
||||
Please find below all the people who contributed to the Firefly III code. Their names are mentioned in the year of their first contribution.
|
||||
|
||||
## 2025
|
||||
- Diego Algorta
|
||||
- Jihad
|
||||
- jreyesr
|
||||
- codearena-bot
|
||||
|
||||
@@ -25,11 +25,11 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Api\V1\Controllers\Search;
|
||||
|
||||
use FireflyIII\Api\V1\Controllers\Controller;
|
||||
use FireflyIII\Api\V1\Requests\Search\TransactionSearchRequest;
|
||||
use FireflyIII\Support\JsonApi\Enrichments\TransactionGroupEnrichment;
|
||||
use FireflyIII\Support\Search\SearchInterface;
|
||||
use FireflyIII\Transformers\TransactionGroupTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection;
|
||||
|
||||
@@ -42,12 +42,12 @@ class TransactionController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchTransactions
|
||||
*/
|
||||
public function search(Request $request, SearchInterface $searcher): JsonResponse
|
||||
public function search(TransactionSearchRequest $request, SearchInterface $searcher): JsonResponse
|
||||
{
|
||||
$manager = $this->getManager();
|
||||
$fullQuery = (string) $request->get('query');
|
||||
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page');
|
||||
$pageSize = $this->parameters->get('limit');
|
||||
$fullQuery = (string) $request->attributes->get('query');
|
||||
$page = $request->attributes->get('page');
|
||||
$pageSize = $request->attributes->get('limit');
|
||||
$searcher->parseQuery($fullQuery);
|
||||
$searcher->setPage($page);
|
||||
$searcher->setLimit($pageSize);
|
||||
|
||||
@@ -79,8 +79,8 @@ class UpdateRequest extends FormRequest
|
||||
'start_date' => 'date|nullable',
|
||||
'target_date' => 'date|nullable|after:start_date',
|
||||
'notes' => 'max:65000',
|
||||
'accounts' => 'required',
|
||||
'accounts.*' => 'array|required',
|
||||
'accounts' => 'array',
|
||||
'accounts.*' => 'array',
|
||||
'accounts.*.account_id' => ['required', 'numeric', 'belongsToUser:accounts,id'],
|
||||
'accounts.*.current_amount' => ['numeric', 'nullable', new IsValidZeroOrMoreAmount(true)],
|
||||
'object_group_id' => 'numeric|belongsToUser:object_groups,id',
|
||||
|
||||
50
app/Api/V1/Requests/Search/SearchQueryRequest.php
Normal file
50
app/Api/V1/Requests/Search/SearchQueryRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* SearchQueryRequest.php
|
||||
* Copyright (c) 2026 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Search;
|
||||
|
||||
use FireflyIII\Api\V1\Requests\ApiRequest;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
|
||||
class SearchQueryRequest extends ApiRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'query' => sprintf('min:0|max:500|%s', $this->required),
|
||||
];
|
||||
}
|
||||
|
||||
public function withValidator(Validator $validator): void
|
||||
{
|
||||
$validator->after(
|
||||
function (Validator $validator): void {
|
||||
if ($validator->failed()) {
|
||||
return;
|
||||
}
|
||||
$query = $this->convertString('query');
|
||||
$this->attributes->set('query', $query);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
42
app/Api/V1/Requests/Search/TransactionSearchRequest.php
Normal file
42
app/Api/V1/Requests/Search/TransactionSearchRequest.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* SearchRequest.php
|
||||
* Copyright (c) 2026 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Search;
|
||||
|
||||
use FireflyIII\Api\V1\Requests\AggregateFormRequest;
|
||||
use FireflyIII\Api\V1\Requests\PaginationRequest;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Override;
|
||||
|
||||
class TransactionSearchRequest extends AggregateFormRequest
|
||||
{
|
||||
#[Override]
|
||||
protected function getRequests(): array
|
||||
{
|
||||
return [
|
||||
[PaginationRequest::class, 'sort_class' => TransactionJournal::class],
|
||||
SearchQueryRequest::class,
|
||||
// [ObjectTypeApiRequest::class, 'object_type' => Account::class],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -37,17 +37,19 @@ class UpdateRequest extends FormRequest
|
||||
use ChecksLogin;
|
||||
use ConvertsDataTypes;
|
||||
|
||||
private array $booleans = ['configuration.is_demo_site', 'configuration.single_user_mode', 'configuration.enable_exchange_rates', 'configuration.use_running_balance', 'configuration.enable_external_map', 'configuration.enable_external_rates', 'configuration.allow_webhooks'];
|
||||
private array $integers = ['configuration.permission_update_check', 'configuration.last_update_check'];
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$name = $this->route()->parameter('dynamicConfigKey');
|
||||
|
||||
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
|
||||
if (in_array($name, $this->booleans, true)) {
|
||||
return ['value' => $this->boolean('value')];
|
||||
}
|
||||
if ('configuration.permission_update_check' === $name || 'configuration.last_update_check' === $name) {
|
||||
if (in_array($name, $this->integers, true)) {
|
||||
return ['value' => $this->convertInteger('value')];
|
||||
}
|
||||
|
||||
@@ -61,13 +63,13 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
$name = $this->route()->parameter('configName');
|
||||
|
||||
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
|
||||
if (in_array($name, $this->booleans, true)) {
|
||||
return ['value' => ['required', new IsBoolean()]];
|
||||
}
|
||||
if ('configuration.permission_update_check' === $name) {
|
||||
return ['value' => 'required|numeric|min:-1|max:1'];
|
||||
}
|
||||
if ('configuration.last_update_check' === $name) {
|
||||
if (in_array($name, $this->integers, true)) {
|
||||
return ['value' => 'required|numeric|min:464272080'];
|
||||
}
|
||||
|
||||
|
||||
@@ -24,15 +24,20 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Events\Model\TransactionGroup;
|
||||
|
||||
use FireflyIII\Events\Event;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class TriggeredStoredTransactionGroup extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
public ?RuleGroup $ruleGroup = null;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*/
|
||||
public function __construct(public TransactionGroup $transactionGroup) {}
|
||||
public function __construct(public TransactionGroup $transactionGroup, ?RuleGroup $ruleGroup = null)
|
||||
{
|
||||
$this->ruleGroup = $ruleGroup;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class TransactionJournalMetaFactory
|
||||
Log::debug('Is a carbon object.');
|
||||
$value = $data['data']->toW3cString();
|
||||
}
|
||||
if ('' === (string) $value) {
|
||||
if ('' === (string)$value) {
|
||||
// Log::debug('Is an empty string.');
|
||||
// don't store blank strings.
|
||||
if (null !== $entry) {
|
||||
|
||||
@@ -28,6 +28,7 @@ use FireflyIII\Events\Model\TransactionGroup\TriggeredStoredTransactionGroup;
|
||||
use FireflyIII\Events\RequestedSendWebhookMessages;
|
||||
use FireflyIII\Events\StoredTransactionGroup;
|
||||
use FireflyIII\Generator\Webhook\MessageGeneratorInterface;
|
||||
use FireflyIII\Models\RuleGroup;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\PeriodStatistic\PeriodStatisticRepositoryInterface;
|
||||
@@ -46,7 +47,7 @@ class StoredGroupEventHandler
|
||||
{
|
||||
public function runAllHandlers(StoredTransactionGroup $event): void
|
||||
{
|
||||
$this->processRules($event);
|
||||
$this->processRules($event, null);
|
||||
$this->recalculateCredit($event);
|
||||
$this->triggerWebhooks($event);
|
||||
$this->removePeriodStatistics($event);
|
||||
@@ -55,13 +56,13 @@ class StoredGroupEventHandler
|
||||
public function triggerRulesManually(TriggeredStoredTransactionGroup $event): void
|
||||
{
|
||||
$newEvent = new StoredTransactionGroup($event->transactionGroup, true, false);
|
||||
$this->processRules($newEvent);
|
||||
$this->processRules($newEvent, $event->ruleGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method grabs all the users rules and processes them.
|
||||
*/
|
||||
private function processRules(StoredTransactionGroup $storedGroupEvent): void
|
||||
private function processRules(StoredTransactionGroup $storedGroupEvent, ?RuleGroup $ruleGroup): void
|
||||
{
|
||||
if (false === $storedGroupEvent->applyRules) {
|
||||
Log::info(sprintf('Will not run rules on group #%d', $storedGroupEvent->transactionGroup->id));
|
||||
@@ -86,7 +87,14 @@ class StoredGroupEventHandler
|
||||
|
||||
// add the groups to the rule engine.
|
||||
// it should run the rules in the group and cancel the group if necessary.
|
||||
$groups = $ruleGroupRepository->getRuleGroupsWithRules('store-journal');
|
||||
if (null === $ruleGroup) {
|
||||
Log::debug('Fire processRules with ALL store-journal rule groups.');
|
||||
$groups = $ruleGroupRepository->getRuleGroupsWithRules('store-journal');
|
||||
}
|
||||
if (null !== $ruleGroup) {
|
||||
Log::debug(sprintf('Fire processRules with rule group #%d.', $ruleGroup->id));
|
||||
$groups = new Collection([$ruleGroup]);
|
||||
}
|
||||
|
||||
// create and fire rule engine.
|
||||
$newRuleEngine = app(RuleEngineInterface::class);
|
||||
|
||||
@@ -24,11 +24,12 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Handlers\Observer;
|
||||
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Support\Facades\Amount;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
use FireflyIII\Support\Http\Api\ExchangeRateConverter;
|
||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
|
||||
/**
|
||||
* Class TransactionObserver
|
||||
@@ -42,7 +43,10 @@ class TransactionObserver
|
||||
Log::debug('Observe "created" of a transaction.');
|
||||
if (true === FireflyConfig::get('use_running_balance', config('firefly.feature_flags.running_balance_column'))->data && (1 === bccomp($transaction->amount, '0') && self::$recalculate)) {
|
||||
Log::debug('Trigger recalculateForJournal');
|
||||
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
|
||||
$journal = $transaction->transactionJournal;
|
||||
if ($journal instanceof TransactionJournal) {
|
||||
AccountBalanceCalculator::recalculateForJournal($journal);
|
||||
}
|
||||
}
|
||||
$this->updatePrimaryCurrencyAmount($transaction);
|
||||
}
|
||||
@@ -56,7 +60,10 @@ class TransactionObserver
|
||||
$transaction->native_amount = null;
|
||||
$transaction->native_foreign_amount = null;
|
||||
// first normal amount
|
||||
if ($transaction->transactionCurrency->id !== $userCurrency->id && (null === $transaction->foreign_currency_id || (null !== $transaction->foreign_currency_id && $transaction->foreign_currency_id !== $userCurrency->id))) {
|
||||
if ($transaction->transactionCurrency->id !== $userCurrency->id
|
||||
&& (null === $transaction->foreign_currency_id
|
||||
|| (null !== $transaction->foreign_currency_id
|
||||
&& $transaction->foreign_currency_id !== $userCurrency->id))) {
|
||||
$converter = new ExchangeRateConverter();
|
||||
$converter->setUserGroup($transaction->transactionJournal->user->userGroup);
|
||||
$converter->setIgnoreSettings(true);
|
||||
|
||||
@@ -66,7 +66,7 @@ class PopupReport implements PopupReportInterface
|
||||
if (null !== $currencyId) {
|
||||
/** @var CurrencyRepositoryInterface $repos */
|
||||
$repos = app(CurrencyRepositoryInterface::class);
|
||||
$currency = $repos->find((int) $currencyId);
|
||||
$currency = $repos->find((int)$currencyId);
|
||||
}
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
@@ -98,7 +98,7 @@ class PopupReport implements PopupReportInterface
|
||||
if (null !== $currencyId) {
|
||||
/** @var CurrencyRepositoryInterface $repos */
|
||||
$repos = app(CurrencyRepositoryInterface::class);
|
||||
$currency = $repos->find((int) $currencyId);
|
||||
$currency = $repos->find((int)$currencyId);
|
||||
}
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
@@ -135,7 +135,7 @@ class PopupReport implements PopupReportInterface
|
||||
if (null !== $currencyId) {
|
||||
/** @var CurrencyRepositoryInterface $repos */
|
||||
$repos = app(CurrencyRepositoryInterface::class);
|
||||
$currency = $repos->find((int) $currencyId);
|
||||
$currency = $repos->find((int)$currencyId);
|
||||
}
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
@@ -174,9 +174,10 @@ class PopupReport implements PopupReportInterface
|
||||
if (null !== $currencyId) {
|
||||
/** @var CurrencyRepositoryInterface $repos */
|
||||
$repos = app(CurrencyRepositoryInterface::class);
|
||||
$currency = $repos->find((int) $currencyId);
|
||||
$currency = $repos->find((int)$currencyId);
|
||||
}
|
||||
|
||||
|
||||
/** @var JournalRepositoryInterface $repository */
|
||||
$repository = app(JournalRepositoryInterface::class);
|
||||
$repository->setUser($account->user);
|
||||
@@ -187,11 +188,11 @@ class PopupReport implements PopupReportInterface
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
|
||||
// set report accounts + the request accounts:
|
||||
// $set = $attributes['accounts'] ?? new Collection;
|
||||
// $set->push($account);
|
||||
// the source account must be in the set.
|
||||
$set = $attributes['accounts'] ?? new Collection();
|
||||
|
||||
$collector->setDestinationAccounts(new Collection()->push($account))
|
||||
->setSourceAccounts($set)
|
||||
->setRange($attributes['startDate'], $attributes['endDate'])
|
||||
->withAccountInformation()
|
||||
->withBudgetInformation()
|
||||
|
||||
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use FireflyIII\Support\Facades\Navigation;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Enums\AccountTypeEnum;
|
||||
use FireflyIII\Events\Preferences\UserGroupChangedPrimaryCurrency;
|
||||
@@ -33,7 +32,9 @@ use FireflyIII\Http\Requests\PreferencesRequest;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Preference;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Support\Facades\Navigation;
|
||||
use FireflyIII\Support\Facades\Preferences;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
use FireflyIII\Support\Singleton\PreferencesSingleton;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
@@ -44,7 +45,6 @@ use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Safe\Exceptions\FilesystemException;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
|
||||
use function Safe\file_get_contents;
|
||||
use function Safe\json_decode;
|
||||
@@ -63,7 +63,7 @@ class PreferencesController extends Controller
|
||||
|
||||
$this->middleware(
|
||||
static function ($request, $next) {
|
||||
app('view')->share('title', (string) trans('firefly.preferences'));
|
||||
app('view')->share('title', (string)trans('firefly.preferences'));
|
||||
app('view')->share('mainTitleIcon', 'fa-gear');
|
||||
|
||||
return $next($request);
|
||||
@@ -87,8 +87,8 @@ class PreferencesController extends Controller
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($accounts as $account) {
|
||||
$type = $account->accountType->type;
|
||||
$role = sprintf('opt_group_%s', $repository->getMetaValue($account, 'account_role'));
|
||||
$type = $account->accountType->type;
|
||||
$role = sprintf('opt_group_%s', $repository->getMetaValue($account, 'account_role'));
|
||||
|
||||
if (in_array($type, [AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value], true)) {
|
||||
$role = sprintf('opt_group_l_%s', $type);
|
||||
@@ -97,7 +97,7 @@ class PreferencesController extends Controller
|
||||
if ('opt_group_' === $role) {
|
||||
$role = 'opt_group_defaultAsset';
|
||||
}
|
||||
$groupedAccounts[(string) trans(sprintf('firefly.%s', $role))][$account->id] = $account->name;
|
||||
$groupedAccounts[(string)trans(sprintf('firefly.%s', $role))][$account->id] = $account->name;
|
||||
}
|
||||
ksort($groupedAccounts);
|
||||
|
||||
@@ -120,21 +120,22 @@ class PreferencesController extends Controller
|
||||
if (is_array($fiscalYearStartStr)) {
|
||||
$fiscalYearStartStr = '01-01';
|
||||
}
|
||||
$fiscalYearStart = sprintf('%s-%s', Carbon::now()->format('Y'), (string) $fiscalYearStartStr);
|
||||
$fiscalYearStart = sprintf('%s-%s', Carbon::now()->format('Y'), (string)$fiscalYearStartStr);
|
||||
$tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data;
|
||||
$availableDarkModes = config('firefly.available_dark_modes');
|
||||
|
||||
// notifications settings
|
||||
$slackUrl = Preferences::getEncrypted('slack_webhook_url', '')->data;
|
||||
$pushoverAppToken = (string) Preferences::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string) Preferences::getEncrypted('pushover_user_token', '')->data;
|
||||
$pushoverAppToken = (string)Preferences::getEncrypted('pushover_app_token', '')->data;
|
||||
$pushoverUserToken = (string)Preferences::getEncrypted('pushover_user_token', '')->data;
|
||||
$ntfyServer = Preferences::getEncrypted('ntfy_server', 'https://ntfy.sh')->data;
|
||||
$ntfyTopic = (string) Preferences::getEncrypted('ntfy_topic', '')->data;
|
||||
$ntfyTopic = (string)Preferences::getEncrypted('ntfy_topic', '')->data;
|
||||
$ntfyAuth = '1' === Preferences::get('ntfy_auth', false)->data;
|
||||
$ntfyUser = Preferences::getEncrypted('ntfy_user', '')->data;
|
||||
$ntfyPass = (string) Preferences::getEncrypted('ntfy_pass', '')->data;
|
||||
$ntfyPass = (string)Preferences::getEncrypted('ntfy_pass', '')->data;
|
||||
$channels = config('notifications.channels');
|
||||
$forcedAvailability = [];
|
||||
$anonymous = Steam::anonymous();
|
||||
|
||||
// notification preferences
|
||||
$notifications = [];
|
||||
@@ -164,7 +165,7 @@ class PreferencesController extends Controller
|
||||
Log::error($e->getMessage());
|
||||
$locales = [];
|
||||
}
|
||||
$locales = ['equal' => (string) trans('firefly.equal_to_language')] + $locales;
|
||||
$locales = ['equal' => (string)trans('firefly.equal_to_language')] + $locales;
|
||||
// an important fallback is that the frontPageAccount array gets refilled automatically
|
||||
// when it turns up empty.
|
||||
if (0 === count($frontpageAccounts)) {
|
||||
@@ -184,7 +185,7 @@ class PreferencesController extends Controller
|
||||
$ntfyPass = '';
|
||||
}
|
||||
|
||||
return view('preferences.index', ['language' => $language, 'pushoverAppToken' => $pushoverAppToken, 'pushoverUserToken' => $pushoverUserToken, 'ntfyServer' => $ntfyServer, 'ntfyTopic' => $ntfyTopic, 'ntfyAuth' => $ntfyAuth, 'channels' => $channels, 'ntfyUser' => $ntfyUser, 'forcedAvailability' => $forcedAvailability, 'ntfyPass' => $ntfyPass, 'groupedAccounts' => $groupedAccounts, 'isDocker' => $isDocker, 'frontpageAccounts' => $frontpageAccounts, 'languages' => $languages, 'darkMode' => $darkMode, 'availableDarkModes' => $availableDarkModes, 'notifications' => $notifications, 'convertToPrimary' => $convertToPrimary, 'slackUrl' => $slackUrl, 'locales' => $locales, 'locale' => $locale, 'tjOptionalFields' => $tjOptionalFields, 'viewRange' => $viewRange, 'customFiscalYear' => $customFiscalYear, 'listPageSize' => $listPageSize, 'fiscalYearStart' => $fiscalYearStart]);
|
||||
return view('preferences.index', ['anonymous' => $anonymous, 'language' => $language, 'pushoverAppToken' => $pushoverAppToken, 'pushoverUserToken' => $pushoverUserToken, 'ntfyServer' => $ntfyServer, 'ntfyTopic' => $ntfyTopic, 'ntfyAuth' => $ntfyAuth, 'channels' => $channels, 'ntfyUser' => $ntfyUser, 'forcedAvailability' => $forcedAvailability, 'ntfyPass' => $ntfyPass, 'groupedAccounts' => $groupedAccounts, 'isDocker' => $isDocker, 'frontpageAccounts' => $frontpageAccounts, 'languages' => $languages, 'darkMode' => $darkMode, 'availableDarkModes' => $availableDarkModes, 'notifications' => $notifications, 'convertToPrimary' => $convertToPrimary, 'slackUrl' => $slackUrl, 'locales' => $locales, 'locale' => $locale, 'tjOptionalFields' => $tjOptionalFields, 'viewRange' => $viewRange, 'customFiscalYear' => $customFiscalYear, 'listPageSize' => $listPageSize, 'fiscalYearStart' => $fiscalYearStart]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +202,7 @@ class PreferencesController extends Controller
|
||||
$frontpageAccounts = [];
|
||||
if (is_array($request->get('frontpageAccounts')) && count($request->get('frontpageAccounts')) > 0) {
|
||||
foreach ($request->get('frontpageAccounts') as $id) {
|
||||
$frontpageAccounts[] = (int) $id;
|
||||
$frontpageAccounts[] = (int)$id;
|
||||
}
|
||||
Preferences::set('frontpageAccounts', $frontpageAccounts);
|
||||
}
|
||||
@@ -241,7 +242,7 @@ class PreferencesController extends Controller
|
||||
}
|
||||
|
||||
// convert primary
|
||||
$convertToPrimary = 1 === (int) $request->get('convertToPrimary');
|
||||
$convertToPrimary = 1 === (int)$request->get('convertToPrimary');
|
||||
if ($convertToPrimary && !$this->convertToPrimary) {
|
||||
// set to true!
|
||||
Log::debug('User sets convertToPrimary to true.');
|
||||
@@ -253,9 +254,9 @@ class PreferencesController extends Controller
|
||||
Preferences::set('convert_to_primary', $convertToPrimary);
|
||||
|
||||
// custom fiscal year
|
||||
$customFiscalYear = 1 === (int) $request->get('customFiscalYear');
|
||||
$customFiscalYear = 1 === (int)$request->get('customFiscalYear');
|
||||
Preferences::set('customFiscalYear', $customFiscalYear);
|
||||
$fiscalYearString = (string) $request->get('fiscalYearStart');
|
||||
$fiscalYearString = (string)$request->get('fiscalYearStart');
|
||||
if ('' !== $fiscalYearString) {
|
||||
$fiscalYearStart = Carbon::parse($fiscalYearString, config('app.timezone'))->format('m-d');
|
||||
Preferences::set('fiscalYearStart', $fiscalYearStart);
|
||||
@@ -263,7 +264,7 @@ class PreferencesController extends Controller
|
||||
|
||||
// save page size:
|
||||
Preferences::set('listPageSize', 50);
|
||||
$listPageSize = (int) $request->get('listPageSize');
|
||||
$listPageSize = (int)$request->get('listPageSize');
|
||||
if ($listPageSize > 0 && $listPageSize < 1337) {
|
||||
Preferences::set('listPageSize', $listPageSize);
|
||||
}
|
||||
@@ -282,7 +283,7 @@ class PreferencesController extends Controller
|
||||
|
||||
// same for locale:
|
||||
if (!auth()->user()->hasRole('demo')) {
|
||||
$locale = (string) $request->get('locale');
|
||||
$locale = (string)$request->get('locale');
|
||||
$locale = '' === $locale ? null : $locale;
|
||||
Preferences::set('locale', $locale);
|
||||
}
|
||||
@@ -311,7 +312,12 @@ class PreferencesController extends Controller
|
||||
Preferences::set('darkMode', $darkMode);
|
||||
}
|
||||
|
||||
session()->flash('success', (string) trans('firefly.saved_preferences'));
|
||||
// anonymous amounts?
|
||||
$anonymous = '1' === $request->get('anonymous');
|
||||
Preferences::set('anonymous', $anonymous);
|
||||
|
||||
// save and continue
|
||||
session()->flash('success', (string)trans('firefly.saved_preferences'));
|
||||
Preferences::mark();
|
||||
|
||||
return redirect(route('preferences.index'));
|
||||
@@ -325,7 +331,7 @@ class PreferencesController extends Controller
|
||||
|
||||
switch ($channel) {
|
||||
default:
|
||||
session()->flash('error', (string) trans('firefly.notification_test_failed', ['channel' => $channel]));
|
||||
session()->flash('error', (string)trans('firefly.notification_test_failed', ['channel' => $channel]));
|
||||
|
||||
break;
|
||||
|
||||
@@ -337,7 +343,7 @@ class PreferencesController extends Controller
|
||||
$user = auth()->user();
|
||||
Log::debug(sprintf('Now in testNotification("%s") controller.', $channel));
|
||||
event(new UserTestNotificationChannel($channel, $user));
|
||||
session()->flash('success', (string) trans('firefly.notification_test_executed', ['channel' => $channel]));
|
||||
session()->flash('success', (string)trans('firefly.notification_test_executed', ['channel' => $channel]));
|
||||
}
|
||||
|
||||
return '';
|
||||
|
||||
@@ -35,6 +35,7 @@ use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
|
||||
@@ -70,13 +71,20 @@ class ExecutionController extends Controller
|
||||
*/
|
||||
public function execute(SelectTransactionsRequest $request, RuleGroup $ruleGroup): RedirectResponse
|
||||
{
|
||||
Log::debug(sprintf('You have selected rule group #%d', $ruleGroup->id));
|
||||
// Get parameters specified by the user
|
||||
$accounts = $request->get('accounts');
|
||||
$set = $this->repository->getAccountsById($accounts);
|
||||
$set = new Collection();
|
||||
if (is_array($accounts)) {
|
||||
$set = $this->repository->getAccountsById($accounts);
|
||||
}
|
||||
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector->setAccounts($set);
|
||||
if (count($set) > 0) {
|
||||
$collector->setAccounts($set);
|
||||
}
|
||||
|
||||
// add date operators.
|
||||
if (null !== $request->get('start')) {
|
||||
$startDate = new Carbon($request->get('start'));
|
||||
@@ -96,7 +104,7 @@ class ExecutionController extends Controller
|
||||
/** @var TransactionGroup $group */
|
||||
foreach ($groups as $group) {
|
||||
Log::debug(sprintf('Processing group #%d.', $group->id));
|
||||
event(new TriggeredStoredTransactionGroup($group));
|
||||
event(new TriggeredStoredTransactionGroup($group, $ruleGroup));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ class WarnAboutBills implements ShouldQueue
|
||||
$diff = $earliest->diffInDays($this->date);
|
||||
Log::debug(sprintf('Difference in days is %s', $diff));
|
||||
|
||||
return $diff >= 2;
|
||||
return $diff >= 6; // FIXME hard coded value.
|
||||
}
|
||||
|
||||
private function sendOverdueAlerts(User $user, array $overdue): void
|
||||
|
||||
@@ -27,8 +27,6 @@ use FireflyIII\Enums\UserRoleEnum;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Attachment;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -38,7 +36,6 @@ use Illuminate\Support\Collection;
|
||||
* @method getUserGroup()
|
||||
* @method getUser()
|
||||
* @method checkUserGroupAccess(UserRoleEnum $role)
|
||||
* @method setUser(null|Authenticatable|User $user)
|
||||
* @method setUserGroupById(int $userGroupId)
|
||||
*/
|
||||
interface AttachmentRepositoryInterface
|
||||
|
||||
@@ -68,8 +68,7 @@ class JournalUpdateService
|
||||
private ?Account $destinationAccount = null;
|
||||
private ?Transaction $destinationTransaction = null;
|
||||
private array $metaDate
|
||||
= ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date',
|
||||
'invoice_date', ];
|
||||
= ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date', '_internal_previous_date'];
|
||||
private array $metaString
|
||||
= [
|
||||
'sepa_cc',
|
||||
@@ -205,11 +204,9 @@ class JournalUpdateService
|
||||
$validator->setUser($this->transactionJournal->user);
|
||||
|
||||
$result = $validator->validateSource(['id' => $sourceId, 'name' => $sourceName]);
|
||||
Log::debug(
|
||||
sprintf('hasValidSourceAccount(%d, "%s") will return %s', $sourceId, $sourceName, var_export($result, true))
|
||||
);
|
||||
Log::debug(sprintf('hasValidSourceAccount(%d, "%s") will return %s', $sourceId, $sourceName, var_export($result, true)));
|
||||
|
||||
// TODO typeoverrule the account validator may have a different opinion on the transaction type.
|
||||
// TODO type overrule the account validator may have a different opinion on the transaction type.
|
||||
|
||||
// validate submitted info:
|
||||
return $result;
|
||||
@@ -283,14 +280,7 @@ class JournalUpdateService
|
||||
$validator->setUser($this->transactionJournal->user);
|
||||
$validator->source = $this->getValidSourceAccount();
|
||||
$result = $validator->validateDestination(['id' => $destId, 'name' => $destName]);
|
||||
Log::debug(
|
||||
sprintf(
|
||||
'hasValidDestinationAccount(%d, "%s") will return %s',
|
||||
$destId,
|
||||
$destName,
|
||||
var_export($result, true)
|
||||
)
|
||||
);
|
||||
Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true)));
|
||||
|
||||
// TODO typeOverrule: the account validator may have another opinion on the transaction type.
|
||||
|
||||
@@ -494,6 +484,24 @@ class JournalUpdateService
|
||||
// do some parsing.
|
||||
Log::debug(sprintf('Create date value from string "%s".', $value));
|
||||
$this->transactionJournal->date_tz = $value->format('e');
|
||||
$res = $value->gt($this->transactionJournal->date);
|
||||
Log::debug(sprintf('Old date: %s, new date: %s', $this->transactionJournal->date->toW3cString(), $value->toW3cString()));
|
||||
|
||||
/** @var TransactionJournalMetaFactory $factory */
|
||||
$factory = app(TransactionJournalMetaFactory::class);
|
||||
$set = [
|
||||
'journal' => $this->transactionJournal,
|
||||
'name' => '_internal_previous_date',
|
||||
'data' => null,
|
||||
];
|
||||
if ($res) {
|
||||
Log::debug('Transaction is set to be AFTER its current date. Save also the "_internal_previous_date"-field.');
|
||||
$set['data'] = clone $this->transactionJournal->date;
|
||||
}
|
||||
if (!$res) {
|
||||
Log::debug('Transaction is NOT set to be AFTER its current date. Remove the "_internal_previous_date"-field.');
|
||||
}
|
||||
$factory->updateOrCreate($set);
|
||||
}
|
||||
event(new TriggeredAuditLog($this->transactionJournal->user, $this->transactionJournal, sprintf('update_%s', $fieldName), $this->transactionJournal->{$fieldName}, $value));
|
||||
|
||||
|
||||
@@ -34,10 +34,16 @@ class DynamicConfigKey
|
||||
{
|
||||
public static array $accepted
|
||||
= [
|
||||
'configuration.is_demo_site',
|
||||
'configuration.permission_update_check',
|
||||
'configuration.single_user_mode',
|
||||
'configuration.last_update_check',
|
||||
'configuration.is_demo_site', // boolean
|
||||
'configuration.permission_update_check', // -1, 0 or 1 (never asked, no permission, permission)
|
||||
'configuration.single_user_mode', // boolean
|
||||
'configuration.last_update_check', // timestamp
|
||||
'configuration.enable_exchange_rates', // boolean
|
||||
'configuration.use_running_balance', // boolean
|
||||
'configuration.enable_external_map', // boolean
|
||||
'configuration.enable_external_rates', // boolean
|
||||
'configuration.allow_webhooks', // boolean
|
||||
'configuration.valid_url_protocols', // string ("http,https")
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -157,6 +157,11 @@ trait GetConfigurationData
|
||||
$index = (string)trans('firefly.year_to_date');
|
||||
$ranges[$index] = [$yearBegin, new Carbon()];
|
||||
|
||||
// previous year:
|
||||
$yearBegin = today(config('app.timezone'))->subYear()->startOfYear();
|
||||
$index = (string)trans('firefly.previous_year', ['year' => $yearBegin->year]);
|
||||
$ranges[$index] = [$yearBegin, $yearBegin->clone()->endOfYear()];
|
||||
|
||||
// everything
|
||||
$index = (string)trans('firefly.everything');
|
||||
$ranges[$index] = [$first, new Carbon()];
|
||||
|
||||
@@ -245,7 +245,6 @@ trait RenderPartialViews
|
||||
if (null === $account) {
|
||||
return 'This is an unknown account. Apologies.';
|
||||
}
|
||||
|
||||
$journals = $popupHelper->byExpenses($account, $attributes);
|
||||
|
||||
try {
|
||||
|
||||
@@ -321,7 +321,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
||||
$array['foreign_currency_code'] = $entry->foreign_currency_code;
|
||||
$array['foreign_currency_symbol'] = $entry->foreign_currency_symbol;
|
||||
$array['foreign_currency_decimal_places'] = $entry->foreign_currency_decimal_places;
|
||||
$array['foreign_amount'] = Steam::bcround($entry->foreign_amount, $entry->foreign_currency_decimal_places);
|
||||
$array['foreign_amount'] = Steam::bcround((string) $entry->foreign_amount, $entry->foreign_currency_decimal_places);
|
||||
}
|
||||
// convert to primary, but is already primary.
|
||||
if ($this->convertToPrimary && (int)$entry->transaction_currency_id === $this->primaryCurrency->id) {
|
||||
@@ -329,7 +329,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
||||
}
|
||||
// convert to primary, but is NOT already primary.
|
||||
if ($this->convertToPrimary && (int)$entry->transaction_currency_id !== $this->primaryCurrency->id) {
|
||||
$array['pc_amount'] = $converter->convert($entry->transactionCurrency, $this->primaryCurrency, $entry->date, $entry->amount);
|
||||
$array['pc_amount'] = $converter->convert($entry->transactionCurrency, $this->primaryCurrency, $entry->date, (string) $entry->amount);
|
||||
}
|
||||
// convert to primary, but foreign is already primary.
|
||||
if ($this->convertToPrimary && (int)$entry->foreign_currency_id === $this->primaryCurrency->id) {
|
||||
@@ -340,7 +340,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
||||
// TODO this is very database intensive.
|
||||
/** @var TransactionCurrency $foreignCurrency */
|
||||
$foreignCurrency = Amount::getTransactionCurrencyById($entry->foreign_currency_id);
|
||||
$array['pc_foreign_amount'] = $converter->convert($foreignCurrency, $this->primaryCurrency, $entry->date, $entry->amount);
|
||||
$array['pc_foreign_amount'] = $converter->convert($foreignCurrency, $this->primaryCurrency, $entry->date, (string) $entry->amount);
|
||||
}
|
||||
$result[] = $array;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,18 @@ class AccountBalanceCalculator
|
||||
$set[$transaction->account_id] = $transaction->account;
|
||||
}
|
||||
$accounts = new Collection()->push(...$set);
|
||||
$object->optimizedCalculation($accounts, $transactionJournal->date);
|
||||
|
||||
// find meta value:
|
||||
$date = $transactionJournal->date;
|
||||
$meta = $transactionJournal->transactionJournalMeta()->where('name', '_internal_previous_date')->where('data', '!=', '')->first();
|
||||
Log::debug(sprintf('Date used is "%s"', $date->toW3cString()));
|
||||
if (null !== $meta) {
|
||||
$date = Carbon::parse($meta->data);
|
||||
Log::debug(sprintf('Date is overruled with "%s"', $date->toW3cString()));
|
||||
}
|
||||
|
||||
|
||||
$object->optimizedCalculation($accounts, $date);
|
||||
}
|
||||
|
||||
private function getLatestBalance(int $accountId, int $currencyId, ?Carbon $notBefore): string
|
||||
|
||||
@@ -302,17 +302,17 @@ class Navigation
|
||||
if ($currentEnd->lt($end)) {
|
||||
switch ($repeatFreq) {
|
||||
case 'QTD':
|
||||
$currentEnd->endOfQuarter()->setMilli(0);
|
||||
$currentEnd = $end->clone()->endOfQuarter()->setMilli(0);
|
||||
|
||||
break;
|
||||
|
||||
case 'MTD':
|
||||
$currentEnd->endOfMonth()->setMilli(0);
|
||||
$currentEnd = $end->clone()->endOfMonth()->setMilli(0);
|
||||
|
||||
break;
|
||||
|
||||
case 'YTD':
|
||||
$currentEnd->endOfYear()->setMilli(0);
|
||||
$currentEnd = $end->clone()->endOfYear()->setMilli(0);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class TransactionGroupTransformer extends AbstractTransformer
|
||||
'recurrence_count',
|
||||
'recurrence_total',
|
||||
];
|
||||
$this->metaDateFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date'];
|
||||
$this->metaDateFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date', '_internal_previous_date'];
|
||||
}
|
||||
|
||||
public function transform(array $group): array
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
"transfers",
|
||||
"management"
|
||||
],
|
||||
"platform": {
|
||||
"php": "8.4"
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"homepage": "https://github.com/firefly-iii/firefly-iii",
|
||||
"type": "project",
|
||||
|
||||
158
composer.lock
generated
158
composer.lock
generated
@@ -3621,16 +3621,16 @@
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "3.9.0",
|
||||
"version": "3.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6"
|
||||
"reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6",
|
||||
"reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0",
|
||||
"reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3648,7 +3648,7 @@
|
||||
"graylog2/gelf-php": "^1.4.2 || ^2.0",
|
||||
"guzzlehttp/guzzle": "^7.4.5",
|
||||
"guzzlehttp/psr7": "^2.2",
|
||||
"mongodb/mongodb": "^1.8",
|
||||
"mongodb/mongodb": "^1.8 || ^2.0",
|
||||
"php-amqplib/php-amqplib": "~2.4 || ^3",
|
||||
"php-console/php-console": "^3.1.8",
|
||||
"phpstan/phpstan": "^2",
|
||||
@@ -3708,7 +3708,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||
"source": "https://github.com/Seldaek/monolog/tree/3.9.0"
|
||||
"source": "https://github.com/Seldaek/monolog/tree/3.10.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3720,7 +3720,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-03-24T10:02:05+00:00"
|
||||
"time": "2026-01-02T08:56:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
@@ -6427,16 +6427,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache",
|
||||
"version": "v8.0.1",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/cache.git",
|
||||
"reference": "0e67dc8145810d4e1c0d13c0e1d29ceb930b1c8e"
|
||||
"reference": "ef8c7dbfe613d2773d0b5e68b2ef2db72c8b025f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/cache/zipball/0e67dc8145810d4e1c0d13c0e1d29ceb930b1c8e",
|
||||
"reference": "0e67dc8145810d4e1c0d13c0e1d29ceb930b1c8e",
|
||||
"url": "https://api.github.com/repos/symfony/cache/zipball/ef8c7dbfe613d2773d0b5e68b2ef2db72c8b025f",
|
||||
"reference": "ef8c7dbfe613d2773d0b5e68b2ef2db72c8b025f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6503,7 +6503,7 @@
|
||||
"psr6"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/cache/tree/v8.0.1"
|
||||
"source": "https://github.com/symfony/cache/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6523,7 +6523,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-04T18:17:06+00:00"
|
||||
"time": "2025-12-28T10:45:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/cache-contracts",
|
||||
@@ -6680,16 +6680,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v7.4.1",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e"
|
||||
"reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e",
|
||||
"reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/732a9ca6cd9dfd940c639062d5edbde2f6727fb6",
|
||||
"reference": "732a9ca6cd9dfd940c639062d5edbde2f6727fb6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6754,7 +6754,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v7.4.1"
|
||||
"source": "https://github.com/symfony/console/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -6774,7 +6774,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-05T15:23:39+00:00"
|
||||
"time": "2025-12-23T14:50:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
@@ -7224,16 +7224,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/finder.git",
|
||||
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd"
|
||||
"reference": "fffe05569336549b20a1be64250b40516d6e8d06"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/340b9ed7320570f319028a2cbec46d40535e94bd",
|
||||
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd",
|
||||
"url": "https://api.github.com/repos/symfony/finder/zipball/fffe05569336549b20a1be64250b40516d6e8d06",
|
||||
"reference": "fffe05569336549b20a1be64250b40516d6e8d06",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7268,7 +7268,7 @@
|
||||
"description": "Finds files and directories via an intuitive fluent interface",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/finder/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/finder/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7288,20 +7288,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-05T05:42:40+00:00"
|
||||
"time": "2025-12-23T14:50:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-client",
|
||||
"version": "v8.0.1",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-client.git",
|
||||
"reference": "727fda60d0aebfdfcc4c8bc4661f0cb8f44153c0"
|
||||
"reference": "ea062691009cc2b7bb87734fef20e02671cbd50b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-client/zipball/727fda60d0aebfdfcc4c8bc4661f0cb8f44153c0",
|
||||
"reference": "727fda60d0aebfdfcc4c8bc4661f0cb8f44153c0",
|
||||
"url": "https://api.github.com/repos/symfony/http-client/zipball/ea062691009cc2b7bb87734fef20e02671cbd50b",
|
||||
"reference": "ea062691009cc2b7bb87734fef20e02671cbd50b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7364,7 +7364,7 @@
|
||||
"http"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-client/tree/v8.0.1"
|
||||
"source": "https://github.com/symfony/http-client/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7384,7 +7384,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-05T14:08:45+00:00"
|
||||
"time": "2025-12-23T14:52:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-client-contracts",
|
||||
@@ -7466,16 +7466,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v7.4.1",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "bd1af1e425811d6f077db240c3a588bdb405cd27"
|
||||
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/bd1af1e425811d6f077db240c3a588bdb405cd27",
|
||||
"reference": "bd1af1e425811d6f077db240c3a588bdb405cd27",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a70c745d4cea48dbd609f4075e5f5cbce453bd52",
|
||||
"reference": "a70c745d4cea48dbd609f4075e5f5cbce453bd52",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7524,7 +7524,7 @@
|
||||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v7.4.1"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7544,20 +7544,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-07T11:13:10+00:00"
|
||||
"time": "2025-12-23T14:23:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v7.4.2",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-kernel.git",
|
||||
"reference": "f6e6f0a5fa8763f75a504b930163785fb6dd055f"
|
||||
"reference": "885211d4bed3f857b8c964011923528a55702aa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f6e6f0a5fa8763f75a504b930163785fb6dd055f",
|
||||
"reference": "f6e6f0a5fa8763f75a504b930163785fb6dd055f",
|
||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/885211d4bed3f857b8c964011923528a55702aa5",
|
||||
"reference": "885211d4bed3f857b8c964011923528a55702aa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7643,7 +7643,7 @@
|
||||
"description": "Provides a structured process for converting a Request into a Response",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.4.2"
|
||||
"source": "https://github.com/symfony/http-kernel/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7663,20 +7663,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-08T07:43:37+00:00"
|
||||
"time": "2025-12-31T08:43:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailer",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mailer.git",
|
||||
"reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd"
|
||||
"reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/a3d9eea8cfa467ece41f0f54ba28185d74bd53fd",
|
||||
"reference": "a3d9eea8cfa467ece41f0f54ba28185d74bd53fd",
|
||||
"url": "https://api.github.com/repos/symfony/mailer/zipball/e472d35e230108231ccb7f51eb6b2100cac02ee4",
|
||||
"reference": "e472d35e230108231ccb7f51eb6b2100cac02ee4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -7727,7 +7727,7 @@
|
||||
"description": "Helps sending emails",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mailer/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/mailer/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7747,7 +7747,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-21T15:26:00+00:00"
|
||||
"time": "2025-12-16T08:02:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/mailgun-mailer",
|
||||
@@ -8810,16 +8810,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8"
|
||||
"reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8",
|
||||
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/2f8e1a6cdf590ca63715da4d3a7a3327404a523f",
|
||||
"reference": "2f8e1a6cdf590ca63715da4d3a7a3327404a523f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8851,7 +8851,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/process/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8871,7 +8871,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-10-16T11:21:06+00:00"
|
||||
"time": "2025-12-19T10:00:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/psr-http-message-bridge",
|
||||
@@ -8963,16 +8963,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/routing.git",
|
||||
"reference": "4720254cb2644a0b876233d258a32bf017330db7"
|
||||
"reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/4720254cb2644a0b876233d258a32bf017330db7",
|
||||
"reference": "4720254cb2644a0b876233d258a32bf017330db7",
|
||||
"url": "https://api.github.com/repos/symfony/routing/zipball/5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090",
|
||||
"reference": "5d3fd7adf8896c2fdb54e2f0f35b1bcbd9e45090",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9024,7 +9024,7 @@
|
||||
"url"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/routing/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/routing/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9044,7 +9044,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-27T13:27:24+00:00"
|
||||
"time": "2025-12-19T10:00:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
@@ -9225,16 +9225,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v8.0.1",
|
||||
"version": "v8.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "770e3b8b0ba8360958abedcabacd4203467333ca"
|
||||
"reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/770e3b8b0ba8360958abedcabacd4203467333ca",
|
||||
"reference": "770e3b8b0ba8360958abedcabacd4203467333ca",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/60a8f11f0e15c48f2cc47c4da53873bb5b62135d",
|
||||
"reference": "60a8f11f0e15c48f2cc47c4da53873bb5b62135d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9294,7 +9294,7 @@
|
||||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v8.0.1"
|
||||
"source": "https://github.com/symfony/translation/tree/v8.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9314,7 +9314,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-12-01T09:13:36+00:00"
|
||||
"time": "2025-12-21T10:59:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
@@ -9478,16 +9478,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v7.4.0",
|
||||
"version": "v7.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece"
|
||||
"reference": "7e99bebcb3f90d8721890f2963463280848cba92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/41fd6c4ae28c38b294b42af6db61446594a0dece",
|
||||
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/7e99bebcb3f90d8721890f2963463280848cba92",
|
||||
"reference": "7e99bebcb3f90d8721890f2963463280848cba92",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -9541,7 +9541,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.4.0"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v7.4.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -9561,7 +9561,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-10-27T20:36:44+00:00"
|
||||
"time": "2025-12-18T07:04:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-exporter",
|
||||
@@ -10367,16 +10367,16 @@
|
||||
},
|
||||
{
|
||||
"name": "composer/class-map-generator",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/class-map-generator.git",
|
||||
"reference": "2373419b7709815ed323ebf18c3c72d03ff4a8a6"
|
||||
"reference": "8f5fa3cc214230e71f54924bd0197a3bcc705eb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/2373419b7709815ed323ebf18c3c72d03ff4a8a6",
|
||||
"reference": "2373419b7709815ed323ebf18c3c72d03ff4a8a6",
|
||||
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/8f5fa3cc214230e71f54924bd0197a3bcc705eb1",
|
||||
"reference": "8f5fa3cc214230e71f54924bd0197a3bcc705eb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -10420,7 +10420,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/composer/class-map-generator/issues",
|
||||
"source": "https://github.com/composer/class-map-generator/tree/1.7.0"
|
||||
"source": "https://github.com/composer/class-map-generator/tree/1.7.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -10432,7 +10432,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-11-19T10:41:15+00:00"
|
||||
"time": "2025-12-29T13:15:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/pcre",
|
||||
|
||||
@@ -78,8 +78,8 @@ return [
|
||||
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
|
||||
// see cer.php for exchange rates feature flag.
|
||||
],
|
||||
'version' => 'develop/2025-12-28',
|
||||
'build_time' => 1766901480,
|
||||
'version' => 'develop/2026-01-05',
|
||||
'build_time' => 1767598210,
|
||||
'api_version' => '2.1.0', // field is no longer used.
|
||||
'db_version' => 28, // field is no longer used.
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ class TransactionCurrencySeeder extends Seeder
|
||||
$currencies[] = ['code' => 'ARS', 'name' => 'Argentinian Peso', 'symbol' => '$', 'decimal_places' => 2];
|
||||
$currencies[] = ['code' => 'COP', 'name' => 'Colombian Peso', 'symbol' => '$', 'decimal_places' => 2];
|
||||
$currencies[] = ['code' => 'CLP', 'name' => 'Chilean Peso', 'symbol' => '$', 'decimal_places' => 2];
|
||||
$currencies[] = ['code' => 'UYU', 'name' => 'Uruguayan Peso', 'symbol' => '$', 'decimal_places' => 2];
|
||||
|
||||
// oceanian currencies
|
||||
$currencies[] = ['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp', 'decimal_places' => 2];
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -4508,9 +4508,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001761",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz",
|
||||
"integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==",
|
||||
"version": "1.0.30001762",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz",
|
||||
"integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -9650,9 +9650,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
||||
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
||||
"version": "6.14.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
@@ -11577,7 +11577,7 @@
|
||||
"version": "8.28.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz",
|
||||
"integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==",
|
||||
"deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
|
||||
"deprecated": "v9 and v10 no longer supported. please migrate to v11. about maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
||||
@@ -34,12 +34,14 @@ $(document).ready(function () {
|
||||
|
||||
$('input[name="ignore_budget"]').attr('checked', false);
|
||||
});
|
||||
$('input[name="tags"]').on('itemAdded', function (event) {
|
||||
var isChecked = $('#tags_action_do_nothing').is(':checked');
|
||||
if (true === isChecked) {
|
||||
$('#tags_action_do_nothing').attr('checked', false);
|
||||
$('#tags_action_do_replace').attr('checked', true);
|
||||
}
|
||||
|
||||
$('input[name="tags"]').on('itemAdded', function(event) {
|
||||
$('#tags_action_do_nothing').attr('checked', false);
|
||||
$('#tags_action_do_replace').attr('checked', true);
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,6 +43,7 @@ return [
|
||||
'last_180_days' => 'Last 180 days',
|
||||
'month_to_date' => 'Month to date',
|
||||
'year_to_date' => 'Year to date',
|
||||
'previous_year' => 'Previous year (:year)',
|
||||
'YTD' => 'YTD',
|
||||
'welcome_back' => 'What\'s playing?',
|
||||
'main_dashboard_page_title' => 'Home',
|
||||
@@ -149,6 +150,9 @@ return [
|
||||
'left_in_budget_limit' => 'Left to spend according to budgeting',
|
||||
'current_period' => 'Current period',
|
||||
'show_the_current_period_and_overview' => 'Show the current period and overview',
|
||||
'pref_anonymous' => 'Hidden amounts',
|
||||
'pref_anonymous_help' => 'For privacy and anonymity, you can make Firefly III hide all amounts. This will not hide amounts in edit boxes, but the rest are hidden. You can also toggle this with the little "eye"-icon in the top bar.',
|
||||
'pref_anonymous_label' => 'Hide amounts',
|
||||
'pref_languages_locale' => 'For a language other than English to work properly, your operating system must be equipped with the correct locale-information. If these are not present, currency data, dates and amounts may be formatted wrong.',
|
||||
'budget_in_period' => 'All transactions for budget ":name" between :start and :end in :currency',
|
||||
'chart_budget_in_period' => 'Chart for all transactions for budget ":name" between :start and :end in :currency',
|
||||
|
||||
@@ -110,6 +110,14 @@
|
||||
{{ ExpandedForm.checkbox('convertToPrimary','1',convertToPrimary,{ 'label' : 'pref_convert_primary_help'|_ }) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{# conversion back to primary currency #}
|
||||
<div class="preferences-box">
|
||||
<h3>{{ 'pref_anonymous'|_ }}</h3>
|
||||
<p class="text-info">
|
||||
{{ 'pref_anonymous_help'|_ }}
|
||||
</p>
|
||||
{{ ExpandedForm.checkbox('anonymous','1',anonymous,{ 'label' : 'pref_anonymous_label'|_ }) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# general settings column B #}
|
||||
|
||||
Reference in New Issue
Block a user