Compare commits

...

59 Commits

Author SHA1 Message Date
github-actions[bot]
067112904e Merge pull request #11467 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2026-01-06 21:05:43 +01:00
github-actions[bot]
fc371e27b7 Merge pull request #11466 from firefly-iii/release-1767729927
🤖 Automatically merge the PR into the develop branch.
2026-01-06 21:05:36 +01:00
JC5
52b14b46a2 🤖 Auto commit for release 'v6.4.15' on 2026-01-06 2026-01-06 21:05:27 +01:00
James Cole
5260b770bb Clean up changelog. 2026-01-06 21:01:07 +01:00
github-actions[bot]
226c4c8f8e Merge pull request #11464 from firefly-iii/release-1767729551
🤖 Automatically merge the PR into the develop branch.
2026-01-06 20:59:17 +01:00
JC5
9ebafe64f1 🤖 Auto commit for release 'develop' on 2026-01-06 2026-01-06 20:59:11 +01:00
James Cole
ffa618101d Update changelog. 2026-01-06 20:55:08 +01:00
James Cole
280e531a76 Fix #11396 2026-01-06 20:43:11 +01:00
James Cole
f542a3fd88 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop 2026-01-06 20:38:46 +01:00
James Cole
581d67a92c Fix #11399 2026-01-06 20:38:41 +01:00
github-actions[bot]
a00e8b976c Merge pull request #11458 from firefly-iii/release-1767598313
🤖 Automatically merge the PR into the develop branch.
2026-01-05 08:32:02 +01:00
JC5
e5b3c3e6bd 🤖 Auto commit for release 'develop' on 2026-01-05 2026-01-05 08:31:53 +01:00
James Cole
4d7f63273e Fix #11449 2026-01-04 20:21:41 +01:00
James Cole
04553f6fc5 Fix #11443 2026-01-03 14:46:39 +01:00
James Cole
54676715c0 Create new request for search. 2026-01-02 16:38:46 +01:00
github-actions[bot]
23246e8f5a Merge pull request #11434 from firefly-iii/release-1767337981
🤖 Automatically merge the PR into the develop branch.
2026-01-02 08:13:10 +01:00
JC5
4ccd65b4d7 🤖 Auto commit for release 'develop' on 2026-01-02 2026-01-02 08:13:01 +01:00
James Cole
2209087b94 Previous year, fixes #11433 2026-01-02 07:59:29 +01:00
github-actions[bot]
f655dcbcf8 Merge pull request #11429 from firefly-iii/release-1767278452
🤖 Automatically merge the PR into the develop branch.
2026-01-01 15:40:59 +01:00
JC5
13bb064734 🤖 Auto commit for release 'develop' on 2026-01-01 2026-01-01 15:40:52 +01:00
James Cole
5a3edbe68f Be less strict about bills. 2026-01-01 15:37:09 +01:00
github-actions[bot]
76657b5519 Merge pull request #11428 from firefly-iii/release-1767271388
🤖 Automatically merge the PR into the develop branch.
2026-01-01 13:43:16 +01:00
JC5
775deb2142 🤖 Auto commit for release 'develop' on 2026-01-01 2026-01-01 13:43:08 +01:00
James Cole
8220d491f9 Fix popup in report helper 2026-01-01 13:39:16 +01:00
github-actions[bot]
6dd2627a6a Merge pull request #11424 from firefly-iii/release-1767125383
🤖 Automatically merge the PR into the develop branch.
2025-12-30 21:09:52 +01:00
JC5
22074568ae 🤖 Auto commit for release 'develop' on 2025-12-30 2025-12-30 21:09:43 +01:00
James Cole
df03899588 Fix whoopsie. 2025-12-30 21:05:50 +01:00
github-actions[bot]
7f4f95097b Merge pull request #11423 from firefly-iii/release-1767124577
🤖 Automatically merge the PR into the develop branch.
2025-12-30 20:56:26 +01:00
JC5
c96ada053f 🤖 Auto commit for release 'develop' on 2025-12-30 2025-12-30 20:56:17 +01:00
James Cole
523ec7c0a1 Expand settings, make accounts not mandatory. 2025-12-30 20:51:56 +01:00
James Cole
61444e9660 New variables for updates. 2025-12-30 16:39:46 +01:00
github-actions[bot]
8235c24c13 Merge pull request #11421 from firefly-iii/release-1767107945
🤖 Automatically merge the PR into the develop branch.
2025-12-30 16:19:14 +01:00
JC5
7ca96a766f 🤖 Auto commit for release 'develop' on 2025-12-30 2025-12-30 16:19:05 +01:00
James Cole
27586a7ec2 Allow transactions to be moved to the future and still have the running balance calculated correctly. 2025-12-30 16:13:28 +01:00
James Cole
dc3c3bb092 Add setting for anonymous amounts in preferences. 2025-12-30 07:24:14 +01:00
github-actions[bot]
7287c29778 Merge pull request #11419 from firefly-iii/release-1767020049
🤖 Automatically merge the PR into the develop branch.
2025-12-29 15:54:17 +01:00
JC5
7d374b22f9 🤖 Auto commit for release 'develop' on 2025-12-29 2025-12-29 15:54:09 +01:00
James Cole
e0542f1270 Fix end of quarter issue. 2025-12-29 11:10:28 +01:00
James Cole
73a9be0605 Fix #11410 2025-12-29 11:05:48 +01:00
github-actions[bot]
1f343bda1a Merge pull request #11416 from firefly-iii/release-1766995950
🤖 Automatically merge the PR into the develop branch.
2025-12-29 09:12:40 +01:00
JC5
1c8eaf93a6 🤖 Auto commit for release 'develop' on 2025-12-29 2025-12-29 09:12:30 +01:00
James Cole
ccfee25000 Merge pull request #11414 from oboxodo/develop
Add Uruguayan Peso to currency seeder
2025-12-29 09:11:25 +01:00
Diego Algorta
07c6dac766 Add Uruguayan Peso to currency seeder 2025-12-28 12:06:08 -03:00
github-actions[bot]
b0b2e5b752 Merge pull request #11411 from firefly-iii/release-1766901579
🤖 Automatically merge the PR into the develop branch.
2025-12-28 06:59:46 +01:00
JC5
ff3a935e9d 🤖 Auto commit for release 'develop' on 2025-12-28 2025-12-28 06:59:39 +01:00
James Cole
f0e2f09da7 Fix some end of period stuff. 2025-12-28 06:54:03 +01:00
github-actions[bot]
f3fbebb9a4 Merge pull request #11409 from firefly-iii/release-1766836192
🤖 Automatically merge the PR into the develop branch.
2025-12-27 12:49:59 +01:00
JC5
6e6e42dab6 🤖 Auto commit for release 'develop' on 2025-12-27 2025-12-27 12:49:53 +01:00
James Cole
d9efd63fad Add debug details. 2025-12-27 12:45:46 +01:00
github-actions[bot]
bc273ada39 Merge pull request #11406 from firefly-iii/release-1766776026
🤖 Automatically merge the PR into the develop branch.
2025-12-26 20:07:14 +01:00
JC5
75c76bb6dd 🤖 Auto commit for release 'develop' on 2025-12-26 2025-12-26 20:07:06 +01:00
James Cole
4d2dd1d8f7 Fix view of running balance column 2025-12-26 20:02:09 +01:00
James Cole
456e73ac16 Fix #11403 2025-12-26 07:09:04 +01:00
James Cole
86f1d8a1bc Fix ALE amount logging. 2025-12-24 07:45:03 +01:00
James Cole
7dac164556 Remove maxlength 2025-12-22 15:39:41 +01:00
James Cole
532df54f10 Merge pull request #11394 from firefly-iii/dependabot/composer/develop/mailersend/laravel-driver-2.12.0 2025-12-22 05:20:33 +01:00
mergify[bot]
daa76d01ca Merge branch 'develop' into dependabot/composer/develop/mailersend/laravel-driver-2.12.0 2025-12-22 03:37:04 +00:00
dependabot[bot]
6b7aed7658 Bump mailersend/laravel-driver from 2.9.1 to 2.12.0
Bumps [mailersend/laravel-driver](https://github.com/mailersend/mailersend-laravel-driver) from 2.9.1 to 2.12.0.
- [Release notes](https://github.com/mailersend/mailersend-laravel-driver/releases)
- [Commits](https://github.com/mailersend/mailersend-laravel-driver/compare/v2.9.1...v2.12.0)

---
updated-dependencies:
- dependency-name: mailersend/laravel-driver
  dependency-version: 2.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 03:01:04 +00:00
github-actions[bot]
637d8e050a Merge pull request #11376 from firefly-iii/develop
🤖 Automatically merge the PR into the main branch.
2025-12-16 06:42:25 +01:00
44 changed files with 813 additions and 479 deletions

View File

@@ -402,16 +402,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.92.3", "version": "v3.92.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8" "reference": "9e7488b19403423e02e8403cc1eb596baf4673b0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9e7488b19403423e02e8403cc1eb596baf4673b0",
"reference": "2ba8f5a60f6f42fb65758cfb3768434fa2d1c7e8", "reference": "9e7488b19403423e02e8403cc1eb596baf4673b0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -443,17 +443,17 @@
}, },
"require-dev": { "require-dev": {
"facile-it/paraunit": "^1.3.1 || ^2.7", "facile-it/paraunit": "^1.3.1 || ^2.7",
"infection/infection": "^0.31.0", "infection/infection": "^0.31",
"justinrainbow/json-schema": "^6.5", "justinrainbow/json-schema": "^6.6",
"keradus/cli-executor": "^2.2", "keradus/cli-executor": "^2.3",
"mikey179/vfsstream": "^1.6.12", "mikey179/vfsstream": "^1.6.12",
"php-coveralls/php-coveralls": "^2.9", "php-coveralls/php-coveralls": "^2.9",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^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/polyfill-php85": "^1.33",
"symfony/var-dumper": "^5.4.48 || ^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.24 || ^7.3.2 || ^8.0" "symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0"
}, },
"suggest": { "suggest": {
"ext-dom": "For handling output formats in XML", "ext-dom": "For handling output formats in XML",
@@ -494,7 +494,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "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": [ "funding": [
{ {
@@ -502,7 +502,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-12-18T10:45:02+00:00" "time": "2026-01-04T00:38:52+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
@@ -731,16 +731,16 @@
}, },
{ {
"name": "react/child-process", "name": "react/child-process",
"version": "v0.6.6", "version": "v0.6.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/child-process.git", "url": "https://github.com/reactphp/child-process.git",
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", "url": "https://api.github.com/repos/reactphp/child-process/zipball/970f0e71945556422ee4570ccbabaedc3cf04ad3",
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -794,7 +794,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/reactphp/child-process/issues", "issues": "https://github.com/reactphp/child-process/issues",
"source": "https://github.com/reactphp/child-process/tree/v0.6.6" "source": "https://github.com/reactphp/child-process/tree/v0.6.7"
}, },
"funding": [ "funding": [
{ {
@@ -802,7 +802,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2025-01-01T16:37:48+00:00" "time": "2025-12-23T15:25:20+00:00"
}, },
{ {
"name": "react/dns", "name": "react/dns",
@@ -1252,16 +1252,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v8.0.1", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "fcb73f69d655b48fcb894a262f074218df08bd58" "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/fcb73f69d655b48fcb894a262f074218df08bd58", "url": "https://api.github.com/repos/symfony/console/zipball/6145b304a5c1ea0bdbd0b04d297a5864f9a7d587",
"reference": "fcb73f69d655b48fcb894a262f074218df08bd58", "reference": "6145b304a5c1ea0bdbd0b04d297a5864f9a7d587",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1318,7 +1318,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v8.0.1" "source": "https://github.com/symfony/console/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -1338,7 +1338,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-12-05T15:25:33+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -1640,16 +1640,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v8.0.0", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291" "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/7598dd5770580fa3517ec83e8da0c9b9e01f4291", "url": "https://api.github.com/repos/symfony/finder/zipball/dd3a2953570a283a2ba4e17063bb98c734cf5b12",
"reference": "7598dd5770580fa3517ec83e8da0c9b9e01f4291", "reference": "dd3a2953570a283a2ba4e17063bb98c734cf5b12",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1684,7 +1684,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v8.0.0" "source": "https://github.com/symfony/finder/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -1704,7 +1704,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-05T14:36:47+00:00" "time": "2025-12-23T14:52:06+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
@@ -2358,16 +2358,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v8.0.0", "version": "v8.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149" "reference": "0cbbd88ec836f8757641c651bb995335846abb78"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/a0a750500c4ce900d69ba4e9faf16f82c10ee149", "url": "https://api.github.com/repos/symfony/process/zipball/0cbbd88ec836f8757641c651bb995335846abb78",
"reference": "a0a750500c4ce900d69ba4e9faf16f82c10ee149", "reference": "0cbbd88ec836f8757641c651bb995335846abb78",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2399,7 +2399,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v8.0.0" "source": "https://github.com/symfony/process/tree/v8.0.3"
}, },
"funding": [ "funding": [
{ {
@@ -2419,7 +2419,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-16T16:25:44+00:00" "time": "2025-12-19T10:01:18+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",

View File

@@ -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. 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 ## 2025
- Diego Algorta
- Jihad - Jihad
- jreyesr - jreyesr
- codearena-bot - codearena-bot

View File

@@ -25,11 +25,11 @@ declare(strict_types=1);
namespace FireflyIII\Api\V1\Controllers\Search; namespace FireflyIII\Api\V1\Controllers\Search;
use FireflyIII\Api\V1\Controllers\Controller; use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Api\V1\Requests\Search\TransactionSearchRequest;
use FireflyIII\Support\JsonApi\Enrichments\TransactionGroupEnrichment; use FireflyIII\Support\JsonApi\Enrichments\TransactionGroupEnrichment;
use FireflyIII\Support\Search\SearchInterface; use FireflyIII\Support\Search\SearchInterface;
use FireflyIII\Transformers\TransactionGroupTransformer; use FireflyIII\Transformers\TransactionGroupTransformer;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection; use League\Fractal\Resource\Collection;
@@ -42,12 +42,12 @@ class TransactionController extends Controller
* This endpoint is documented at: * This endpoint is documented at:
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/search/searchTransactions * 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(); $manager = $this->getManager();
$fullQuery = (string) $request->get('query'); $fullQuery = (string) $request->attributes->get('query');
$page = 0 === (int) $request->get('page') ? 1 : (int) $request->get('page'); $page = $request->attributes->get('page');
$pageSize = $this->parameters->get('limit'); $pageSize = $request->attributes->get('limit');
$searcher->parseQuery($fullQuery); $searcher->parseQuery($fullQuery);
$searcher->setPage($page); $searcher->setPage($page);
$searcher->setLimit($pageSize); $searcher->setLimit($pageSize);

View File

@@ -28,10 +28,10 @@ use FireflyIII\Api\V1\Controllers\Controller;
use FireflyIII\Jobs\SendWebhookMessage; use FireflyIII\Jobs\SendWebhookMessage;
use FireflyIII\Models\Webhook; use FireflyIII\Models\Webhook;
use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface; use FireflyIII\Repositories\Webhook\WebhookRepositoryInterface;
use FireflyIII\Support\Facades\FireflyConfig;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class SubmitController * Class SubmitController

View File

@@ -79,8 +79,8 @@ class UpdateRequest extends FormRequest
'start_date' => 'date|nullable', 'start_date' => 'date|nullable',
'target_date' => 'date|nullable|after:start_date', 'target_date' => 'date|nullable|after:start_date',
'notes' => 'max:65000', 'notes' => 'max:65000',
'accounts' => 'required', 'accounts' => 'array',
'accounts.*' => 'array|required', 'accounts.*' => 'array',
'accounts.*.account_id' => ['required', 'numeric', 'belongsToUser:accounts,id'], 'accounts.*.account_id' => ['required', 'numeric', 'belongsToUser:accounts,id'],
'accounts.*.current_amount' => ['numeric', 'nullable', new IsValidZeroOrMoreAmount(true)], 'accounts.*.current_amount' => ['numeric', 'nullable', new IsValidZeroOrMoreAmount(true)],
'object_group_id' => 'numeric|belongsToUser:object_groups,id', 'object_group_id' => 'numeric|belongsToUser:object_groups,id',

View 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);
}
);
}
}

View 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],
];
}
}

View File

@@ -37,17 +37,19 @@ class UpdateRequest extends FormRequest
use ChecksLogin; use ChecksLogin;
use ConvertsDataTypes; 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. * Get all data from the request.
*/ */
public function getAll(): array public function getAll(): array
{ {
$name = $this->route()->parameter('dynamicConfigKey'); $name = $this->route()->parameter('dynamicConfigKey');
if (in_array($name, $this->booleans, true)) {
if ('configuration.is_demo_site' === $name || 'configuration.single_user_mode' === $name) {
return ['value' => $this->boolean('value')]; 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')]; return ['value' => $this->convertInteger('value')];
} }
@@ -61,13 +63,13 @@ class UpdateRequest extends FormRequest
{ {
$name = $this->route()->parameter('configName'); $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()]]; return ['value' => ['required', new IsBoolean()]];
} }
if ('configuration.permission_update_check' === $name) { if ('configuration.permission_update_check' === $name) {
return ['value' => 'required|numeric|min:-1|max:1']; 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']; return ['value' => 'required|numeric|min:464272080'];
} }

View File

@@ -84,7 +84,7 @@ class CorrectsAmounts extends Command
/** @var AccountRepositoryInterface $repository */ /** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class); $repository = app(AccountRepositoryInterface::class);
$type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first(); $type = TransactionType::where('type', TransactionTypeEnum::TRANSFER->value)->first();
$journals = TransactionJournal::where('transaction_type_id', $type->id)->get(); $journals = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')->whereNotNull('transactions.foreign_amount')->where('transaction_journals.transaction_type_id', $type->id)->distinct()->get(['transaction_journals.*']);
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
foreach ($journals as $journal) { foreach ($journals as $journal) {
@@ -93,7 +93,7 @@ class CorrectsAmounts extends Command
$valid = $this->validateJournal($journal); $valid = $this->validateJournal($journal);
if (false === $valid) { if (false === $valid) {
Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id)); // Log::debug(sprintf('Journal #%d does not need to be fixed or is invalid (see previous messages)', $journal->id));
continue; continue;
} }
@@ -298,7 +298,7 @@ class CorrectsAmounts extends Command
return false; return false;
} }
if (null === $source->foreign_currency_id || null === $destination->foreign_currency_id) { if (null === $source->foreign_currency_id || null === $destination->foreign_currency_id) {
Log::debug('No foreign currency information is present, can safely continue with other transactions.'); // Log::debug('No foreign currency information is present, can safely continue with other transactions.');
return false; return false;
} }

View File

@@ -24,15 +24,20 @@ declare(strict_types=1);
namespace FireflyIII\Events\Model\TransactionGroup; namespace FireflyIII\Events\Model\TransactionGroup;
use FireflyIII\Events\Event; use FireflyIII\Events\Event;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Models\TransactionGroup; use FireflyIII\Models\TransactionGroup;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
class TriggeredStoredTransactionGroup extends Event class TriggeredStoredTransactionGroup extends Event
{ {
use SerializesModels; use SerializesModels;
public ?RuleGroup $ruleGroup = null;
/** /**
* Create a new event instance. * Create a new event instance.
*/ */
public function __construct(public TransactionGroup $transactionGroup) {} public function __construct(public TransactionGroup $transactionGroup, ?RuleGroup $ruleGroup = null)
{
$this->ruleGroup = $ruleGroup;
}
} }

View File

@@ -51,7 +51,7 @@ class TransactionJournalMetaFactory
Log::debug('Is a carbon object.'); Log::debug('Is a carbon object.');
$value = $data['data']->toW3cString(); $value = $data['data']->toW3cString();
} }
if ('' === (string) $value) { if ('' === (string)$value) {
// Log::debug('Is an empty string.'); // Log::debug('Is an empty string.');
// don't store blank strings. // don't store blank strings.
if (null !== $entry) { if (null !== $entry) {

View File

@@ -28,6 +28,7 @@ use FireflyIII\Events\Model\TransactionGroup\TriggeredStoredTransactionGroup;
use FireflyIII\Events\RequestedSendWebhookMessages; use FireflyIII\Events\RequestedSendWebhookMessages;
use FireflyIII\Events\StoredTransactionGroup; use FireflyIII\Events\StoredTransactionGroup;
use FireflyIII\Generator\Webhook\MessageGeneratorInterface; use FireflyIII\Generator\Webhook\MessageGeneratorInterface;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\PeriodStatistic\PeriodStatisticRepositoryInterface; use FireflyIII\Repositories\PeriodStatistic\PeriodStatisticRepositoryInterface;
@@ -46,7 +47,7 @@ class StoredGroupEventHandler
{ {
public function runAllHandlers(StoredTransactionGroup $event): void public function runAllHandlers(StoredTransactionGroup $event): void
{ {
$this->processRules($event); $this->processRules($event, null);
$this->recalculateCredit($event); $this->recalculateCredit($event);
$this->triggerWebhooks($event); $this->triggerWebhooks($event);
$this->removePeriodStatistics($event); $this->removePeriodStatistics($event);
@@ -55,13 +56,13 @@ class StoredGroupEventHandler
public function triggerRulesManually(TriggeredStoredTransactionGroup $event): void public function triggerRulesManually(TriggeredStoredTransactionGroup $event): void
{ {
$newEvent = new StoredTransactionGroup($event->transactionGroup, true, false); $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. * 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) { if (false === $storedGroupEvent->applyRules) {
Log::info(sprintf('Will not run rules on group #%d', $storedGroupEvent->transactionGroup->id)); 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. // add the groups to the rule engine.
// it should run the rules in the group and cancel the group if necessary. // it should run the rules in the group and cancel the group if necessary.
if (null === $ruleGroup) {
Log::debug('Fire processRules with ALL store-journal rule groups.');
$groups = $ruleGroupRepository->getRuleGroupsWithRules('store-journal'); $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. // create and fire rule engine.
$newRuleEngine = app(RuleEngineInterface::class); $newRuleEngine = app(RuleEngineInterface::class);

View File

@@ -24,11 +24,12 @@ declare(strict_types=1);
namespace FireflyIII\Handlers\Observer; namespace FireflyIII\Handlers\Observer;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Support\Facades\Amount; use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\FireflyConfig;
use FireflyIII\Support\Http\Api\ExchangeRateConverter; use FireflyIII\Support\Http\Api\ExchangeRateConverter;
use FireflyIII\Support\Models\AccountBalanceCalculator; use FireflyIII\Support\Models\AccountBalanceCalculator;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use FireflyIII\Support\Facades\FireflyConfig;
/** /**
* Class TransactionObserver * Class TransactionObserver
@@ -42,7 +43,10 @@ class TransactionObserver
Log::debug('Observe "created" of a transaction.'); 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)) { 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'); Log::debug('Trigger recalculateForJournal');
AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal); $journal = $transaction->transactionJournal;
if ($journal instanceof TransactionJournal) {
AccountBalanceCalculator::recalculateForJournal($journal);
}
} }
$this->updatePrimaryCurrencyAmount($transaction); $this->updatePrimaryCurrencyAmount($transaction);
} }
@@ -56,7 +60,10 @@ class TransactionObserver
$transaction->native_amount = null; $transaction->native_amount = null;
$transaction->native_foreign_amount = null; $transaction->native_foreign_amount = null;
// first normal amount // 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 = new ExchangeRateConverter();
$converter->setUserGroup($transaction->transactionJournal->user->userGroup); $converter->setUserGroup($transaction->transactionJournal->user->userGroup);
$converter->setIgnoreSettings(true); $converter->setIgnoreSettings(true);

View File

@@ -66,7 +66,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) { if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */ /** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int) $currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
@@ -98,7 +98,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) { if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */ /** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int) $currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
@@ -135,7 +135,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) { if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */ /** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int) $currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
@@ -174,9 +174,10 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) { if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */ /** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class); $repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int) $currencyId); $currency = $repos->find((int)$currencyId);
} }
/** @var JournalRepositoryInterface $repository */ /** @var JournalRepositoryInterface $repository */
$repository = app(JournalRepositoryInterface::class); $repository = app(JournalRepositoryInterface::class);
$repository->setUser($account->user); $repository->setUser($account->user);
@@ -187,11 +188,11 @@ class PopupReport implements PopupReportInterface
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
// set report accounts + the request accounts: // the source account must be in the set.
// $set = $attributes['accounts'] ?? new Collection; $set = $attributes['accounts'] ?? new Collection();
// $set->push($account);
$collector->setDestinationAccounts(new Collection()->push($account)) $collector->setDestinationAccounts(new Collection()->push($account))
->setSourceAccounts($set)
->setRange($attributes['startDate'], $attributes['endDate']) ->setRange($attributes['startDate'], $attributes['endDate'])
->withAccountInformation() ->withAccountInformation()
->withBudgetInformation() ->withBudgetInformation()

View File

@@ -212,6 +212,13 @@ class ReconcileController extends Controller
$startBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $startDate)[$account->id]; $startBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $startDate)[$account->id];
$endBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id]; $endBalance = Steam::accountsBalancesOptimized(new Collection()->push($account), $end)[$account->id];
// round balances.
foreach ($startBalance as $key => $value) {
$startBalance[$key] = Steam::bcround($value, $currency->decimal_places);
}
foreach ($endBalance as $key => $value) {
$endBalance[$key] = Steam::bcround($value, $currency->decimal_places);
}
// get the transactions // get the transactions

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use FireflyIII\Support\Facades\Navigation;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Enums\AccountTypeEnum; use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Events\Preferences\UserGroupChangedPrimaryCurrency; use FireflyIII\Events\Preferences\UserGroupChangedPrimaryCurrency;
@@ -33,7 +32,9 @@ use FireflyIII\Http\Requests\PreferencesRequest;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\Preference; use FireflyIII\Models\Preference;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Support\Facades\Navigation;
use FireflyIII\Support\Facades\Preferences; use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Singleton\PreferencesSingleton; use FireflyIII\Support\Singleton\PreferencesSingleton;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\Factory;
@@ -44,7 +45,6 @@ use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use JsonException; use JsonException;
use Safe\Exceptions\FilesystemException; use Safe\Exceptions\FilesystemException;
use FireflyIII\Support\Facades\Steam;
use function Safe\file_get_contents; use function Safe\file_get_contents;
use function Safe\json_decode; use function Safe\json_decode;
@@ -63,7 +63,7 @@ class PreferencesController extends Controller
$this->middleware( $this->middleware(
static function ($request, $next) { 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'); app('view')->share('mainTitleIcon', 'fa-gear');
return $next($request); return $next($request);
@@ -97,7 +97,7 @@ class PreferencesController extends Controller
if ('opt_group_' === $role) { if ('opt_group_' === $role) {
$role = 'opt_group_defaultAsset'; $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); ksort($groupedAccounts);
@@ -120,21 +120,22 @@ class PreferencesController extends Controller
if (is_array($fiscalYearStartStr)) { if (is_array($fiscalYearStartStr)) {
$fiscalYearStartStr = '01-01'; $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; $tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data;
$availableDarkModes = config('firefly.available_dark_modes'); $availableDarkModes = config('firefly.available_dark_modes');
// notifications settings // notifications settings
$slackUrl = Preferences::getEncrypted('slack_webhook_url', '')->data; $slackUrl = Preferences::getEncrypted('slack_webhook_url', '')->data;
$pushoverAppToken = (string) Preferences::getEncrypted('pushover_app_token', '')->data; $pushoverAppToken = (string)Preferences::getEncrypted('pushover_app_token', '')->data;
$pushoverUserToken = (string) Preferences::getEncrypted('pushover_user_token', '')->data; $pushoverUserToken = (string)Preferences::getEncrypted('pushover_user_token', '')->data;
$ntfyServer = Preferences::getEncrypted('ntfy_server', 'https://ntfy.sh')->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; $ntfyAuth = '1' === Preferences::get('ntfy_auth', false)->data;
$ntfyUser = Preferences::getEncrypted('ntfy_user', '')->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'); $channels = config('notifications.channels');
$forcedAvailability = []; $forcedAvailability = [];
$anonymous = Steam::anonymous();
// notification preferences // notification preferences
$notifications = []; $notifications = [];
@@ -164,7 +165,7 @@ class PreferencesController extends Controller
Log::error($e->getMessage()); Log::error($e->getMessage());
$locales = []; $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 // an important fallback is that the frontPageAccount array gets refilled automatically
// when it turns up empty. // when it turns up empty.
if (0 === count($frontpageAccounts)) { if (0 === count($frontpageAccounts)) {
@@ -184,7 +185,7 @@ class PreferencesController extends Controller
$ntfyPass = ''; $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 = []; $frontpageAccounts = [];
if (is_array($request->get('frontpageAccounts')) && count($request->get('frontpageAccounts')) > 0) { if (is_array($request->get('frontpageAccounts')) && count($request->get('frontpageAccounts')) > 0) {
foreach ($request->get('frontpageAccounts') as $id) { foreach ($request->get('frontpageAccounts') as $id) {
$frontpageAccounts[] = (int) $id; $frontpageAccounts[] = (int)$id;
} }
Preferences::set('frontpageAccounts', $frontpageAccounts); Preferences::set('frontpageAccounts', $frontpageAccounts);
} }
@@ -241,7 +242,7 @@ class PreferencesController extends Controller
} }
// convert primary // convert primary
$convertToPrimary = 1 === (int) $request->get('convertToPrimary'); $convertToPrimary = 1 === (int)$request->get('convertToPrimary');
if ($convertToPrimary && !$this->convertToPrimary) { if ($convertToPrimary && !$this->convertToPrimary) {
// set to true! // set to true!
Log::debug('User sets convertToPrimary to true.'); Log::debug('User sets convertToPrimary to true.');
@@ -253,9 +254,9 @@ class PreferencesController extends Controller
Preferences::set('convert_to_primary', $convertToPrimary); Preferences::set('convert_to_primary', $convertToPrimary);
// custom fiscal year // custom fiscal year
$customFiscalYear = 1 === (int) $request->get('customFiscalYear'); $customFiscalYear = 1 === (int)$request->get('customFiscalYear');
Preferences::set('customFiscalYear', $customFiscalYear); Preferences::set('customFiscalYear', $customFiscalYear);
$fiscalYearString = (string) $request->get('fiscalYearStart'); $fiscalYearString = (string)$request->get('fiscalYearStart');
if ('' !== $fiscalYearString) { if ('' !== $fiscalYearString) {
$fiscalYearStart = Carbon::parse($fiscalYearString, config('app.timezone'))->format('m-d'); $fiscalYearStart = Carbon::parse($fiscalYearString, config('app.timezone'))->format('m-d');
Preferences::set('fiscalYearStart', $fiscalYearStart); Preferences::set('fiscalYearStart', $fiscalYearStart);
@@ -263,7 +264,7 @@ class PreferencesController extends Controller
// save page size: // save page size:
Preferences::set('listPageSize', 50); Preferences::set('listPageSize', 50);
$listPageSize = (int) $request->get('listPageSize'); $listPageSize = (int)$request->get('listPageSize');
if ($listPageSize > 0 && $listPageSize < 1337) { if ($listPageSize > 0 && $listPageSize < 1337) {
Preferences::set('listPageSize', $listPageSize); Preferences::set('listPageSize', $listPageSize);
} }
@@ -282,7 +283,7 @@ class PreferencesController extends Controller
// same for locale: // same for locale:
if (!auth()->user()->hasRole('demo')) { if (!auth()->user()->hasRole('demo')) {
$locale = (string) $request->get('locale'); $locale = (string)$request->get('locale');
$locale = '' === $locale ? null : $locale; $locale = '' === $locale ? null : $locale;
Preferences::set('locale', $locale); Preferences::set('locale', $locale);
} }
@@ -311,7 +312,12 @@ class PreferencesController extends Controller
Preferences::set('darkMode', $darkMode); 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(); Preferences::mark();
return redirect(route('preferences.index')); return redirect(route('preferences.index'));
@@ -325,7 +331,7 @@ class PreferencesController extends Controller
switch ($channel) { switch ($channel) {
default: default:
session()->flash('error', (string) trans('firefly.notification_test_failed', ['channel' => $channel])); session()->flash('error', (string)trans('firefly.notification_test_failed', ['channel' => $channel]));
break; break;
@@ -337,7 +343,7 @@ class PreferencesController extends Controller
$user = auth()->user(); $user = auth()->user();
Log::debug(sprintf('Now in testNotification("%s") controller.', $channel)); Log::debug(sprintf('Now in testNotification("%s") controller.', $channel));
event(new UserTestNotificationChannel($channel, $user)); 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 ''; return '';

View File

@@ -35,6 +35,7 @@ use FireflyIII\Models\TransactionGroup;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
@@ -70,13 +71,20 @@ class ExecutionController extends Controller
*/ */
public function execute(SelectTransactionsRequest $request, RuleGroup $ruleGroup): RedirectResponse 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 // Get parameters specified by the user
$accounts = $request->get('accounts'); $accounts = $request->get('accounts');
$set = new Collection();
if (is_array($accounts)) {
$set = $this->repository->getAccountsById($accounts); $set = $this->repository->getAccountsById($accounts);
}
/** @var GroupCollectorInterface $collector */ /** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class); $collector = app(GroupCollectorInterface::class);
if (count($set) > 0) {
$collector->setAccounts($set); $collector->setAccounts($set);
}
// add date operators. // add date operators.
if (null !== $request->get('start')) { if (null !== $request->get('start')) {
$startDate = new Carbon($request->get('start')); $startDate = new Carbon($request->get('start'));
@@ -96,7 +104,7 @@ class ExecutionController extends Controller
/** @var TransactionGroup $group */ /** @var TransactionGroup $group */
foreach ($groups as $group) { foreach ($groups as $group) {
Log::debug(sprintf('Processing group #%d.', $group->id)); Log::debug(sprintf('Processing group #%d.', $group->id));
event(new TriggeredStoredTransactionGroup($group)); event(new TriggeredStoredTransactionGroup($group, $ruleGroup));
} }
} }

View File

@@ -191,7 +191,7 @@ class WarnAboutBills implements ShouldQueue
$diff = $earliest->diffInDays($this->date); $diff = $earliest->diffInDays($this->date);
Log::debug(sprintf('Difference in days is %s', $diff)); 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 private function sendOverdueAlerts(User $user, array $overdue): void

View File

@@ -27,8 +27,6 @@ use FireflyIII\Enums\UserRoleEnum;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Attachment; use FireflyIII\Models\Attachment;
use FireflyIII\Models\UserGroup; use FireflyIII\Models\UserGroup;
use FireflyIII\User;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
/** /**
@@ -38,7 +36,6 @@ use Illuminate\Support\Collection;
* @method getUserGroup() * @method getUserGroup()
* @method getUser() * @method getUser()
* @method checkUserGroupAccess(UserRoleEnum $role) * @method checkUserGroupAccess(UserRoleEnum $role)
* @method setUser(null|Authenticatable|User $user)
* @method setUserGroupById(int $userGroupId) * @method setUserGroupById(int $userGroupId)
*/ */
interface AttachmentRepositoryInterface interface AttachmentRepositoryInterface

View File

@@ -68,8 +68,7 @@ class JournalUpdateService
private ?Account $destinationAccount = null; private ?Account $destinationAccount = null;
private ?Transaction $destinationTransaction = null; private ?Transaction $destinationTransaction = null;
private array $metaDate private array $metaDate
= ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date', '_internal_previous_date'];
'invoice_date', ];
private array $metaString private array $metaString
= [ = [
'sepa_cc', 'sepa_cc',
@@ -205,11 +204,9 @@ class JournalUpdateService
$validator->setUser($this->transactionJournal->user); $validator->setUser($this->transactionJournal->user);
$result = $validator->validateSource(['id' => $sourceId, 'name' => $sourceName]); $result = $validator->validateSource(['id' => $sourceId, 'name' => $sourceName]);
Log::debug( Log::debug(sprintf('hasValidSourceAccount(%d, "%s") will return %s', $sourceId, $sourceName, var_export($result, true)));
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: // validate submitted info:
return $result; return $result;
@@ -283,14 +280,7 @@ class JournalUpdateService
$validator->setUser($this->transactionJournal->user); $validator->setUser($this->transactionJournal->user);
$validator->source = $this->getValidSourceAccount(); $validator->source = $this->getValidSourceAccount();
$result = $validator->validateDestination(['id' => $destId, 'name' => $destName]); $result = $validator->validateDestination(['id' => $destId, 'name' => $destName]);
Log::debug( Log::debug(sprintf('hasValidDestinationAccount(%d, "%s") will return %s', $destId, $destName, var_export($result, true)));
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. // TODO typeOverrule: the account validator may have another opinion on the transaction type.
@@ -494,6 +484,24 @@ class JournalUpdateService
// do some parsing. // do some parsing.
Log::debug(sprintf('Create date value from string "%s".', $value)); Log::debug(sprintf('Create date value from string "%s".', $value));
$this->transactionJournal->date_tz = $value->format('e'); $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)); event(new TriggeredAuditLog($this->transactionJournal->user, $this->transactionJournal, sprintf('update_%s', $fieldName), $this->transactionJournal->{$fieldName}, $value));
@@ -652,7 +660,7 @@ class JournalUpdateService
} }
$value = $this->data['amount'] ?? ''; $value = $this->data['amount'] ?? '';
Log::debug(sprintf('Amount is now "%s"', $value)); Log::debug(sprintf('[a] Amount is now "%s"', $value));
try { try {
$amount = $this->getAmount($value); $amount = $this->getAmount($value);
@@ -661,15 +669,18 @@ class JournalUpdateService
return; return;
} }
Log::debug(sprintf('[b] Amount is now "%s"', $value));
$origSourceTransaction = $this->getSourceTransaction(); $origSourceTransaction = $this->getSourceTransaction();
$destTransaction = $this->getDestinationTransaction();
$originalSourceAmount = $origSourceTransaction->amount;
$originalDestAmount = $destTransaction->amount;
$origSourceTransaction->amount = Steam::negative($amount); $origSourceTransaction->amount = Steam::negative($amount);
$origSourceTransaction->balance_dirty = true; $origSourceTransaction->balance_dirty = true;
$origSourceTransaction->save();
$destTransaction = $this->getDestinationTransaction();
$originalAmount = $destTransaction->amount;
$destTransaction->amount = Steam::positive($amount); $destTransaction->amount = Steam::positive($amount);
$destTransaction->balance_dirty = true; $destTransaction->balance_dirty = true;
$destTransaction->save(); $destTransaction->save();
$origSourceTransaction->save();
// refresh transactions. // refresh transactions.
$this->sourceTransaction->refresh(); $this->sourceTransaction->refresh();
$this->destinationTransaction->refresh(); $this->destinationTransaction->refresh();
@@ -679,29 +690,52 @@ class JournalUpdateService
if (null === $group) { if (null === $group) {
$group = $this->transactionJournal?->transactionGroup; $group = $this->transactionJournal?->transactionGroup;
} }
if (null === $group) { if (null === $group || null === $this->transactionJournal) {
return; return;
} }
if (0 === bccomp($origSourceTransaction->amount, $originalSourceAmount)) {
Log::debug('Amount was not actually changed, return.');
return;
}
Log::debug('Amount was changed.');
$transfer = TransactionTypeEnum::TRANSFER->value === $this->transactionJournal->transactionType->type;
$withdrawal = TransactionTypeEnum::WITHDRAWAL->value === $this->transactionJournal->transactionType->type;
$deposit = TransactionTypeEnum::DEPOSIT->value === $this->transactionJournal->transactionType->type;
$makePositive = $transfer || $deposit ? true : false;
// assume withdrawal, use the source for amount (negative), and destination for currency.
$originalAmount = $originalSourceAmount;
$recordCurrency = $destTransaction->transactionCurrency;
Log::debug(sprintf('Transaction is a %s, original amount is %s and currency is %s', $this->transactionJournal->transactionType->type, $originalAmount, $recordCurrency->code));
if ($withdrawal || $transfer) {
Log::debug('Use these values to record a changed withdrawal amount');
}
if (!$withdrawal && !$transfer) {
$originalAmount = $originalDestAmount;
$recordCurrency = $origSourceTransaction->transactionCurrency;
Log::debug('Use destination amount to record a changed withdrawal amount');
Log::debug(sprintf('Transaction is a %s, original amount now is %s and currency is now %s', $this->transactionJournal->transactionType->type, $originalAmount, $recordCurrency->code));
}
$originalAmount = $makePositive ? Steam::positive($originalAmount) : Steam::negative($originalAmount);
$value = $makePositive ? Steam::positive($value) : Steam::negative($value);
// should not return in NULL but seems to do. // should not return in NULL but seems to do.
if (0 !== bccomp($originalAmount, $value)) {
event(new TriggeredAuditLog( event(new TriggeredAuditLog(
$group->user, $group->user,
$group, $group,
'update_amount', 'update_amount',
[ [
'currency_symbol' => $destTransaction->transactionCurrency->symbol, 'currency_symbol' => $recordCurrency->symbol,
'decimal_places' => $destTransaction->transactionCurrency->decimal_places, 'decimal_places' => $recordCurrency->decimal_places,
'amount' => $originalAmount, 'amount' => $originalAmount,
], ],
[ [
'currency_symbol' => $destTransaction->transactionCurrency->symbol, 'currency_symbol' => $recordCurrency->symbol,
'decimal_places' => $destTransaction->transactionCurrency->decimal_places, 'decimal_places' => $recordCurrency->decimal_places,
'amount' => $value, 'amount' => $value,
] ]
)); ));
} }
}
private function updateForeignAmount(): void private function updateForeignAmount(): void
{ {

View File

@@ -34,10 +34,16 @@ class DynamicConfigKey
{ {
public static array $accepted public static array $accepted
= [ = [
'configuration.is_demo_site', 'configuration.is_demo_site', // boolean
'configuration.permission_update_check', 'configuration.permission_update_check', // -1, 0 or 1 (never asked, no permission, permission)
'configuration.single_user_mode', 'configuration.single_user_mode', // boolean
'configuration.last_update_check', '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")
]; ];
/** /**

View File

@@ -157,6 +157,11 @@ trait GetConfigurationData
$index = (string)trans('firefly.year_to_date'); $index = (string)trans('firefly.year_to_date');
$ranges[$index] = [$yearBegin, new Carbon()]; $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 // everything
$index = (string)trans('firefly.everything'); $index = (string)trans('firefly.everything');
$ranges[$index] = [$first, new Carbon()]; $ranges[$index] = [$first, new Carbon()];

View File

@@ -245,7 +245,6 @@ trait RenderPartialViews
if (null === $account) { if (null === $account) {
return 'This is an unknown account. Apologies.'; return 'This is an unknown account. Apologies.';
} }
$journals = $popupHelper->byExpenses($account, $attributes); $journals = $popupHelper->byExpenses($account, $attributes);
try { try {

View File

@@ -321,7 +321,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
$array['foreign_currency_code'] = $entry->foreign_currency_code; $array['foreign_currency_code'] = $entry->foreign_currency_code;
$array['foreign_currency_symbol'] = $entry->foreign_currency_symbol; $array['foreign_currency_symbol'] = $entry->foreign_currency_symbol;
$array['foreign_currency_decimal_places'] = $entry->foreign_currency_decimal_places; $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. // convert to primary, but is already primary.
if ($this->convertToPrimary && (int)$entry->transaction_currency_id === $this->primaryCurrency->id) { 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. // convert to primary, but is NOT already primary.
if ($this->convertToPrimary && (int)$entry->transaction_currency_id !== $this->primaryCurrency->id) { 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. // convert to primary, but foreign is already primary.
if ($this->convertToPrimary && (int)$entry->foreign_currency_id === $this->primaryCurrency->id) { 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. // TODO this is very database intensive.
/** @var TransactionCurrency $foreignCurrency */ /** @var TransactionCurrency $foreignCurrency */
$foreignCurrency = Amount::getTransactionCurrencyById($entry->foreign_currency_id); $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; $result[] = $array;
} }

View File

@@ -72,12 +72,25 @@ class AccountBalanceCalculator
$set[$transaction->account_id] = $transaction->account; $set[$transaction->account_id] = $transaction->account;
} }
$accounts = new Collection()->push(...$set); $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 private function getLatestBalance(int $accountId, int $currencyId, ?Carbon $notBefore): string
{ {
if (!$notBefore instanceof Carbon) { if (!$notBefore instanceof Carbon) {
Log::debug(sprintf('Start balance for account #%d and currency #%d is 0.', $accountId, $currencyId));
return '0'; return '0';
} }
Log::debug(sprintf('getLatestBalance: notBefore date is "%s", calculating', $notBefore->format('Y-m-d'))); Log::debug(sprintf('getLatestBalance: notBefore date is "%s", calculating', $notBefore->format('Y-m-d')));

View File

@@ -23,16 +23,16 @@ declare(strict_types=1);
namespace FireflyIII\Support; namespace FireflyIII\Support;
use FireflyIII\Support\Facades\Preferences;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Exceptions\IntervalException; use FireflyIII\Exceptions\IntervalException;
use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
use FireflyIII\Support\Calendar\Calculator; use FireflyIII\Support\Calendar\Calculator;
use FireflyIII\Support\Calendar\Periodicity; use FireflyIII\Support\Calendar\Periodicity;
use FireflyIII\Support\Facades\Preferences;
use FireflyIII\Support\Facades\Steam;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Throwable; use Throwable;
use FireflyIII\Support\Facades\Steam;
/** /**
* Class Navigation. * Class Navigation.
@@ -214,6 +214,11 @@ class Navigation
Log::debug('endOfPeriod() requests "YTD" + future, set it to "1Y" instead.'); Log::debug('endOfPeriod() requests "YTD" + future, set it to "1Y" instead.');
$repeatFreq = '1Y'; $repeatFreq = '1Y';
} }
if ('QTD' === $repeatFreq && $end->isFuture()) {
// fall back to a yearly schedule if the requested period is YTD.
Log::debug('endOfPeriod() requests "YTD" + future, set it to "3M" instead.');
$repeatFreq = '3M';
}
$functionMap = [ $functionMap = [
'1D' => 'endOfDay', '1D' => 'endOfDay',
@@ -294,9 +299,27 @@ class Navigation
}; };
if (null !== $result) { if (null !== $result) {
// add sanity check. // add sanity check.
if ($currentEnd->lt($end)) {
switch ($repeatFreq) {
case 'QTD':
$currentEnd = $end->clone()->endOfQuarter()->setMilli(0);
break;
case 'MTD':
$currentEnd = $end->clone()->endOfMonth()->setMilli(0);
break;
case 'YTD':
$currentEnd = $end->clone()->endOfYear()->setMilli(0);
break;
}
if ($currentEnd->lt($end)) { if ($currentEnd->lt($end)) {
throw new FireflyException(sprintf('[d] endOfPeriod(%s, %s) failed, because it resulted in %s.', $end->toW3cString(), $repeatFreq, $currentEnd->toW3cString())); throw new FireflyException(sprintf('[d] endOfPeriod(%s, %s) failed, because it resulted in %s.', $end->toW3cString(), $repeatFreq, $currentEnd->toW3cString()));
} }
}
return $result; return $result;
} }

View File

@@ -28,6 +28,7 @@ use FireflyIII\Models\Account;
use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\Support\Facades\Amount; use FireflyIII\Support\Facades\Amount;
use FireflyIII\Support\Facades\FireflyConfig;
use FireflyIII\Support\Facades\Steam; use FireflyIII\Support\Facades\Steam;
use FireflyIII\Support\Search\OperatorQuerySearch; use FireflyIII\Support\Search\OperatorQuerySearch;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
@@ -72,6 +73,7 @@ class General extends AbstractExtension
$this->hasRole(), $this->hasRole(),
$this->getRootSearchOperator(), $this->getRootSearchOperator(),
$this->carbonize(), $this->carbonize(),
$this->fireflyIIIConfig(),
]; ];
} }
@@ -393,4 +395,14 @@ class General extends AbstractExtension
static fn (string $str): string => date($str) static fn (string $str): string => date($str)
); );
} }
private function fireflyIIIConfig()
{
return new TwigFunction(
'fireflyiiiconfig',
static function (string $string, mixed $default): mixed {
return FireflyConfig::get($string, $default)->data;
}
);
}
} }

View File

@@ -75,7 +75,7 @@ class TransactionGroupTransformer extends AbstractTransformer
'recurrence_count', 'recurrence_count',
'recurrence_total', '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 public function transform(array $group): array

View File

@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
## v6.4.15 - 2026-01-07
### Added
- [Issue 11264](https://github.com/firefly-iii/firefly-iii/issues/11264) (Add GUI for some settings, replacing environment variables) reported by @jacobburrell
- [Discussion 11433](https://github.com/orgs/firefly-iii/discussions/11433) (Updates to Date Range selection) started by @fett327
### Changed
- Moved some settings to your system settings
### Removed
- The following environment variables are removed and will no longer work. They are now in your settings.
- `ENABLE_EXTERNAL_MAP`
- `ENABLE_EXCHANGE_RATES`
- `ENABLE_EXTERNAL_RATES`
- `VALID_URL_PROTOCOLS`
- `ALLOW_WEBHOOKS`
- `USE_RUNNING_BALANCE`
- Removed sentry.io code
### Fixed
- [Issue 11378](https://github.com/firefly-iii/firefly-iii/issues/11378) (Wrong account balance with initial transfer from different currency) reported by @bozho
- [Issue 11383](https://github.com/firefly-iii/firefly-iii/issues/11383) (Login flow could redirect to javascript path) reported by @stefvonb
- [Issue 11388](https://github.com/firefly-iii/firefly-iii/issues/11388) (TypeError bugs during upgrade to 6.4.14 + account_balances corruption) reported by @jaconde2
- [Issue 11396](https://github.com/firefly-iii/firefly-iii/issues/11396) (Reconciliation adds extra digits) reported by @niklas2810
- [Issue 11399](https://github.com/firefly-iii/firefly-iii/issues/11399) (Unusual behavior in audit logs (multi-currency)) reported by @jgmm81
- [Issue 11403](https://github.com/firefly-iii/firefly-iii/issues/11403) (Error 404 when trying to view the details (Piggy banks section)) reported by @jgmm81
- [Issue 11410](https://github.com/firefly-iii/firefly-iii/issues/11410) (nitpick: Bulk edit tags should keep the option chosen instead of always changing back to "replace") reported by @jxtxzzw
- [Issue 11443](https://github.com/firefly-iii/firefly-iii/issues/11443) (Exception thrown, when subscription is in foreign currency) reported by @ajgon
- [Issue 11445](https://github.com/firefly-iii/firefly-iii/issues/11445) (“Reconcile” screen breaks when Preferences → Layout is set to “Year to date”) reported by @semonsir
- [Issue 11449](https://github.com/firefly-iii/firefly-iii/issues/11449) (Non-strict rules break with "Apply rule" and "Apply rule group") reported by @Bytenka
## v6.4.14 - 2025-12-17 ## v6.4.14 - 2025-12-17
### Fixed ### Fixed

View File

@@ -34,6 +34,9 @@
"transfers", "transfers",
"management" "management"
], ],
"platform": {
"php": "8.4"
},
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"homepage": "https://github.com/firefly-iii/firefly-iii", "homepage": "https://github.com/firefly-iii/firefly-iii",
"type": "project", "type": "project",
@@ -96,7 +99,7 @@
"league/commonmark": "^2", "league/commonmark": "^2",
"league/csv": "^9.10", "league/csv": "^9.10",
"league/fractal": "0.*", "league/fractal": "0.*",
"mailersend/laravel-driver": "^2.7", "mailersend/laravel-driver": "^2.12",
"nunomaduro/collision": "^8", "nunomaduro/collision": "^8",
"pragmarx/google2fa": "^8.0", "pragmarx/google2fa": "^8.0",
"predis/predis": "^3", "predis/predis": "^3",

357
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -75,11 +75,11 @@ return [
'webhooks' => true, 'webhooks' => true,
'handle_debts' => true, 'handle_debts' => true,
'expression_engine' => true, 'expression_engine' => true,
'running_balance_column' => env('USE_RUNNING_BALANCE', true), // this is only the default value, is not used. '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. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-12-22', 'version' => '6.4.15',
'build_time' => 1766374469, 'build_time' => 1767729818,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used. 'db_version' => 28, // field is no longer used.

View File

@@ -57,6 +57,7 @@ class TransactionCurrencySeeder extends Seeder
$currencies[] = ['code' => 'ARS', 'name' => 'Argentinian Peso', 'symbol' => '$', 'decimal_places' => 2]; $currencies[] = ['code' => 'ARS', 'name' => 'Argentinian Peso', 'symbol' => '$', 'decimal_places' => 2];
$currencies[] = ['code' => 'COP', 'name' => 'Colombian 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' => 'CLP', 'name' => 'Chilean Peso', 'symbol' => '$', 'decimal_places' => 2];
$currencies[] = ['code' => 'UYU', 'name' => 'Uruguayan Peso', 'symbol' => '$', 'decimal_places' => 2];
// oceanian currencies // oceanian currencies
$currencies[] = ['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp', 'decimal_places' => 2]; $currencies[] = ['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp', 'decimal_places' => 2];

271
package-lock.json generated
View File

@@ -2592,9 +2592,9 @@
} }
}, },
"node_modules/@rollup/rollup-android-arm-eabi": { "node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz",
"integrity": "sha512-OywsdRHrFvCdvsewAInDKCNyR3laPA2mc9bRYJ6LBp5IyvF3fvXbbNR0bSzHlZVFtn6E0xw2oZlyjg4rKCVcng==", "integrity": "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -2606,9 +2606,9 @@
] ]
}, },
"node_modules/@rollup/rollup-android-arm64": { "node_modules/@rollup/rollup-android-arm64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.1.tgz",
"integrity": "sha512-Skx39Uv+u7H224Af+bDgNinitlmHyQX1K/atIA32JP3JQw6hVODX5tkbi2zof/E69M1qH2UoN3Xdxgs90mmNYw==", "integrity": "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2620,9 +2620,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-arm64": { "node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.1.tgz",
"integrity": "sha512-k43D4qta/+6Fq+nCDhhv9yP2HdeKeP56QrUUTW7E6PhZP1US6NDqpJj4MY0jBHlJivVJD5P8NxrjuobZBJTCRw==", "integrity": "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2634,9 +2634,9 @@
] ]
}, },
"node_modules/@rollup/rollup-darwin-x64": { "node_modules/@rollup/rollup-darwin-x64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.1.tgz",
"integrity": "sha512-cOo7biqwkpawslEfox5Vs8/qj83M/aZCSSNIWpVzfU2CYHa2G3P1UN5WF01RdTHSgCkri7XOlTdtk17BezlV3A==", "integrity": "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2648,9 +2648,9 @@
] ]
}, },
"node_modules/@rollup/rollup-freebsd-arm64": { "node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.1.tgz",
"integrity": "sha512-miSvuFkmvFbgJ1BevMa4CPCFt5MPGw094knM64W9I0giUIMMmRYcGW/JWZDriaw/k1kOBtsWh1z6nIFV1vPNtA==", "integrity": "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2662,9 +2662,9 @@
] ]
}, },
"node_modules/@rollup/rollup-freebsd-x64": { "node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.1.tgz",
"integrity": "sha512-KGXIs55+b/ZfZsq9aR026tmr/+7tq6VG6MsnrvF4H8VhwflTIuYh+LFUlIsRdQSgrgmtM3fVATzEAj4hBQlaqQ==", "integrity": "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2676,9 +2676,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-gnueabihf": { "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.1.tgz",
"integrity": "sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==", "integrity": "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -2690,9 +2690,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm-musleabihf": { "node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.1.tgz",
"integrity": "sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==", "integrity": "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -2704,9 +2704,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-gnu": { "node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.1.tgz",
"integrity": "sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==", "integrity": "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2718,9 +2718,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-arm64-musl": { "node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.1.tgz",
"integrity": "sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==", "integrity": "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2732,9 +2732,23 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-loong64-gnu": { "node_modules/@rollup/rollup-linux-loong64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.1.tgz",
"integrity": "sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==", "integrity": "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==",
"cpu": [
"loong64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-loong64-musl": {
"version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.1.tgz",
"integrity": "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@@ -2746,9 +2760,23 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-ppc64-gnu": { "node_modules/@rollup/rollup-linux-ppc64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.1.tgz",
"integrity": "sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==", "integrity": "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==",
"cpu": [
"ppc64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@rollup/rollup-linux-ppc64-musl": {
"version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.1.tgz",
"integrity": "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -2760,9 +2788,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-riscv64-gnu": { "node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.1.tgz",
"integrity": "sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==", "integrity": "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -2774,9 +2802,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-riscv64-musl": { "node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.1.tgz",
"integrity": "sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==", "integrity": "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -2788,9 +2816,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-s390x-gnu": { "node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.1.tgz",
"integrity": "sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==", "integrity": "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -2802,9 +2830,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-gnu": { "node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.1.tgz",
"integrity": "sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==", "integrity": "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2816,9 +2844,9 @@
] ]
}, },
"node_modules/@rollup/rollup-linux-x64-musl": { "node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.1.tgz",
"integrity": "sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==", "integrity": "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2829,10 +2857,24 @@
"linux" "linux"
] ]
}, },
"node_modules/@rollup/rollup-openbsd-x64": {
"version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.1.tgz",
"integrity": "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==",
"cpu": [
"x64"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [
"openbsd"
]
},
"node_modules/@rollup/rollup-openharmony-arm64": { "node_modules/@rollup/rollup-openharmony-arm64": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.1.tgz",
"integrity": "sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==", "integrity": "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2844,9 +2886,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-arm64-msvc": { "node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.1.tgz",
"integrity": "sha512-c2V0W1bsKIKfbLMBu/WGBz6Yci8nJ/ZJdheE0EwB73N3MvHYKiKGs3mVilX4Gs70eGeDaMqEob25Tw2Gb9Nqyw==", "integrity": "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -2858,9 +2900,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-ia32-msvc": { "node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.1.tgz",
"integrity": "sha512-woEHgqQqDCkAzrDhvDipnSirm5vxUXtSKDYTVpZG3nUdW/VVB5VdCYA2iReSj/u3yCZzXID4kuKG7OynPnB3WQ==", "integrity": "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -2872,9 +2914,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-x64-gnu": { "node_modules/@rollup/rollup-win32-x64-gnu": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.1.tgz",
"integrity": "sha512-dzAc53LOuFvHwbCEOS0rPbXp6SIhAf2txMP5p6mGyOXXw5mWY8NGGbPMPrs4P1WItkfApDathBj/NzMLUZ9rtQ==", "integrity": "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -2886,9 +2928,9 @@
] ]
}, },
"node_modules/@rollup/rollup-win32-x64-msvc": { "node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.54.0.tgz", "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.1.tgz",
"integrity": "sha512-hYT5d3YNdSh3mbCU1gwQyPgQd3T2ne0A3KG8KSBdav5TiBg6eInVmV+TeR5uHufiIgSFg0XsOWGW5/RhNcSvPg==", "integrity": "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -4508,9 +4550,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001761", "version": "1.0.30001762",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz",
"integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==", "integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@@ -6183,9 +6225,9 @@
} }
}, },
"node_modules/fastq": { "node_modules/fastq": {
"version": "1.19.1", "version": "1.20.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
@@ -7082,9 +7124,9 @@
} }
}, },
"node_modules/i18next-chained-backend": { "node_modules/i18next-chained-backend": {
"version": "4.6.2", "version": "4.6.3",
"resolved": "https://registry.npmjs.org/i18next-chained-backend/-/i18next-chained-backend-4.6.2.tgz", "resolved": "https://registry.npmjs.org/i18next-chained-backend/-/i18next-chained-backend-4.6.3.tgz",
"integrity": "sha512-2P092fR+nAPQlGzPUoIIxbwo7PTBqQYgLxwv1XhSTQUAUoelLo5LkX+FqRxxSDg9WEAsrc8+2WL6mJtMGIa6WQ==", "integrity": "sha512-Yg4hAKg/98zRAMQs87vJSNevTzaPPrYF3Eb7Kpx+UEaaXLd3p69g7dulAL+hpmZQHeMQ/5gFqHVtdwva53mB0Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.2" "@babel/runtime": "^7.23.2"
@@ -9650,9 +9692,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/qs": { "node_modules/qs": {
"version": "6.14.0", "version": "6.14.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
"dev": true, "dev": true,
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": { "dependencies": {
@@ -10036,9 +10078,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.54.0", "version": "4.55.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.1.tgz",
"integrity": "sha512-3nk8Y3a9Ea8szgKhinMlGMhGMw89mqule3KWczxhIzqudyHdCIOHw8WJlj/r329fACjKLEh13ZSk7oE22kyeIw==", "integrity": "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -10052,28 +10094,31 @@
"npm": ">=8.0.0" "npm": ">=8.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.54.0", "@rollup/rollup-android-arm-eabi": "4.55.1",
"@rollup/rollup-android-arm64": "4.54.0", "@rollup/rollup-android-arm64": "4.55.1",
"@rollup/rollup-darwin-arm64": "4.54.0", "@rollup/rollup-darwin-arm64": "4.55.1",
"@rollup/rollup-darwin-x64": "4.54.0", "@rollup/rollup-darwin-x64": "4.55.1",
"@rollup/rollup-freebsd-arm64": "4.54.0", "@rollup/rollup-freebsd-arm64": "4.55.1",
"@rollup/rollup-freebsd-x64": "4.54.0", "@rollup/rollup-freebsd-x64": "4.55.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.54.0", "@rollup/rollup-linux-arm-gnueabihf": "4.55.1",
"@rollup/rollup-linux-arm-musleabihf": "4.54.0", "@rollup/rollup-linux-arm-musleabihf": "4.55.1",
"@rollup/rollup-linux-arm64-gnu": "4.54.0", "@rollup/rollup-linux-arm64-gnu": "4.55.1",
"@rollup/rollup-linux-arm64-musl": "4.54.0", "@rollup/rollup-linux-arm64-musl": "4.55.1",
"@rollup/rollup-linux-loong64-gnu": "4.54.0", "@rollup/rollup-linux-loong64-gnu": "4.55.1",
"@rollup/rollup-linux-ppc64-gnu": "4.54.0", "@rollup/rollup-linux-loong64-musl": "4.55.1",
"@rollup/rollup-linux-riscv64-gnu": "4.54.0", "@rollup/rollup-linux-ppc64-gnu": "4.55.1",
"@rollup/rollup-linux-riscv64-musl": "4.54.0", "@rollup/rollup-linux-ppc64-musl": "4.55.1",
"@rollup/rollup-linux-s390x-gnu": "4.54.0", "@rollup/rollup-linux-riscv64-gnu": "4.55.1",
"@rollup/rollup-linux-x64-gnu": "4.54.0", "@rollup/rollup-linux-riscv64-musl": "4.55.1",
"@rollup/rollup-linux-x64-musl": "4.54.0", "@rollup/rollup-linux-s390x-gnu": "4.55.1",
"@rollup/rollup-openharmony-arm64": "4.54.0", "@rollup/rollup-linux-x64-gnu": "4.55.1",
"@rollup/rollup-win32-arm64-msvc": "4.54.0", "@rollup/rollup-linux-x64-musl": "4.55.1",
"@rollup/rollup-win32-ia32-msvc": "4.54.0", "@rollup/rollup-openbsd-x64": "4.55.1",
"@rollup/rollup-win32-x64-gnu": "4.54.0", "@rollup/rollup-openharmony-arm64": "4.55.1",
"@rollup/rollup-win32-x64-msvc": "4.54.0", "@rollup/rollup-win32-arm64-msvc": "4.55.1",
"@rollup/rollup-win32-ia32-msvc": "4.55.1",
"@rollup/rollup-win32-x64-gnu": "4.55.1",
"@rollup/rollup-win32-x64-msvc": "4.55.1",
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
@@ -10129,9 +10174,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/sass": { "node_modules/sass": {
"version": "1.97.1", "version": "1.97.2",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.97.1.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.97.2.tgz",
"integrity": "sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==", "integrity": "sha512-y5LWb0IlbO4e97Zr7c3mlpabcbBtS+ieiZ9iwDooShpFKWXf62zz5pEPdwrLYm+Bxn1fnbwFGzHuCLSA9tBmrw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -11577,7 +11622,7 @@
"version": "8.28.2", "version": "8.28.2",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz", "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz",
"integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==", "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, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -11710,9 +11755,9 @@
} }
}, },
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "2.4.4", "version": "2.5.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.0.tgz",
"integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", "integrity": "sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -12288,9 +12333,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/ws": { "node_modules/ws": {
"version": "8.18.3", "version": "8.19.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {

View File

@@ -34,12 +34,14 @@ $(document).ready(function () {
$('input[name="ignore_budget"]').attr('checked', false); $('input[name="ignore_budget"]').attr('checked', false);
}); });
$('input[name="tags"]').on('itemAdded', function (event) {
$('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_nothing').attr('checked', false);
$('#tags_action_do_replace').attr('checked', true); $('#tags_action_do_replace').attr('checked', true);
}
}); });
}); });

View File

@@ -68,8 +68,8 @@ export default {
props: ['source', 'destination', 'transactionType', 'value', 'error', 'no_currency', 'title',], props: ['source', 'destination', 'transactionType', 'value', 'error', 'no_currency', 'title',],
mounted() { mounted() {
this.liability = false; this.liability = false;
// console.log('I am mounted with a ' + this.transactionType + ' transaction type and currency id!'); console.log('ForeignAmountSelect is mounted with a ' + this.transactionType + ' transaction type and currency id!');
// console.log(this.value); console.log(this.value);
this.loadCurrencies(); this.loadCurrencies();
}, },
data() { data() {
@@ -124,23 +124,25 @@ export default {
let sourceIsLiability = liabilities.indexOf(srcType) !== -1; let sourceIsLiability = liabilities.indexOf(srcType) !== -1;
let destIsLiability = liabilities.indexOf(destType) !== -1; let destIsLiability = liabilities.indexOf(destType) !== -1;
// console.log(srcType + ' (source) is a liability: ' + sourceIsLiability); // console.log(srcType + ' (source) is a liability: ' + sourceIsLiability);
// console.log(destType + ' (dest) is a liability: ' + destIsLiability); // console.log(destType + ' (dest) is a liability: ' + destIsLiability);
// console.log('tType: ' + tType); // console.log('tType: ' + tType);
if (tType === 'transfer' || destIsLiability || sourceIsLiability) { if (tType === 'transfer' || destIsLiability || sourceIsLiability) {
// console.log('Source is liability OR dest is liability, OR transfer. Lock list on currency of destination.'); console.log('Source or dest is a liability.')
console.log('Source is liability OR dest is liability, OR transfer. Lock list on currency of destination.');
// console.log('Length of currencies is ' + this.currencies.length); // console.log('Length of currencies is ' + this.currencies.length);
// console.log(this.currencies); // console.log(this.currencies);
this.liability = true; this.liability = true;
// lock dropdown list on currencyID of destination. // lock dropdown list on currencyID of destination UNLESS dest is not liab
for (const key in this.currencies) { for (const key in this.currencies) {
if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) { if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
if ( if (
parseInt(this.currencies[key].id) === parseInt(this.destination.currency_id) parseInt(this.currencies[key].id) === parseInt(this.destination.currency_id) || !destIsLiability
) { ) {
// console.log('Enable currency!!'); console.log('Enable currency!!');
console.log(this.currencies[key]);
// console.log(this.destination); // console.log(this.destination);
// console.log(this.currencies[key]);
this.enabledCurrencies.push(this.currencies[key]); this.enabledCurrencies.push(this.currencies[key]);
} }
} }
@@ -151,6 +153,7 @@ export default {
// if type is withdrawal, list all but skip the source account ID. // if type is withdrawal, list all but skip the source account ID.
if (tType === 'withdrawal' && this.source && false === sourceIsLiability) { if (tType === 'withdrawal' && this.source && false === sourceIsLiability) {
console.log('Type is withdrawal, there is a source, it is not a liability.')
for (const key in this.currencies) { for (const key in this.currencies) {
if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) { if (this.currencies.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
if (this.source.currency_id !== this.currencies[key].id) { if (this.source.currency_id !== this.currencies[key].id) {

View File

@@ -43,6 +43,7 @@ return [
'last_180_days' => 'Last 180 days', 'last_180_days' => 'Last 180 days',
'month_to_date' => 'Month to date', 'month_to_date' => 'Month to date',
'year_to_date' => 'Year to date', 'year_to_date' => 'Year to date',
'previous_year' => 'Previous year (:year)',
'YTD' => 'YTD', 'YTD' => 'YTD',
'welcome_back' => 'What\'s playing?', 'welcome_back' => 'What\'s playing?',
'main_dashboard_page_title' => 'Home', 'main_dashboard_page_title' => 'Home',
@@ -149,6 +150,9 @@ return [
'left_in_budget_limit' => 'Left to spend according to budgeting', 'left_in_budget_limit' => 'Left to spend according to budgeting',
'current_period' => 'Current period', 'current_period' => 'Current period',
'show_the_current_period_and_overview' => 'Show the current period and overview', '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.', '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', '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', 'chart_budget_in_period' => 'Chart for all transactions for budget ":name" between :start and :end in :currency',
@@ -2908,6 +2912,7 @@ return [
'placeholder' => '[Placeholder]', 'placeholder' => '[Placeholder]',
// audit log entries // audit log entries
'incomplete_ale' => 'Not all events are recorded as audit log entries.',
'audit_log_entries' => 'Audit log entries', 'audit_log_entries' => 'Audit log entries',
'ale_action_log_add' => 'Added :amount to piggy bank ":name"', 'ale_action_log_add' => 'Added :amount to piggy bank ":name"',
'ale_action_log_remove' => 'Removed :amount from piggy bank ":name"', 'ale_action_log_remove' => 'Removed :amount from piggy bank ":name"',

View File

@@ -1,4 +1,10 @@
<table class="table" aria-label="Table"> <table class="table" aria-label="Table">
<thead>
<tr>
<td colspan="3"><em>{{ 'incomplete_ale'|_ }}</em></td>
</tr>
</thead>
<tbody>
{% for logEntry in logEntries %} {% for logEntry in logEntries %}
<tr> <tr>
<th style="width:20%;" scope="row"> <th style="width:20%;" scope="row">
@@ -9,8 +15,7 @@
{% if 'FireflyIII\\User' == logEntry.changer_type %} {% if 'FireflyIII\\User' == logEntry.changer_type %}
<a href="{{ route('profile.index') }}"> <a href="{{ route('profile.index') }}">
{% endif %} {% endif %}
{{ logEntry.changer_type|replace({"FireflyIII\\Models\\": ""})|replace({"FireflyIII\\": ""}) }} {{ logEntry.changer_type|replace({"FireflyIII\\Models\\": ""})|replace({"FireflyIII\\": ""}) }} #{{ logEntry.changer_id }}
#{{ logEntry.changer_id }}
</a> </a>
</th> </th>
<td style="width:30%;" title="{{ logEntry.created_at.isoFormat(dateTimeFormat) }}"> <td style="width:30%;" title="{{ logEntry.created_at.isoFormat(dateTimeFormat) }}">
@@ -103,4 +108,5 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody>
</table> </table>

View File

@@ -33,7 +33,7 @@
<th class="hidden-xs">&nbsp;</th> <th class="hidden-xs">&nbsp;</th>
<th>{{ trans('list.description') }}</th> <th>{{ trans('list.description') }}</th>
<th>{{ trans('list.amount') }}</th> <th>{{ trans('list.amount') }}</th>
{% if FireflyConfig.get('use_running_balance', config('firefly.feature_flags.running_balance_column')) %} {% if fireflyiiiconfig('use_running_balance', true) %}
<th>{{ trans('list.running_balance') }}</th> <th>{{ trans('list.running_balance') }}</th>
{% endif %} {% endif %}
<th>{{ trans('list.date') }}</th> <th>{{ trans('list.date') }}</th>
@@ -266,14 +266,15 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</td> </td>
{% if FireflyConfig.get('use_running_balance', config('firefly.feature_flags.running_balance_column')) %} {% if (fireflyiiiconfig('use_running_balance', true)) %}
<td> <td>
{# RUNNING BALANCE #}
{% if (null == transaction.balance_dirty or false == transaction.balance_dirty) and null != transaction.destination_balance_after and null != transaction.source_balance_after %} {% if (null == transaction.balance_dirty or false == transaction.balance_dirty) and null != transaction.destination_balance_after and null != transaction.source_balance_after %}
{% if transaction.transaction_type_type == 'Deposit' %} {% if transaction.transaction_type_type == 'Deposit' %}
{% if transaction.source_account_id == account.id %} {% if transaction.source_account_id == account.id %}
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Deposit, source">{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% else %} {% else %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Deposit, dest">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% endif %} {% endif %}
{% elseif transaction.transaction_type_type == 'Withdrawal' %} {% elseif transaction.transaction_type_type == 'Withdrawal' %}
@@ -281,39 +282,39 @@
{% if 'Loan' == transaction.destination_account_type or 'Mortgage' == transaction.destination_account_type or 'Debt' == transaction.destination_account_type %} {% if 'Loan' == transaction.destination_account_type or 'Mortgage' == transaction.destination_account_type or 'Debt' == transaction.destination_account_type %}
{% if currency.id == transaction.currency_id %} {% if currency.id == transaction.currency_id %}
{% if account.id == transaction.source_account_id %} {% if account.id == transaction.source_account_id %}
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Withdrawal, liab, source">{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% elseif account.id == transaction.destination_account_id %} {% elseif account.id == transaction.destination_account_id %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Withdrawal, liab, dest">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% else %} {% else %}
- -
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if currency.id == transaction.foreign_currency_id and null != transaction.destination_balance_after and null != transaction.destination_balance_after %} {% if currency.id == transaction.foreign_currency_id and null != transaction.destination_balance_after and null != transaction.destination_balance_after %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.foreign_currency_symbol ?? transaction.currency_symbol, transaction.foreign_currency_decimal_places ?? transaction.currency_decimal_places) }} <span title="Withdrawal, liab, dest 2">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.foreign_currency_symbol ?? transaction.currency_symbol, transaction.foreign_currency_decimal_places ?? transaction.currency_decimal_places) }}</span>
{% endif %} {% endif %}
{# withdrawal into an expense account #} {# withdrawal into an expense account #}
{% else %} {% else %}
{% if account.id == transaction.source_account_id %} {% if account.id == transaction.source_account_id %}
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Withdrawal, source">{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% elseif account.id == transaction.destination_account_id %} {% elseif account.id == transaction.destination_account_id %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Withdrawal, dest">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% else %} {% else %}
- -
{% endif %} {% endif %}
{% endif %} {% endif %}
{% elseif transaction.transaction_type_type == 'Opening balance' %} {% elseif transaction.transaction_type_type == 'Opening balance' %}
{% if account.id == transaction.source_account_id %} {% if account.id == transaction.source_account_id %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Opening balance, dest">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% elseif account.id == transaction.destination_account_id %} {% elseif account.id == transaction.destination_account_id %}
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Opening balance, src">{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% else %} {% else %}
- -
{% endif %} {% endif %}
{% elseif transaction.transaction_type_type == 'Transfer' %} {% elseif transaction.transaction_type_type == 'Transfer' %}
{% if account.id == transaction.source_account_id %} {% if account.id == transaction.source_account_id %}
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Transfer, source">{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% else %} {% else %}
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }} <span title="Transfer, dest">{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}</span>
{% endif %} {% endif %}
{% else %} {% else %}
&nbsp; &nbsp;

View File

@@ -119,11 +119,11 @@
</tr> </tr>
<tr> <tr>
<td>Exchange rates</td> <td>Exchange rates</td>
<td>{% if FireflyConfig.get('enable_exchange_rates', config('cer.enabled')) %}Enabled{% else %}Disabled{% endif %}, downloads {% if FireflyConfig.get('enable_external_rates', config('cer.download_enabled')) %}enabled{% else %}disabled{% endif %}</td> <td>{% if fireflyiiiconfig('enable_exchange_rates', true) %}Enabled{% else %}Disabled{% endif %}, downloads {% if FireflyConfig.get('enable_external_rates', config('cer.download_enabled')) %}enabled{% else %}disabled{% endif %}</td>
</tr> </tr>
<tr> <tr>
<td>RB-column</td> <td>RB-column</td>
<td>{% if FireflyConfig.get('use_running_balance', config('firefly.feature_flags.running_balance_column')) %}Enabled{% else %}Disabled{% endif %}</td> <td>{% if fireflyiiiconfig('use_running_balance', true) %}Enabled{% else %}Disabled{% endif %}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@@ -226,7 +226,7 @@
<span>{{ 'currencies'|_ }}</span> <span>{{ 'currencies'|_ }}</span>
</a> </a>
</li> </li>
{% if FireflyConfig.get('enable_exchange_rates', config('cer.enabled')) %} {% if (fireflyiiiconfig('enable_exchange_rates', true)) %}
<li class="{{ activeRoutePartial('exchange-rates') }}"> <li class="{{ activeRoutePartial('exchange-rates') }}">
<a class="{{ activeRoutePartial('exchange-rates') }}" href="{{ route('exchange-rates.index') }}"> <a class="{{ activeRoutePartial('exchange-rates') }}" href="{{ route('exchange-rates.index') }}">
<span class="fa fa-angle-right fa-fw"></span> <span class="fa fa-angle-right fa-fw"></span>

View File

@@ -36,7 +36,7 @@
<td style="width:40%;">{{ 'saveOnAccounts'|_ }}</td> <td style="width:40%;">{{ 'saveOnAccounts'|_ }}</td>
<td> <td>
{% for account in piggy.accounts %} {% for account in piggy.accounts %}
<a href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a><br> <a href="{{ route('accounts.show', [account.account_id]) }}">{{ account.name }}</a><br>
{% endfor %} {% endfor %}
</td> </td>
</tr> </tr>
@@ -58,7 +58,7 @@
<tr> <tr>
<td> <td>
{{ 'saved_so_far'|_ }} {{ 'saved_so_far'|_ }}
(<a href="{{ route('accounts.show', account.id) }}">{{ account.name }}</a>) (<a href="{{ route('accounts.show', account.account_id) }}">{{ account.name }}</a>)
</td> </td>
<td> <td>
{{ formatAmountBySymbol(account.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }} {{ formatAmountBySymbol(account.current_amount, piggy.currency_symbol, piggy.currency_decimal_places) }}

View File

@@ -101,7 +101,7 @@
</div> </div>
{# conversion back to primary currency #} {# conversion back to primary currency #}
{% if FireflyConfig.get('enable_exchange_rates', config('cer.enabled')) %} {% if fireflyiiiconfig('enable_exchange_rates', true) %}
<div class="preferences-box"> <div class="preferences-box">
<h3>{{ 'pref_convert_to_primary'|_ }}</h3> <h3>{{ 'pref_convert_to_primary'|_ }}</h3>
<p class="text-info"> <p class="text-info">
@@ -110,6 +110,14 @@
{{ ExpandedForm.checkbox('convertToPrimary','1',convertToPrimary,{ 'label' : 'pref_convert_primary_help'|_ }) }} {{ ExpandedForm.checkbox('convertToPrimary','1',convertToPrimary,{ 'label' : 'pref_convert_primary_help'|_ }) }}
</div> </div>
{% endif %} {% 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> </div>
{# general settings column B #} {# general settings column B #}

View File

@@ -20,7 +20,7 @@
<div class="form-group"> <div class="form-group">
<label for="query" class="col-sm-1 control-label">{{ 'search_query'|_ }}</label> <label for="query" class="col-sm-1 control-label">{{ 'search_query'|_ }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input autocomplete="off" maxlength="255" type="text" name="search" id="query" value="{{ fullQuery }}" class="form-control" spellcheck="false" <input autocomplete="off" type="text" name="search" id="query" value="{{ fullQuery }}" class="form-control" spellcheck="false"
placeholder="{{ fullQuery }}"> placeholder="{{ fullQuery }}">
</div> </div>
</div> </div>