mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-03 20:55:05 +00:00 
			
		
		
		
	Compare commits
	
		
			248 Commits
		
	
	
		
			develop-20
			...
			develop-20
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					e7526ac5e3 | ||
| 
						 | 
					441ada70b8 | ||
| 
						 | 
					dedc06a46b | ||
| 
						 | 
					b0adf1b277 | ||
| 
						 | 
					28f65e9f44 | ||
| 
						 | 
					a013af5f0d | ||
| 
						 | 
					9552701662 | ||
| 
						 | 
					ef52f0aad1 | ||
| 
						 | 
					0b6f04905a | ||
| 
						 | 
					cdb36357d4 | ||
| 
						 | 
					8938622bd9 | ||
| 
						 | 
					b210294aa9 | ||
| 
						 | 
					5b02f20775 | ||
| 
						 | 
					fac382a5df | ||
| 
						 | 
					88d88bebc9 | ||
| 
						 | 
					755fb9c29b | ||
| 
						 | 
					51a835ab51 | ||
| 
						 | 
					c9895ab182 | ||
| 
						 | 
					e71d46a4e5 | ||
| 
						 | 
					8d1d5f37c1 | ||
| 
						 | 
					525a68682d | ||
| 
						 | 
					715648d0d8 | ||
| 
						 | 
					9452e93f22 | ||
| 
						 | 
					a6aa145471 | ||
| 
						 | 
					25aa6dcb59 | ||
| 
						 | 
					bb2270b274 | ||
| 
						 | 
					d7f6b4143e | ||
| 
						 | 
					0cf0e26fa8 | ||
| 
						 | 
					cc23197d60 | ||
| 
						 | 
					bc1721d95e | ||
| 
						 | 
					0d19173da6 | ||
| 
						 | 
					1983f07d3c | ||
| 
						 | 
					aad1b91cc2 | ||
| 
						 | 
					8cb1057a33 | ||
| 
						 | 
					b178032985 | ||
| 
						 | 
					561213e95d | ||
| 
						 | 
					44fa7c4306 | ||
| 
						 | 
					e2169563e2 | ||
| 
						 | 
					845344e003 | ||
| 
						 | 
					cdb48453e8 | ||
| 
						 | 
					9669cef518 | ||
| 
						 | 
					f962f71ed7 | ||
| 
						 | 
					94ed4021fb | ||
| 
						 | 
					1765855c57 | ||
| 
						 | 
					55cf3e7d44 | ||
| 
						 | 
					9f1840dc05 | ||
| 
						 | 
					78dab2e5f9 | ||
| 
						 | 
					103b9d5005 | ||
| 
						 | 
					1b75b778d8 | ||
| 
						 | 
					7e665dbdfc | ||
| 
						 | 
					b6897ec3a9 | ||
| 
						 | 
					660260174a | ||
| 
						 | 
					78d32865b5 | ||
| 
						 | 
					edfa92c1aa | ||
| 
						 | 
					63012f269c | ||
| 
						 | 
					7d0e7f779f | ||
| 
						 | 
					b8e18f80f4 | ||
| 
						 | 
					481b01e4f7 | ||
| 
						 | 
					edf2030251 | ||
| 
						 | 
					bd1cfffb61 | ||
| 
						 | 
					629f70d27d | ||
| 
						 | 
					57f5ebc0f9 | ||
| 
						 | 
					b4f51e7b47 | ||
| 
						 | 
					d78d254e86 | ||
| 
						 | 
					eb0c113699 | ||
| 
						 | 
					23045ebd59 | ||
| 
						 | 
					2e5931f304 | ||
| 
						 | 
					a620b07c00 | ||
| 
						 | 
					cb724145f2 | ||
| 
						 | 
					8ef17f6686 | ||
| 
						 | 
					debfd9160c | ||
| 
						 | 
					f2482e4ace | ||
| 
						 | 
					d98d757f8b | ||
| 
						 | 
					0c9a41a929 | ||
| 
						 | 
					e26f78bf50 | ||
| 
						 | 
					ed265f68ba | ||
| 
						 | 
					d2e9b64bf5 | ||
| 
						 | 
					3811aff206 | ||
| 
						 | 
					762d898fee | ||
| 
						 | 
					5e6034fc86 | ||
| 
						 | 
					9da10459d6 | ||
| 
						 | 
					ff80cedd6b | ||
| 
						 | 
					b213148ae8 | ||
| 
						 | 
					c8646e20cb | ||
| 
						 | 
					76a41fec50 | ||
| 
						 | 
					0e705bd038 | ||
| 
						 | 
					f33ffb98ff | ||
| 
						 | 
					faa0d59340 | ||
| 
						 | 
					5af0219884 | ||
| 
						 | 
					dafd99f155 | ||
| 
						 | 
					3560f0388c | ||
| 
						 | 
					b2954658d8 | ||
| 
						 | 
					44581d9983 | ||
| 
						 | 
					02dcfeb227 | ||
| 
						 | 
					d8bafb349d | ||
| 
						 | 
					889598a4c8 | ||
| 
						 | 
					7e37d10016 | ||
| 
						 | 
					ebaebb09d1 | ||
| 
						 | 
					531a3a4b6c | ||
| 
						 | 
					b3e313821b | ||
| 
						 | 
					51958af422 | ||
| 
						 | 
					e3b21ccdba | ||
| 
						 | 
					31bb208835 | ||
| 
						 | 
					8c97e805a2 | ||
| 
						 | 
					ac8a43bb37 | ||
| 
						 | 
					2df4b40a28 | ||
| 
						 | 
					e06736c254 | ||
| 
						 | 
					ec367e94ce | ||
| 
						 | 
					1515dea9fa | ||
| 
						 | 
					adedf9c17d | ||
| 
						 | 
					0b52fb84f1 | ||
| 
						 | 
					16e742ae73 | ||
| 
						 | 
					1b4471dfae | ||
| 
						 | 
					ae152ce0a4 | ||
| 
						 | 
					2aa023f140 | ||
| 
						 | 
					6e2e4c6f08 | ||
| 
						 | 
					1c8c038735 | ||
| 
						 | 
					4d339a6da8 | ||
| 
						 | 
					b7edd4407a | ||
| 
						 | 
					a679a1e94a | ||
| 
						 | 
					180451d32f | ||
| 
						 | 
					7396f22bca | ||
| 
						 | 
					058019aa84 | ||
| 
						 | 
					695f83d1d8 | ||
| 
						 | 
					ac4dfb3baf | ||
| 
						 | 
					427001b223 | ||
| 
						 | 
					3117d8b30d | ||
| 
						 | 
					d19dd2a8b2 | ||
| 
						 | 
					de3dcc3fc2 | ||
| 
						 | 
					077f3e095b | ||
| 
						 | 
					ad3b0bb320 | ||
| 
						 | 
					8538741341 | ||
| 
						 | 
					a0aef5d579 | ||
| 
						 | 
					fdd93427aa | ||
| 
						 | 
					ac3f6557de | ||
| 
						 | 
					b0a909150c | ||
| 
						 | 
					913f163fe4 | ||
| 
						 | 
					3126b07b33 | ||
| 
						 | 
					08ca90cf75 | ||
| 
						 | 
					540ac2a277 | ||
| 
						 | 
					ed80bed066 | ||
| 
						 | 
					41d2541c6a | ||
| 
						 | 
					5dedf63498 | ||
| 
						 | 
					09bc4f41d2 | ||
| 
						 | 
					cebf0b5c57 | ||
| 
						 | 
					1632a57e3e | ||
| 
						 | 
					744c4be7d1 | ||
| 
						 | 
					bd99ef3eff | ||
| 
						 | 
					8a86f13a5d | ||
| 
						 | 
					7418b2f0ee | ||
| 
						 | 
					a0e9de9312 | ||
| 
						 | 
					7e23a6f5e8 | ||
| 
						 | 
					44589f8744 | ||
| 
						 | 
					d24531030f | ||
| 
						 | 
					25bdab1346 | ||
| 
						 | 
					41af1c863a | ||
| 
						 | 
					76b3b18cfb | ||
| 
						 | 
					e6fb2958a9 | ||
| 
						 | 
					15b75b322f | ||
| 
						 | 
					86149d1032 | ||
| 
						 | 
					ded142cd9e | ||
| 
						 | 
					7923eb9ec9 | ||
| 
						 | 
					132553c108 | ||
| 
						 | 
					c2269fc9a4 | ||
| 
						 | 
					aed30d1499 | ||
| 
						 | 
					84a1a876e1 | ||
| 
						 | 
					dc675707f9 | ||
| 
						 | 
					d5667c7ef6 | ||
| 
						 | 
					cba1213dd1 | ||
| 
						 | 
					7219c90957 | ||
| 
						 | 
					af13bd991e | ||
| 
						 | 
					48e548eb52 | ||
| 
						 | 
					1a19e27f0e | ||
| 
						 | 
					0cbd22426d | ||
| 
						 | 
					d5e52e99e0 | ||
| 
						 | 
					f52978e71f | ||
| 
						 | 
					3a3358124d | ||
| 
						 | 
					929808c633 | ||
| 
						 | 
					a78df574f3 | ||
| 
						 | 
					875cad16b6 | ||
| 
						 | 
					7bc30192ca | ||
| 
						 | 
					a1a8968e98 | ||
| 
						 | 
					6abb74a038 | ||
| 
						 | 
					2d7d05e985 | ||
| 
						 | 
					d426e09474 | ||
| 
						 | 
					72d55cb953 | ||
| 
						 | 
					73ad865581 | ||
| 
						 | 
					fefb52beb7 | ||
| 
						 | 
					abd503543b | ||
| 
						 | 
					e3eb550581 | ||
| 
						 | 
					46b780758e | ||
| 
						 | 
					b2c3ee9779 | ||
| 
						 | 
					dca899bcee | ||
| 
						 | 
					9667b8a948 | ||
| 
						 | 
					661f225fe7 | ||
| 
						 | 
					4c6fe0c8de | ||
| 
						 | 
					78f457950e | ||
| 
						 | 
					d831cc8df2 | ||
| 
						 | 
					7056406afc | ||
| 
						 | 
					c85cfcf3e6 | ||
| 
						 | 
					db06d06789 | ||
| 
						 | 
					a28b990cd1 | ||
| 
						 | 
					dab4bfa7a6 | ||
| 
						 | 
					6575236f2b | ||
| 
						 | 
					ad582c8806 | ||
| 
						 | 
					452e9cb953 | ||
| 
						 | 
					a64f137b39 | ||
| 
						 | 
					c067d6aab0 | ||
| 
						 | 
					119b9920a6 | ||
| 
						 | 
					99ed54fce8 | ||
| 
						 | 
					2ea57cdd38 | ||
| 
						 | 
					bb94bdfdaf | ||
| 
						 | 
					4de8398cc2 | ||
| 
						 | 
					e6e8cd5d8a | ||
| 
						 | 
					0b200309ba | ||
| 
						 | 
					a184548912 | ||
| 
						 | 
					c987191212 | ||
| 
						 | 
					7009b444d9 | ||
| 
						 | 
					06551d5367 | ||
| 
						 | 
					a20622ac0c | ||
| 
						 | 
					ca38117fca | ||
| 
						 | 
					9478f78d4f | ||
| 
						 | 
					5c2397bbae | ||
| 
						 | 
					92fefef816 | ||
| 
						 | 
					d3ced65524 | ||
| 
						 | 
					29eb748831 | ||
| 
						 | 
					76df3d5f33 | ||
| 
						 | 
					252076ec1f | ||
| 
						 | 
					bbec28591f | ||
| 
						 | 
					075a360ba6 | ||
| 
						 | 
					477524a8ae | ||
| 
						 | 
					dfe055732d | ||
| 
						 | 
					78b611a18d | ||
| 
						 | 
					367bdf65e6 | ||
| 
						 | 
					3fc9caa31a | ||
| 
						 | 
					95a41fcab7 | ||
| 
						 | 
					58b409fc00 | ||
| 
						 | 
					3eaaac09ad | ||
| 
						 | 
					bcb672920c | ||
| 
						 | 
					79b91e25c2 | ||
| 
						 | 
					7170931464 | ||
| 
						 | 
					c1b5a1a13e | ||
| 
						 | 
					a6265ce8ab | ||
| 
						 | 
					90109917df | ||
| 
						 | 
					0acd54c2b7 | ||
| 
						 | 
					c96226b9b4 | ||
| 
						 | 
					6d143f1624 | ||
| 
						 | 
					93324d1154 | 
							
								
								
									
										354
									
								
								.ci/php-cs-fixer/composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										354
									
								
								.ci/php-cs-fixer/composer.lock
									
									
									
										generated
									
									
									
								
							@@ -72,30 +72,38 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "composer/pcre",
 | 
			
		||||
            "version": "3.1.3",
 | 
			
		||||
            "version": "3.3.1",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/composer/pcre.git",
 | 
			
		||||
                "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
 | 
			
		||||
                "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
 | 
			
		||||
                "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
 | 
			
		||||
                "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4",
 | 
			
		||||
                "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": "^7.4 || ^8.0"
 | 
			
		||||
            },
 | 
			
		||||
            "conflict": {
 | 
			
		||||
                "phpstan/phpstan": "<1.11.10"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "phpstan/phpstan": "^1.3",
 | 
			
		||||
                "phpstan/phpstan": "^1.11.10",
 | 
			
		||||
                "phpstan/phpstan-strict-rules": "^1.1",
 | 
			
		||||
                "symfony/phpunit-bridge": "^5"
 | 
			
		||||
                "phpunit/phpunit": "^8 || ^9"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "extra": {
 | 
			
		||||
                "branch-alias": {
 | 
			
		||||
                    "dev-main": "3.x-dev"
 | 
			
		||||
                },
 | 
			
		||||
                "phpstan": {
 | 
			
		||||
                    "includes": [
 | 
			
		||||
                        "extension.neon"
 | 
			
		||||
                    ]
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
            "autoload": {
 | 
			
		||||
@@ -123,7 +131,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/composer/pcre/issues",
 | 
			
		||||
                "source": "https://github.com/composer/pcre/tree/3.1.3"
 | 
			
		||||
                "source": "https://github.com/composer/pcre/tree/3.3.1"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -139,28 +147,28 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-03-19T10:26:25+00:00"
 | 
			
		||||
            "time": "2024-08-27T18:44:43+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "composer/semver",
 | 
			
		||||
            "version": "3.4.0",
 | 
			
		||||
            "version": "3.4.3",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/composer/semver.git",
 | 
			
		||||
                "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
 | 
			
		||||
                "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
 | 
			
		||||
                "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
 | 
			
		||||
                "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
 | 
			
		||||
                "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": "^5.3.2 || ^7.0 || ^8.0"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "phpstan/phpstan": "^1.4",
 | 
			
		||||
                "symfony/phpunit-bridge": "^4.2 || ^5"
 | 
			
		||||
                "phpstan/phpstan": "^1.11",
 | 
			
		||||
                "symfony/phpunit-bridge": "^3 || ^7"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "extra": {
 | 
			
		||||
@@ -204,7 +212,7 @@
 | 
			
		||||
            "support": {
 | 
			
		||||
                "irc": "ircs://irc.libera.chat:6697/composer",
 | 
			
		||||
                "issues": "https://github.com/composer/semver/issues",
 | 
			
		||||
                "source": "https://github.com/composer/semver/tree/3.4.0"
 | 
			
		||||
                "source": "https://github.com/composer/semver/tree/3.4.3"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -220,7 +228,7 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2023-08-31T09:50:34+00:00"
 | 
			
		||||
            "time": "2024-09-19T14:15:21+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "composer/xdebug-handler",
 | 
			
		||||
@@ -337,16 +345,16 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "fidry/cpu-core-counter",
 | 
			
		||||
            "version": "1.1.0",
 | 
			
		||||
            "version": "1.2.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/theofidry/cpu-core-counter.git",
 | 
			
		||||
                "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42"
 | 
			
		||||
                "reference": "8520451a140d3f46ac33042715115e290cf5785f"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42",
 | 
			
		||||
                "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42",
 | 
			
		||||
                "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f",
 | 
			
		||||
                "reference": "8520451a140d3f46ac33042715115e290cf5785f",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -386,7 +394,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/theofidry/cpu-core-counter/issues",
 | 
			
		||||
                "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0"
 | 
			
		||||
                "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -394,20 +402,20 @@
 | 
			
		||||
                    "type": "github"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-02-07T09:43:46+00:00"
 | 
			
		||||
            "time": "2024-08-06T10:04:20+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "friendsofphp/php-cs-fixer",
 | 
			
		||||
            "version": "v3.57.1",
 | 
			
		||||
            "version": "v3.64.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
 | 
			
		||||
                "reference": "3f7efe667a8c9818aacceee478add7c0fc24cb21"
 | 
			
		||||
                "reference": "58dd9c931c785a79739310aef5178928305ffa67"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f7efe667a8c9818aacceee478add7c0fc24cb21",
 | 
			
		||||
                "reference": "3f7efe667a8c9818aacceee478add7c0fc24cb21",
 | 
			
		||||
                "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/58dd9c931c785a79739310aef5178928305ffa67",
 | 
			
		||||
                "reference": "58dd9c931c785a79739310aef5178928305ffa67",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -437,16 +445,16 @@
 | 
			
		||||
                "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "facile-it/paraunit": "^1.3 || ^2.0",
 | 
			
		||||
                "infection/infection": "^0.27.11",
 | 
			
		||||
                "facile-it/paraunit": "^1.3 || ^2.3",
 | 
			
		||||
                "infection/infection": "^0.29.5",
 | 
			
		||||
                "justinrainbow/json-schema": "^5.2",
 | 
			
		||||
                "keradus/cli-executor": "^2.1",
 | 
			
		||||
                "mikey179/vfsstream": "^1.6.11",
 | 
			
		||||
                "php-coveralls/php-coveralls": "^2.7",
 | 
			
		||||
                "php-cs-fixer/accessible-object": "^1.1",
 | 
			
		||||
                "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4",
 | 
			
		||||
                "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4",
 | 
			
		||||
                "phpunit/phpunit": "^9.6 || ^10.5.5 || ^11.0.2",
 | 
			
		||||
                "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5",
 | 
			
		||||
                "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5",
 | 
			
		||||
                "phpunit/phpunit": "^9.6.19 || ^10.5.21 || ^11.2",
 | 
			
		||||
                "symfony/var-dumper": "^5.4 || ^6.0 || ^7.0",
 | 
			
		||||
                "symfony/yaml": "^5.4 || ^6.0 || ^7.0"
 | 
			
		||||
            },
 | 
			
		||||
@@ -461,7 +469,10 @@
 | 
			
		||||
            "autoload": {
 | 
			
		||||
                "psr-4": {
 | 
			
		||||
                    "PhpCsFixer\\": "src/"
 | 
			
		||||
                }
 | 
			
		||||
                },
 | 
			
		||||
                "exclude-from-classmap": [
 | 
			
		||||
                    "src/Fixer/Internal/*"
 | 
			
		||||
                ]
 | 
			
		||||
            },
 | 
			
		||||
            "notification-url": "https://packagist.org/downloads/",
 | 
			
		||||
            "license": [
 | 
			
		||||
@@ -486,7 +497,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
 | 
			
		||||
                "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.57.1"
 | 
			
		||||
                "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.64.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -494,7 +505,7 @@
 | 
			
		||||
                    "type": "github"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-05-15T22:01:07+00:00"
 | 
			
		||||
            "time": "2024-08-30T23:09:38+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "psr/container",
 | 
			
		||||
@@ -601,16 +612,16 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "psr/log",
 | 
			
		||||
            "version": "3.0.0",
 | 
			
		||||
            "version": "3.0.2",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/php-fig/log.git",
 | 
			
		||||
                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
 | 
			
		||||
                "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
 | 
			
		||||
                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
 | 
			
		||||
                "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
 | 
			
		||||
                "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -645,9 +656,9 @@
 | 
			
		||||
                "psr-3"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/php-fig/log/tree/3.0.0"
 | 
			
		||||
                "source": "https://github.com/php-fig/log/tree/3.0.2"
 | 
			
		||||
            },
 | 
			
		||||
            "time": "2021-07-14T16:46:02+00:00"
 | 
			
		||||
            "time": "2024-09-11T13:17:53+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/cache",
 | 
			
		||||
@@ -802,28 +813,28 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/dns",
 | 
			
		||||
            "version": "v1.12.0",
 | 
			
		||||
            "version": "v1.13.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/reactphp/dns.git",
 | 
			
		||||
                "reference": "c134600642fa615b46b41237ef243daa65bb64ec"
 | 
			
		||||
                "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/dns/zipball/c134600642fa615b46b41237ef243daa65bb64ec",
 | 
			
		||||
                "reference": "c134600642fa615b46b41237ef243daa65bb64ec",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5",
 | 
			
		||||
                "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=5.3.0",
 | 
			
		||||
                "react/cache": "^1.0 || ^0.6 || ^0.5",
 | 
			
		||||
                "react/event-loop": "^1.2",
 | 
			
		||||
                "react/promise": "^3.0 || ^2.7 || ^1.2.1"
 | 
			
		||||
                "react/promise": "^3.2 || ^2.7 || ^1.2.1"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
 | 
			
		||||
                "react/async": "^4 || ^3 || ^2",
 | 
			
		||||
                "react/promise-timer": "^1.9"
 | 
			
		||||
                "react/async": "^4.3 || ^3 || ^2",
 | 
			
		||||
                "react/promise-timer": "^1.11"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "autoload": {
 | 
			
		||||
@@ -866,7 +877,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/reactphp/dns/issues",
 | 
			
		||||
                "source": "https://github.com/reactphp/dns/tree/v1.12.0"
 | 
			
		||||
                "source": "https://github.com/reactphp/dns/tree/v1.13.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -874,7 +885,7 @@
 | 
			
		||||
                    "type": "open_collective"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2023-11-29T12:41:06+00:00"
 | 
			
		||||
            "time": "2024-06-13T14:18:03+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/event-loop",
 | 
			
		||||
@@ -950,16 +961,16 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/promise",
 | 
			
		||||
            "version": "v3.1.0",
 | 
			
		||||
            "version": "v3.2.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/reactphp/promise.git",
 | 
			
		||||
                "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c"
 | 
			
		||||
                "reference": "8a164643313c71354582dc850b42b33fa12a4b63"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/promise/zipball/e563d55d1641de1dea9f5e84f3cccc66d2bfe02c",
 | 
			
		||||
                "reference": "e563d55d1641de1dea9f5e84f3cccc66d2bfe02c",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63",
 | 
			
		||||
                "reference": "8a164643313c71354582dc850b42b33fa12a4b63",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1011,7 +1022,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/reactphp/promise/issues",
 | 
			
		||||
                "source": "https://github.com/reactphp/promise/tree/v3.1.0"
 | 
			
		||||
                "source": "https://github.com/reactphp/promise/tree/v3.2.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1019,35 +1030,35 @@
 | 
			
		||||
                    "type": "open_collective"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2023-11-16T16:21:57+00:00"
 | 
			
		||||
            "time": "2024-05-24T10:39:05+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/socket",
 | 
			
		||||
            "version": "v1.15.0",
 | 
			
		||||
            "version": "v1.16.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/reactphp/socket.git",
 | 
			
		||||
                "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038"
 | 
			
		||||
                "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/socket/zipball/216d3aec0b87f04a40ca04f481e6af01bdd1d038",
 | 
			
		||||
                "reference": "216d3aec0b87f04a40ca04f481e6af01bdd1d038",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
 | 
			
		||||
                "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
 | 
			
		||||
                "php": ">=5.3.0",
 | 
			
		||||
                "react/dns": "^1.11",
 | 
			
		||||
                "react/dns": "^1.13",
 | 
			
		||||
                "react/event-loop": "^1.2",
 | 
			
		||||
                "react/promise": "^3 || ^2.6 || ^1.2.1",
 | 
			
		||||
                "react/stream": "^1.2"
 | 
			
		||||
                "react/promise": "^3.2 || ^2.6 || ^1.2.1",
 | 
			
		||||
                "react/stream": "^1.4"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
 | 
			
		||||
                "react/async": "^4 || ^3 || ^2",
 | 
			
		||||
                "react/async": "^4.3 || ^3.3 || ^2",
 | 
			
		||||
                "react/promise-stream": "^1.4",
 | 
			
		||||
                "react/promise-timer": "^1.10"
 | 
			
		||||
                "react/promise-timer": "^1.11"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "autoload": {
 | 
			
		||||
@@ -1091,7 +1102,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/reactphp/socket/issues",
 | 
			
		||||
                "source": "https://github.com/reactphp/socket/tree/v1.15.0"
 | 
			
		||||
                "source": "https://github.com/reactphp/socket/tree/v1.16.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1099,20 +1110,20 @@
 | 
			
		||||
                    "type": "open_collective"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2023-12-15T11:02:10+00:00"
 | 
			
		||||
            "time": "2024-07-26T10:38:09+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "react/stream",
 | 
			
		||||
            "version": "v1.3.0",
 | 
			
		||||
            "version": "v1.4.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/reactphp/stream.git",
 | 
			
		||||
                "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66"
 | 
			
		||||
                "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66",
 | 
			
		||||
                "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66",
 | 
			
		||||
                "url": "https://api.github.com/repos/reactphp/stream/zipball/1e5b0acb8fe55143b5b426817155190eb6f5b18d",
 | 
			
		||||
                "reference": "1e5b0acb8fe55143b5b426817155190eb6f5b18d",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1122,7 +1133,7 @@
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "clue/stream-filter": "~1.2",
 | 
			
		||||
                "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
 | 
			
		||||
                "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "autoload": {
 | 
			
		||||
@@ -1169,7 +1180,7 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/reactphp/stream/issues",
 | 
			
		||||
                "source": "https://github.com/reactphp/stream/tree/v1.3.0"
 | 
			
		||||
                "source": "https://github.com/reactphp/stream/tree/v1.4.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1177,20 +1188,20 @@
 | 
			
		||||
                    "type": "open_collective"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2023-06-16T10:52:11+00:00"
 | 
			
		||||
            "time": "2024-06-11T12:45:25+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "sebastian/diff",
 | 
			
		||||
            "version": "6.0.1",
 | 
			
		||||
            "version": "6.0.2",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/sebastianbergmann/diff.git",
 | 
			
		||||
                "reference": "ab83243ecc233de5655b76f577711de9f842e712"
 | 
			
		||||
                "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ab83243ecc233de5655b76f577711de9f842e712",
 | 
			
		||||
                "reference": "ab83243ecc233de5655b76f577711de9f842e712",
 | 
			
		||||
                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544",
 | 
			
		||||
                "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1236,7 +1247,7 @@
 | 
			
		||||
            "support": {
 | 
			
		||||
                "issues": "https://github.com/sebastianbergmann/diff/issues",
 | 
			
		||||
                "security": "https://github.com/sebastianbergmann/diff/security/policy",
 | 
			
		||||
                "source": "https://github.com/sebastianbergmann/diff/tree/6.0.1"
 | 
			
		||||
                "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1244,20 +1255,20 @@
 | 
			
		||||
                    "type": "github"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-03-02T07:30:33+00:00"
 | 
			
		||||
            "time": "2024-07-03T04:53:05+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/console",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.5",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/console.git",
 | 
			
		||||
                "reference": "c981e0e9380ce9f146416bde3150c79197ce9986"
 | 
			
		||||
                "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/console/zipball/c981e0e9380ce9f146416bde3150c79197ce9986",
 | 
			
		||||
                "reference": "c981e0e9380ce9f146416bde3150c79197ce9986",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee",
 | 
			
		||||
                "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1321,7 +1332,7 @@
 | 
			
		||||
                "terminal"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/console/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/console/tree/v7.1.5"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1337,7 +1348,7 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-09-20T08:28:38+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/deprecation-contracts",
 | 
			
		||||
@@ -1408,16 +1419,16 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/event-dispatcher",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.1",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/event-dispatcher.git",
 | 
			
		||||
                "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9"
 | 
			
		||||
                "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db2a7fab994d67d92356bb39c367db115d9d30f9",
 | 
			
		||||
                "reference": "db2a7fab994d67d92356bb39c367db115d9d30f9",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
 | 
			
		||||
                "reference": "9fa7f7a21beb22a39a8f3f28618b29e50d7a55a7",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1468,7 +1479,7 @@
 | 
			
		||||
            "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
 | 
			
		||||
            "homepage": "https://symfony.com",
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/event-dispatcher/tree/v7.1.1"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1484,7 +1495,7 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-05-31T14:57:53+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/event-dispatcher-contracts",
 | 
			
		||||
@@ -1564,22 +1575,24 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/filesystem",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.5",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/filesystem.git",
 | 
			
		||||
                "reference": "cc168be6fbdcdf3401f50ae863ee3818ed4338f5"
 | 
			
		||||
                "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/filesystem/zipball/cc168be6fbdcdf3401f50ae863ee3818ed4338f5",
 | 
			
		||||
                "reference": "cc168be6fbdcdf3401f50ae863ee3818ed4338f5",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a",
 | 
			
		||||
                "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=8.2",
 | 
			
		||||
                "symfony/polyfill-ctype": "~1.8",
 | 
			
		||||
                "symfony/polyfill-mbstring": "~1.8",
 | 
			
		||||
                "symfony/polyfill-mbstring": "~1.8"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "symfony/process": "^6.4|^7.0"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
@@ -1608,7 +1621,7 @@
 | 
			
		||||
            "description": "Provides basic utilities for the filesystem",
 | 
			
		||||
            "homepage": "https://symfony.com",
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/filesystem/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/filesystem/tree/v7.1.5"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1624,20 +1637,20 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-09-17T09:16:35+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/finder",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.4",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/finder.git",
 | 
			
		||||
                "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c"
 | 
			
		||||
                "reference": "d95bbf319f7d052082fb7af147e0f835a695e823"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/finder/zipball/4d58f0f4fe95a30d7b538d71197135483560b97c",
 | 
			
		||||
                "reference": "4d58f0f4fe95a30d7b538d71197135483560b97c",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823",
 | 
			
		||||
                "reference": "d95bbf319f7d052082fb7af147e0f835a695e823",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1672,7 +1685,7 @@
 | 
			
		||||
            "description": "Finds files and directories via an intuitive fluent interface",
 | 
			
		||||
            "homepage": "https://symfony.com",
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/finder/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/finder/tree/v7.1.4"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1688,20 +1701,20 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-28T11:44:19+00:00"
 | 
			
		||||
            "time": "2024-08-13T14:28:19+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/options-resolver",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.1",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/options-resolver.git",
 | 
			
		||||
                "reference": "23cc173858776ad451e31f053b1c9f47840b2cfa"
 | 
			
		||||
                "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/23cc173858776ad451e31f053b1c9f47840b2cfa",
 | 
			
		||||
                "reference": "23cc173858776ad451e31f053b1c9f47840b2cfa",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/47aa818121ed3950acd2b58d1d37d08a94f9bf55",
 | 
			
		||||
                "reference": "47aa818121ed3950acd2b58d1d37d08a94f9bf55",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -1739,7 +1752,7 @@
 | 
			
		||||
                "options"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/options-resolver/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/options-resolver/tree/v7.1.1"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1755,24 +1768,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-05-31T14:57:53+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-ctype",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-ctype.git",
 | 
			
		||||
                "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
 | 
			
		||||
                "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
 | 
			
		||||
                "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
 | 
			
		||||
                "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "provide": {
 | 
			
		||||
                "ext-ctype": "*"
 | 
			
		||||
@@ -1818,7 +1831,7 @@
 | 
			
		||||
                "portable"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1834,24 +1847,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-intl-grapheme",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
 | 
			
		||||
                "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f"
 | 
			
		||||
                "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f",
 | 
			
		||||
                "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
 | 
			
		||||
                "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "suggest": {
 | 
			
		||||
                "ext-intl": "For best performance"
 | 
			
		||||
@@ -1896,7 +1909,7 @@
 | 
			
		||||
                "shim"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1912,24 +1925,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-intl-normalizer",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
 | 
			
		||||
                "reference": "bc45c394692b948b4d383a08d7753968bed9a83d"
 | 
			
		||||
                "reference": "3833d7255cc303546435cb650316bff708a1c75c"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d",
 | 
			
		||||
                "reference": "bc45c394692b948b4d383a08d7753968bed9a83d",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
 | 
			
		||||
                "reference": "3833d7255cc303546435cb650316bff708a1c75c",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "suggest": {
 | 
			
		||||
                "ext-intl": "For best performance"
 | 
			
		||||
@@ -1977,7 +1990,7 @@
 | 
			
		||||
                "shim"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -1993,24 +2006,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-mbstring",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-mbstring.git",
 | 
			
		||||
                "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
 | 
			
		||||
                "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
 | 
			
		||||
                "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
 | 
			
		||||
                "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "provide": {
 | 
			
		||||
                "ext-mbstring": "*"
 | 
			
		||||
@@ -2057,7 +2070,7 @@
 | 
			
		||||
                "shim"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2073,24 +2086,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-php80",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-php80.git",
 | 
			
		||||
                "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
 | 
			
		||||
                "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
 | 
			
		||||
                "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
 | 
			
		||||
                "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "extra": {
 | 
			
		||||
@@ -2137,7 +2150,7 @@
 | 
			
		||||
                "shim"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2153,24 +2166,24 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/polyfill-php81",
 | 
			
		||||
            "version": "v1.29.0",
 | 
			
		||||
            "version": "v1.31.0",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/polyfill-php81.git",
 | 
			
		||||
                "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d"
 | 
			
		||||
                "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d",
 | 
			
		||||
                "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
 | 
			
		||||
                "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
                "php": ">=7.1"
 | 
			
		||||
                "php": ">=7.2"
 | 
			
		||||
            },
 | 
			
		||||
            "type": "library",
 | 
			
		||||
            "extra": {
 | 
			
		||||
@@ -2213,7 +2226,7 @@
 | 
			
		||||
                "shim"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0"
 | 
			
		||||
                "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2229,20 +2242,20 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-01-29T20:11:03+00:00"
 | 
			
		||||
            "time": "2024-09-09T11:45:10+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/process",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.5",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/process.git",
 | 
			
		||||
                "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0"
 | 
			
		||||
                "reference": "5c03ee6369281177f07f7c68252a280beccba847"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/process/zipball/3839e56b94dd1dbd13235d27504e66baf23faba0",
 | 
			
		||||
                "reference": "3839e56b94dd1dbd13235d27504e66baf23faba0",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847",
 | 
			
		||||
                "reference": "5c03ee6369281177f07f7c68252a280beccba847",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -2274,7 +2287,7 @@
 | 
			
		||||
            "description": "Executes commands in sub-processes",
 | 
			
		||||
            "homepage": "https://symfony.com",
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/process/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/process/tree/v7.1.5"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2290,7 +2303,7 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-09-19T21:48:23+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/service-contracts",
 | 
			
		||||
@@ -2377,16 +2390,16 @@
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/stopwatch",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.1",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/stopwatch.git",
 | 
			
		||||
                "reference": "41a7a24aa1dc82adf46a06bc292d1923acfe6b84"
 | 
			
		||||
                "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/41a7a24aa1dc82adf46a06bc292d1923acfe6b84",
 | 
			
		||||
                "reference": "41a7a24aa1dc82adf46a06bc292d1923acfe6b84",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
 | 
			
		||||
                "reference": "5b75bb1ac2ba1b9d05c47fc4b3046a625377d23d",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -2419,7 +2432,7 @@
 | 
			
		||||
            "description": "Provides a way to profile code",
 | 
			
		||||
            "homepage": "https://symfony.com",
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/stopwatch/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/stopwatch/tree/v7.1.1"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2435,20 +2448,20 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-05-31T14:57:53+00:00"
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
            "name": "symfony/string",
 | 
			
		||||
            "version": "v7.0.7",
 | 
			
		||||
            "version": "v7.1.5",
 | 
			
		||||
            "source": {
 | 
			
		||||
                "type": "git",
 | 
			
		||||
                "url": "https://github.com/symfony/string.git",
 | 
			
		||||
                "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63"
 | 
			
		||||
                "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306"
 | 
			
		||||
            },
 | 
			
		||||
            "dist": {
 | 
			
		||||
                "type": "zip",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/string/zipball/e405b5424dc2528e02e31ba26b83a79fd4eb8f63",
 | 
			
		||||
                "reference": "e405b5424dc2528e02e31ba26b83a79fd4eb8f63",
 | 
			
		||||
                "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306",
 | 
			
		||||
                "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306",
 | 
			
		||||
                "shasum": ""
 | 
			
		||||
            },
 | 
			
		||||
            "require": {
 | 
			
		||||
@@ -2462,6 +2475,7 @@
 | 
			
		||||
                "symfony/translation-contracts": "<2.5"
 | 
			
		||||
            },
 | 
			
		||||
            "require-dev": {
 | 
			
		||||
                "symfony/emoji": "^7.1",
 | 
			
		||||
                "symfony/error-handler": "^6.4|^7.0",
 | 
			
		||||
                "symfony/http-client": "^6.4|^7.0",
 | 
			
		||||
                "symfony/intl": "^6.4|^7.0",
 | 
			
		||||
@@ -2505,7 +2519,7 @@
 | 
			
		||||
                "utf8"
 | 
			
		||||
            ],
 | 
			
		||||
            "support": {
 | 
			
		||||
                "source": "https://github.com/symfony/string/tree/v7.0.7"
 | 
			
		||||
                "source": "https://github.com/symfony/string/tree/v7.1.5"
 | 
			
		||||
            },
 | 
			
		||||
            "funding": [
 | 
			
		||||
                {
 | 
			
		||||
@@ -2521,7 +2535,7 @@
 | 
			
		||||
                    "type": "tidelift"
 | 
			
		||||
                }
 | 
			
		||||
            ],
 | 
			
		||||
            "time": "2024-04-18T09:29:19+00:00"
 | 
			
		||||
            "time": "2024-09-20T08:28:38+00:00"
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "packages-dev": [],
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,10 @@
 | 
			
		||||
parameters:
 | 
			
		||||
  scanFiles:
 | 
			
		||||
    - ../_ide_helper_models.php
 | 
			
		||||
  universalObjectCratesClasses:
 | 
			
		||||
    - Illuminate\Database\Eloquent\Model
 | 
			
		||||
  # TODO: slowly remove these parameters and fix the issues found.
 | 
			
		||||
  reportUnmatchedIgnoredErrors: false
 | 
			
		||||
  checkGenericClassInNonGenericObjectType: false  # remove this rule when all other issues are solved.
 | 
			
		||||
  ignoreErrors:
 | 
			
		||||
  # TODO: slowly remove these exceptions and fix the issues found.
 | 
			
		||||
    - '#Dynamic call to static method#' # all the Laravel ORM things depend on this.
 | 
			
		||||
@@ -11,6 +12,7 @@ parameters:
 | 
			
		||||
    - '#with no value type specified in iterable type array#' # remove this rule when all other issues are solved.
 | 
			
		||||
    - '#has no value type specified in iterable type array#' # remove this rule when all other issues are solved.
 | 
			
		||||
    - '#is not allowed to extend#'
 | 
			
		||||
    - '#does not specify its types#'
 | 
			
		||||
    - '#switch is forbidden to use#'
 | 
			
		||||
    - '#is neither abstract nor final#'
 | 
			
		||||
    - '#on left side of \?\?\= always exists and is not nullable#'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								.env.example
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								.env.example
									
									
									
									
									
								
							@@ -299,27 +299,6 @@ DKR_BUILD_LOCALE=false
 | 
			
		||||
# Won't significantly speed up things.
 | 
			
		||||
DKR_CHECK_SQLITE=true
 | 
			
		||||
 | 
			
		||||
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
 | 
			
		||||
# and is up to date.
 | 
			
		||||
DKR_RUN_MIGRATION=true
 | 
			
		||||
 | 
			
		||||
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
 | 
			
		||||
# with the latest fixes (outside of migrations!)
 | 
			
		||||
DKR_RUN_UPGRADE=true
 | 
			
		||||
 | 
			
		||||
# Verify database integrity. Includes all data checks and verifications.
 | 
			
		||||
# Disabling this makes Firefly III assume your DB is intact.
 | 
			
		||||
DKR_RUN_VERIFY=true
 | 
			
		||||
 | 
			
		||||
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
 | 
			
		||||
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
 | 
			
		||||
DKR_RUN_REPORT=true
 | 
			
		||||
 | 
			
		||||
# Generate OAuth2 keys.
 | 
			
		||||
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
 | 
			
		||||
# you had previously generated keys already and they're stored in your database for restoration.
 | 
			
		||||
DKR_RUN_PASSPORT_INSTALL=true
 | 
			
		||||
 | 
			
		||||
# Leave the following configuration vars as is.
 | 
			
		||||
# Unless you like to tinker and know what you're doing.
 | 
			
		||||
APP_NAME=FireflyIII
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							@@ -4,6 +4,7 @@ updates:
 | 
			
		||||
  # Check for updates to GitHub Actions every week
 | 
			
		||||
  - package-ecosystem: "github-actions"
 | 
			
		||||
    directory: "/"
 | 
			
		||||
    labels: []
 | 
			
		||||
    schedule:
 | 
			
		||||
      interval: "weekly"
 | 
			
		||||
 | 
			
		||||
@@ -11,6 +12,7 @@ updates:
 | 
			
		||||
  - package-ecosystem: "composer"
 | 
			
		||||
    directory: "/" # Location of package manifests
 | 
			
		||||
    target-branch: develop
 | 
			
		||||
    labels: []
 | 
			
		||||
    versioning-strategy: increase
 | 
			
		||||
    schedule:
 | 
			
		||||
      interval: "weekly"
 | 
			
		||||
@@ -18,6 +20,7 @@ updates:
 | 
			
		||||
  # yarn / JS updates
 | 
			
		||||
  - package-ecosystem: "npm"
 | 
			
		||||
    directory: "/"
 | 
			
		||||
    labels: []
 | 
			
		||||
    target-branch: develop
 | 
			
		||||
    versioning-strategy: increase
 | 
			
		||||
    schedule:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
								
							@@ -6,6 +6,7 @@ Thank you for submitting new code to Firefly III, or any of the related projects
 | 
			
		||||
- Please do not open PRs to "discuss" possible solutions or to "get feedback" on your code. I simply don't have time for that.
 | 
			
		||||
- Pull requests for the MAIN branch will be closed.
 | 
			
		||||
- DO NOT include translated strings in your PR.
 | 
			
		||||
- PRs (or parts thereof) that only fix issues inside code comments will not be accepted.
 | 
			
		||||
 | 
			
		||||
If it feels necessary to open an issue first, please do so, before you open a PR.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/close-duplicates.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/close-duplicates.yml
									
									
									
									
										vendored
									
									
								
							@@ -13,7 +13,7 @@ jobs:
 | 
			
		||||
  close_duplicates:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: github/command@v1.2.0
 | 
			
		||||
      - uses: github/command@v1.2.1
 | 
			
		||||
        id: command
 | 
			
		||||
        with:
 | 
			
		||||
          allowed_contexts: "issue"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@@ -8,7 +8,7 @@ on:
 | 
			
		||||
        required: true
 | 
			
		||||
        default: 'develop'
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: '0 3 * * MON,THU'
 | 
			
		||||
    - cron: '0 3 * * MON'
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
@@ -39,7 +39,7 @@ jobs:
 | 
			
		||||
          php-version: '8.3'
 | 
			
		||||
          extensions: mbstring, intl, zip, bcmath
 | 
			
		||||
      - name: crowdin action
 | 
			
		||||
        uses: crowdin/github-action@v1
 | 
			
		||||
        uses: crowdin/github-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          upload_sources: true
 | 
			
		||||
          download_translations: true
 | 
			
		||||
@@ -125,9 +125,9 @@ jobs:
 | 
			
		||||
      - name: Build JS
 | 
			
		||||
        run: |
 | 
			
		||||
          npm install
 | 
			
		||||
          npm update
 | 
			
		||||
          npm run prod  --workspace=v1
 | 
			
		||||
          npm run build --workspace=v2
 | 
			
		||||
          npm update
 | 
			
		||||
      - name: Run CI
 | 
			
		||||
        run: |
 | 
			
		||||
          rm -rf vendor composer.lock
 | 
			
		||||
@@ -254,7 +254,7 @@ jobs:
 | 
			
		||||
            echo '' >> output.txt
 | 
			
		||||
            echo "* Installation instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/installation/docker/), [Portainer](https://docs.firefly-iii.org/how-to/firefly-iii/installation/portainer/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/installation/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-managed/)" >> output.txt
 | 
			
		||||
            echo "* Or read the upgrade instructions for [Docker](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/docker/), [Kubernetes](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/kubernetes/) or [self-managed servers](https://docs.firefly-iii.org/how-to/firefly-iii/upgrade/self-managed/)" >> output.txt
 | 
			
		||||
            echo "* The releases are signed, and you can verify them using the [Firefly III releases PGP key](https://docs.firefly-iii.org/explanation/more-information/signatures/)."
 | 
			
		||||
            echo "* The releases are signed, and you can verify them using the [Firefly III releases PGP key](https://docs.firefly-iii.org/explanation/more-information/signatures/)." >> output.txt
 | 
			
		||||
 | 
			
		||||
            echo "Create default release."
 | 
			
		||||
            git tag -a $releaseName -m "Here be changelog"
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,11 @@ 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.
 | 
			
		||||
 | 
			
		||||
## 2024
 | 
			
		||||
- Jhon Pedroza
 | 
			
		||||
- mzhubail
 | 
			
		||||
- tasnim
 | 
			
		||||
- withbest
 | 
			
		||||
- Steve Wasiura
 | 
			
		||||
- imlonghao
 | 
			
		||||
- Rahman Yusuf
 | 
			
		||||
- Michael Thomas
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ class UpdateController extends Controller
 | 
			
		||||
     */
 | 
			
		||||
    public function update(UpdateRequest $request, TransactionGroup $transactionGroup): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        app('log')->debug('Now in update routine for transaction group!');
 | 
			
		||||
        app('log')->debug('Now in update routine for transaction group');
 | 
			
		||||
        $data             = $request->getAll();
 | 
			
		||||
 | 
			
		||||
        // Fixes 8750.
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,7 @@ use FireflyIII\Support\Http\Api\TransactionFilter;
 | 
			
		||||
use FireflyIII\Transformers\CurrencyTransformer;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Http\JsonResponse;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use League\Fractal\Resource\Item;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -164,6 +165,7 @@ class UpdateController extends Controller
 | 
			
		||||
    public function update(UpdateRequest $request, TransactionCurrency $currency): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        $data        = $request->getAll();
 | 
			
		||||
        Log::debug(__METHOD__, $data);
 | 
			
		||||
 | 
			
		||||
        /** @var User $user */
 | 
			
		||||
        $user        = auth()->user();
 | 
			
		||||
@@ -173,6 +175,11 @@ class UpdateController extends Controller
 | 
			
		||||
        if (array_key_exists('enabled', $data) && false === $data['enabled'] && 1 === count($set) && $set->first()->id === $currency->id) {
 | 
			
		||||
            return response()->json([], 409);
 | 
			
		||||
        }
 | 
			
		||||
        // second safety catch on currency disable.
 | 
			
		||||
        if (array_key_exists('enabled', $data) && false === $data['enabled'] && $this->repository->currencyInUse($currency)) {
 | 
			
		||||
            return response()->json([], 409);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $currency    = $this->repository->update($currency, $data);
 | 
			
		||||
 | 
			
		||||
        app('preferences')->mark();
 | 
			
		||||
 
 | 
			
		||||
@@ -102,6 +102,8 @@ class PreferencesController extends Controller
 | 
			
		||||
     * TODO This endpoint is not documented.
 | 
			
		||||
     *
 | 
			
		||||
     * Return a single preference by name.
 | 
			
		||||
     *
 | 
			
		||||
     * @param Collection<int, Preference> $collection
 | 
			
		||||
     */
 | 
			
		||||
    public function showList(Collection $collection): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,7 @@ class StoreRequest extends FormRequest
 | 
			
		||||
        $models = config('firefly.valid_attachment_models');
 | 
			
		||||
        $models = array_map(
 | 
			
		||||
            static function (string $className) {
 | 
			
		||||
                return str_replace('FireflyIII\\Models\\', '', $className);
 | 
			
		||||
                return str_replace('FireflyIII\Models\\', '', $className);
 | 
			
		||||
            },
 | 
			
		||||
            $models
 | 
			
		||||
        );
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,7 @@ class UpdateRequest extends FormRequest
 | 
			
		||||
        $models = config('firefly.valid_attachment_models');
 | 
			
		||||
        $models = array_map(
 | 
			
		||||
            static function (string $className) {
 | 
			
		||||
                return str_replace('FireflyIII\\Models\\', '', $className);
 | 
			
		||||
                return str_replace('FireflyIII\Models\\', '', $className);
 | 
			
		||||
            },
 | 
			
		||||
            $models
 | 
			
		||||
        );
 | 
			
		||||
 
 | 
			
		||||
@@ -64,18 +64,12 @@ class AccountController extends Controller
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Documentation for this endpoint:
 | 
			
		||||
     * TODO list of checks
 | 
			
		||||
     * 1. use dates from ParameterBag
 | 
			
		||||
     * 2. Request validates dates
 | 
			
		||||
     * 3. Request includes user_group_id
 | 
			
		||||
     * 4. Endpoint is documented.
 | 
			
		||||
     * 5. Collector uses user_group_id
 | 
			
		||||
     * Documentation: https://api-docs.firefly-iii.org/?urls.primaryName=2.1.0%20(v2)#/autocomplete/getAccountsAC
 | 
			
		||||
     */
 | 
			
		||||
    public function accounts(AutocompleteRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        $queryParameters = $request->getParameters();
 | 
			
		||||
        $result          = $this->repository->searchAccount((string) $queryParameters['query'], $queryParameters['account_types'], $queryParameters['size']);
 | 
			
		||||
        $result          = $this->repository->searchAccount($queryParameters['query'], $queryParameters['account_types'], $queryParameters['size']);
 | 
			
		||||
        $return          = [];
 | 
			
		||||
 | 
			
		||||
        /** @var Account $account */
 | 
			
		||||
@@ -94,12 +88,12 @@ class AccountController extends Controller
 | 
			
		||||
            'id'    => (string) $account->id,
 | 
			
		||||
            'title' => $account->name,
 | 
			
		||||
            'meta'  => [
 | 
			
		||||
                'type'             => $account->accountType->type,
 | 
			
		||||
                'currency_id'      => null === $currency ? null : (string) $currency->id,
 | 
			
		||||
                'currency_code'    => $currency?->code,
 | 
			
		||||
                'currency_symbol'  => $currency?->symbol,
 | 
			
		||||
                'currency_decimal' => $currency?->decimal_places,
 | 
			
		||||
                'account_balances' => $this->getAccountBalances($account),
 | 
			
		||||
                'type'                    => $account->accountType->type,
 | 
			
		||||
                'currency_id'             => null === $currency ? null : (string) $currency->id,
 | 
			
		||||
                'currency_code'           => $currency?->code,
 | 
			
		||||
                'currency_symbol'         => $currency?->symbol,
 | 
			
		||||
                'currency_decimal_places' => $currency?->decimal_places,
 | 
			
		||||
                'account_balances'        => $this->getAccountBalances($account),
 | 
			
		||||
            ],
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
@@ -129,17 +123,17 @@ class AccountController extends Controller
 | 
			
		||||
        $currency = $balance->transactionCurrency;
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'title'                   => $balance->title,
 | 
			
		||||
            'native_amount'           => $this->converter->convert($currency, $this->default, today(), $balance->balance),
 | 
			
		||||
            'amount'                  => app('steam')->bcround($balance->balance, $currency->decimal_places),
 | 
			
		||||
            'currency_id'             => (string) $currency->id,
 | 
			
		||||
            'currency_code'           => $currency->code,
 | 
			
		||||
            'currency_symbol'         => $currency->symbol,
 | 
			
		||||
            'currency_decimal_places' => $currency->decimal_places,
 | 
			
		||||
            'native_currency_id'      => (string) $this->default->id,
 | 
			
		||||
            'native_currency_code'    => $this->default->code,
 | 
			
		||||
            'native_currency_symbol'  => $this->default->symbol,
 | 
			
		||||
            'native_currency_decimal' => $this->default->decimal_places,
 | 
			
		||||
            'title'                          => $balance->title,
 | 
			
		||||
            'native_amount'                  => $this->converter->convert($currency, $this->default, today(), $balance->balance),
 | 
			
		||||
            'amount'                         => app('steam')->bcround($balance->balance, $currency->decimal_places),
 | 
			
		||||
            'currency_id'                    => (string) $currency->id,
 | 
			
		||||
            'currency_code'                  => $currency->code,
 | 
			
		||||
            'currency_symbol'                => $currency->symbol,
 | 
			
		||||
            'currency_decimal_places'        => $currency->decimal_places,
 | 
			
		||||
            'native_currency_id'             => (string) $this->default->id,
 | 
			
		||||
            'native_currency_code'           => $this->default->code,
 | 
			
		||||
            'native_currency_symbol'         => $this->default->symbol,
 | 
			
		||||
            'native_currency_decimal_places' => $this->default->decimal_places,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -53,13 +53,7 @@ class CategoryController extends Controller
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *  Documentation for this endpoint:
 | 
			
		||||
     *  TODO list of checks
 | 
			
		||||
     *  1. use dates from ParameterBag
 | 
			
		||||
     *  2. Request validates dates
 | 
			
		||||
     *  3. Request includes user_group_id
 | 
			
		||||
     *  4. Endpoint is documented.
 | 
			
		||||
     *  5. Collector uses user_group_id
 | 
			
		||||
     * Documentation: https://api-docs.firefly-iii.org/?urls.primaryName=2.1.0%20(v2)#/autocomplete/getCategoriesAC
 | 
			
		||||
     */
 | 
			
		||||
    public function categories(AutocompleteRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -53,13 +53,7 @@ class TagController extends Controller
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *  Documentation for this endpoint:
 | 
			
		||||
     *  TODO list of checks
 | 
			
		||||
     *  1. use dates from ParameterBag
 | 
			
		||||
     *  2. Request validates dates
 | 
			
		||||
     *  3. Request includes user_group_id
 | 
			
		||||
     *  4. Endpoint is documented.
 | 
			
		||||
     *  5. Collector uses user_group_id
 | 
			
		||||
     * Documentation: https://api-docs.firefly-iii.org/?urls.primaryName=2.1.0%20(v2)#/autocomplete/getTagsAC
 | 
			
		||||
     */
 | 
			
		||||
    public function tags(AutocompleteRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -53,13 +53,7 @@ class TransactionController extends Controller
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *  Documentation for this endpoint:
 | 
			
		||||
     *  TODO list of checks
 | 
			
		||||
     *  1. use dates from ParameterBag
 | 
			
		||||
     *  2. Request validates dates
 | 
			
		||||
     *  3. Request includes user_group_id
 | 
			
		||||
     *  4. Endpoint is documented.
 | 
			
		||||
     *  5. Collector uses user_group_id
 | 
			
		||||
     * Documentation: https://api-docs.firefly-iii.org/?urls.primaryName=2.1.0%20(v2)#/autocomplete/getTransactionsAC
 | 
			
		||||
     */
 | 
			
		||||
    public function transactionDescriptions(AutocompleteRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,19 +24,17 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Api\V2\Controllers\Chart;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use FireflyIII\Api\V2\Controllers\Controller;
 | 
			
		||||
use FireflyIII\Api\V2\Request\Chart\DashboardChartRequest;
 | 
			
		||||
use FireflyIII\Enums\UserRoleEnum;
 | 
			
		||||
use FireflyIII\Api\V2\Request\Chart\ChartRequest;
 | 
			
		||||
use FireflyIII\Exceptions\FireflyException;
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Models\AccountType;
 | 
			
		||||
use FireflyIII\Models\TransactionCurrency;
 | 
			
		||||
use FireflyIII\Repositories\UserGroups\Account\AccountRepositoryInterface;
 | 
			
		||||
use FireflyIII\Support\Chart\ChartData;
 | 
			
		||||
use FireflyIII\Support\Http\Api\CleansChartData;
 | 
			
		||||
use FireflyIII\Support\Http\Api\CollectsAccountsFromFilter;
 | 
			
		||||
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
 | 
			
		||||
use Illuminate\Http\JsonResponse;
 | 
			
		||||
use Illuminate\Support\Collection;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AccountController
 | 
			
		||||
@@ -44,10 +42,12 @@ use Illuminate\Support\Collection;
 | 
			
		||||
class AccountController extends Controller
 | 
			
		||||
{
 | 
			
		||||
    use CleansChartData;
 | 
			
		||||
    use CollectsAccountsFromFilter;
 | 
			
		||||
    use ValidatesUserGroupTrait;
 | 
			
		||||
 | 
			
		||||
    private AccountRepositoryInterface $repository;
 | 
			
		||||
    protected array                    $acceptedRoles = [UserRoleEnum::READ_ONLY];
 | 
			
		||||
    private ChartData                  $chartData;
 | 
			
		||||
    private TransactionCurrency        $default;
 | 
			
		||||
 | 
			
		||||
    public function __construct()
 | 
			
		||||
    {
 | 
			
		||||
@@ -56,6 +56,8 @@ class AccountController extends Controller
 | 
			
		||||
            function ($request, $next) {
 | 
			
		||||
                $this->repository = app(AccountRepositoryInterface::class);
 | 
			
		||||
                $this->repository->setUserGroup($this->validateUserGroup($request));
 | 
			
		||||
                $this->chartData  = new ChartData();
 | 
			
		||||
                $this->default    = app('amount')->getDefaultCurrency();
 | 
			
		||||
 | 
			
		||||
                return $next($request);
 | 
			
		||||
            }
 | 
			
		||||
@@ -63,107 +65,76 @@ class AccountController extends Controller
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This endpoint is documented at
 | 
			
		||||
     * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v2)#/charts/getChartAccountOverview
 | 
			
		||||
     *
 | 
			
		||||
     * The native currency is the preferred currency on the page /currencies.
 | 
			
		||||
     *
 | 
			
		||||
     * If a transaction has foreign currency = native currency, the foreign amount will be used, no conversion
 | 
			
		||||
     * will take place.
 | 
			
		||||
     *
 | 
			
		||||
     * TODO validate and set user_group_id from request
 | 
			
		||||
     * TODO fix documentation
 | 
			
		||||
     *
 | 
			
		||||
     * @throws FireflyException
 | 
			
		||||
     *
 | 
			
		||||
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
 | 
			
		||||
     */
 | 
			
		||||
    public function dashboard(DashboardChartRequest $request): JsonResponse
 | 
			
		||||
    public function dashboard(ChartRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        /** @var Carbon $start */
 | 
			
		||||
        $start     = $this->parameters->get('start');
 | 
			
		||||
        $queryParameters = $request->getParameters();
 | 
			
		||||
        $accounts        = $this->getAccountList($queryParameters);
 | 
			
		||||
 | 
			
		||||
        /** @var Carbon $end */
 | 
			
		||||
        $end       = $this->parameters->get('end');
 | 
			
		||||
        $end->endOfDay();
 | 
			
		||||
 | 
			
		||||
        /** @var TransactionCurrency $default */
 | 
			
		||||
        $default   = app('amount')->getDefaultCurrency();
 | 
			
		||||
        $params    = $request->getAll();
 | 
			
		||||
 | 
			
		||||
        /** @var Collection $accounts */
 | 
			
		||||
        $accounts  = $params['accounts'];
 | 
			
		||||
        $chartData = [];
 | 
			
		||||
 | 
			
		||||
        // user's preferences
 | 
			
		||||
        if (0 === $accounts->count()) {
 | 
			
		||||
            $defaultSet = $this->repository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT])->pluck('id')->toArray();
 | 
			
		||||
            $frontpage  = app('preferences')->get('frontpageAccounts', $defaultSet);
 | 
			
		||||
 | 
			
		||||
            if (!(is_array($frontpage->data) && count($frontpage->data) > 0)) {
 | 
			
		||||
                $frontpage->data = $defaultSet;
 | 
			
		||||
                $frontpage->save();
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $accounts   = $this->repository->getAccountsById($frontpage->data);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // both options are overruled by "preselected"
 | 
			
		||||
        if ('all' === $params['preselected']) {
 | 
			
		||||
            $accounts = $this->repository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);
 | 
			
		||||
        }
 | 
			
		||||
        if ('assets' === $params['preselected']) {
 | 
			
		||||
            $accounts = $this->repository->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]);
 | 
			
		||||
        }
 | 
			
		||||
        if ('liabilities' === $params['preselected']) {
 | 
			
		||||
            $accounts = $this->repository->getAccountsByType([AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);
 | 
			
		||||
        }
 | 
			
		||||
        // move date to end of day
 | 
			
		||||
        $queryParameters['start']->startOfDay();
 | 
			
		||||
        $queryParameters['end']->endOfDay();
 | 
			
		||||
 | 
			
		||||
        // loop each account, and collect info:
 | 
			
		||||
        /** @var Account $account */
 | 
			
		||||
        foreach ($accounts as $account) {
 | 
			
		||||
            $currency          = $this->repository->getAccountCurrency($account);
 | 
			
		||||
            if (null === $currency) {
 | 
			
		||||
                $currency = $default;
 | 
			
		||||
            }
 | 
			
		||||
            $currentSet        = [
 | 
			
		||||
                'label'                          => $account->name,
 | 
			
		||||
                // the currency that belongs to the account.
 | 
			
		||||
                'currency_id'                    => (string)$currency->id,
 | 
			
		||||
                'currency_code'                  => $currency->code,
 | 
			
		||||
                'currency_symbol'                => $currency->symbol,
 | 
			
		||||
                'currency_decimal_places'        => $currency->decimal_places,
 | 
			
		||||
 | 
			
		||||
                // the default currency of the user (could be the same!)
 | 
			
		||||
                'native_currency_id'             => (string)$default->id,
 | 
			
		||||
                'native_currency_code'           => $default->code,
 | 
			
		||||
                'native_currency_symbol'         => $default->symbol,
 | 
			
		||||
                'native_currency_decimal_places' => $default->decimal_places,
 | 
			
		||||
                'start'                          => $start->toAtomString(),
 | 
			
		||||
                'end'                            => $end->toAtomString(),
 | 
			
		||||
                'period'                         => '1D',
 | 
			
		||||
                'entries'                        => [],
 | 
			
		||||
                'native_entries'                 => [],
 | 
			
		||||
            ];
 | 
			
		||||
            $currentStart      = clone $start;
 | 
			
		||||
            $range             = app('steam')->balanceInRange($account, $start, clone $end, $currency);
 | 
			
		||||
            $rangeConverted    = app('steam')->balanceInRangeConverted($account, $start, clone $end, $default);
 | 
			
		||||
 | 
			
		||||
            $previous          = array_values($range)[0];
 | 
			
		||||
            $previousConverted = array_values($rangeConverted)[0];
 | 
			
		||||
            while ($currentStart <= $end) {
 | 
			
		||||
                $format                               = $currentStart->format('Y-m-d');
 | 
			
		||||
                $label                                = $currentStart->toAtomString();
 | 
			
		||||
                $balance                              = array_key_exists($format, $range) ? $range[$format] : $previous;
 | 
			
		||||
                $balanceConverted                     = array_key_exists($format, $rangeConverted) ? $rangeConverted[$format] : $previousConverted;
 | 
			
		||||
                $previous                             = $balance;
 | 
			
		||||
                $previousConverted                    = $balanceConverted;
 | 
			
		||||
 | 
			
		||||
                $currentStart->addDay();
 | 
			
		||||
                $currentSet['entries'][$label]        = $balance;
 | 
			
		||||
                $currentSet['native_entries'][$label] = $balanceConverted;
 | 
			
		||||
            }
 | 
			
		||||
            $chartData[]       = $currentSet;
 | 
			
		||||
            $this->renderAccountData($queryParameters, $account);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return response()->json($this->clean($chartData));
 | 
			
		||||
        return response()->json($this->chartData->render());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @throws FireflyException
 | 
			
		||||
     */
 | 
			
		||||
    private function renderAccountData(array $params, Account $account): void
 | 
			
		||||
    {
 | 
			
		||||
        $currency          = $this->repository->getAccountCurrency($account);
 | 
			
		||||
        if (null === $currency) {
 | 
			
		||||
            $currency = $this->default;
 | 
			
		||||
        }
 | 
			
		||||
        $currentSet        = [
 | 
			
		||||
            'label'                          => $account->name,
 | 
			
		||||
 | 
			
		||||
            // the currency that belongs to the account.
 | 
			
		||||
            'currency_id'                    => (string) $currency->id,
 | 
			
		||||
            'currency_code'                  => $currency->code,
 | 
			
		||||
            'currency_symbol'                => $currency->symbol,
 | 
			
		||||
            'currency_decimal_places'        => $currency->decimal_places,
 | 
			
		||||
 | 
			
		||||
            // the default currency of the user (could be the same!)
 | 
			
		||||
            'native_currency_id'             => (string) $this->default->id,
 | 
			
		||||
            'native_currency_code'           => $this->default->code,
 | 
			
		||||
            'native_currency_symbol'         => $this->default->symbol,
 | 
			
		||||
            'native_currency_decimal_places' => $this->default->decimal_places,
 | 
			
		||||
            'date'                           => $params['start']->toAtomString(),
 | 
			
		||||
            'start'                          => $params['start']->toAtomString(),
 | 
			
		||||
            'end'                            => $params['end']->toAtomString(),
 | 
			
		||||
            'period'                         => '1D',
 | 
			
		||||
            'entries'                        => [],
 | 
			
		||||
            'native_entries'                 => [],
 | 
			
		||||
        ];
 | 
			
		||||
        $currentStart      = clone $params['start'];
 | 
			
		||||
        $range             = app('steam')->balanceInRange($account, $params['start'], clone $params['end'], $currency);
 | 
			
		||||
        $rangeConverted    = app('steam')->balanceInRangeConverted($account, $params['start'], clone $params['end'], $this->default);
 | 
			
		||||
 | 
			
		||||
        $previous          = array_values($range)[0];
 | 
			
		||||
        $previousConverted = array_values($rangeConverted)[0];
 | 
			
		||||
        while ($currentStart <= $params['end']) {
 | 
			
		||||
            $format                               = $currentStart->format('Y-m-d');
 | 
			
		||||
            $label                                = $currentStart->toAtomString();
 | 
			
		||||
            $balance                              = array_key_exists($format, $range) ? $range[$format] : $previous;
 | 
			
		||||
            $balanceConverted                     = array_key_exists($format, $rangeConverted) ? $rangeConverted[$format] : $previousConverted;
 | 
			
		||||
            $previous                             = $balance;
 | 
			
		||||
            $previousConverted                    = $balanceConverted;
 | 
			
		||||
 | 
			
		||||
            $currentStart->addDay();
 | 
			
		||||
            $currentSet['entries'][$label]        = $balance;
 | 
			
		||||
            $currentSet['native_entries'][$label] = $balanceConverted;
 | 
			
		||||
        }
 | 
			
		||||
        $this->chartData->add($currentSet);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -24,18 +24,18 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Api\V2\Controllers\Chart;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use FireflyIII\Api\V2\Controllers\Controller;
 | 
			
		||||
use FireflyIII\Api\V2\Request\Chart\BalanceChartRequest;
 | 
			
		||||
use FireflyIII\Enums\UserRoleEnum;
 | 
			
		||||
use FireflyIII\Api\V2\Request\Chart\ChartRequest;
 | 
			
		||||
use FireflyIII\Exceptions\FireflyException;
 | 
			
		||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
 | 
			
		||||
use FireflyIII\Models\TransactionCurrency;
 | 
			
		||||
use FireflyIII\Models\TransactionType;
 | 
			
		||||
use FireflyIII\Repositories\UserGroups\Account\AccountRepositoryInterface;
 | 
			
		||||
use FireflyIII\Support\Chart\ChartData;
 | 
			
		||||
use FireflyIII\Support\Http\Api\AccountBalanceGrouped;
 | 
			
		||||
use FireflyIII\Support\Http\Api\CleansChartData;
 | 
			
		||||
use FireflyIII\Support\Http\Api\CollectsAccountsFromFilter;
 | 
			
		||||
use Illuminate\Http\JsonResponse;
 | 
			
		||||
use Illuminate\Support\Collection;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class BalanceController
 | 
			
		||||
@@ -43,7 +43,30 @@ use Illuminate\Support\Collection;
 | 
			
		||||
class BalanceController extends Controller
 | 
			
		||||
{
 | 
			
		||||
    use CleansChartData;
 | 
			
		||||
    protected array                    $acceptedRoles = [UserRoleEnum::READ_ONLY];
 | 
			
		||||
    use CollectsAccountsFromFilter;
 | 
			
		||||
 | 
			
		||||
    private AccountRepositoryInterface $repository;
 | 
			
		||||
    private GroupCollectorInterface    $collector;
 | 
			
		||||
    private ChartData                  $chartData;
 | 
			
		||||
    // private TransactionCurrency        $default;
 | 
			
		||||
 | 
			
		||||
    public function __construct()
 | 
			
		||||
    {
 | 
			
		||||
        parent::__construct();
 | 
			
		||||
        $this->middleware(
 | 
			
		||||
            function ($request, $next) {
 | 
			
		||||
                $this->repository = app(AccountRepositoryInterface::class);
 | 
			
		||||
                $this->collector  = app(GroupCollectorInterface::class);
 | 
			
		||||
                $userGroup        = $this->validateUserGroup($request);
 | 
			
		||||
                $this->repository->setUserGroup($userGroup);
 | 
			
		||||
                $this->collector->setUserGroup($userGroup);
 | 
			
		||||
                $this->chartData  = new ChartData();
 | 
			
		||||
                // $this->default    = app('amount')->getDefaultCurrency();
 | 
			
		||||
 | 
			
		||||
                return $next($request);
 | 
			
		||||
            }
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The code is practically a duplicate of ReportController::operations.
 | 
			
		||||
@@ -54,50 +77,43 @@ class BalanceController extends Controller
 | 
			
		||||
     * If the transaction being processed is already in native currency OR if the
 | 
			
		||||
     * foreign amount is in the native currency, the amount will not be converted.
 | 
			
		||||
     *
 | 
			
		||||
     * TODO validate and set user_group_id
 | 
			
		||||
     * TODO collector set group, not user
 | 
			
		||||
     *
 | 
			
		||||
     * @throws FireflyException
 | 
			
		||||
     */
 | 
			
		||||
    public function balance(BalanceChartRequest $request): JsonResponse
 | 
			
		||||
    public function balance(ChartRequest $request): JsonResponse
 | 
			
		||||
    {
 | 
			
		||||
        $params         = $request->getAll();
 | 
			
		||||
        $queryParameters = $request->getParameters();
 | 
			
		||||
        $accounts        = $this->getAccountList($queryParameters);
 | 
			
		||||
 | 
			
		||||
        /** @var Carbon $start */
 | 
			
		||||
        $start          = $this->parameters->get('start');
 | 
			
		||||
 | 
			
		||||
        /** @var Carbon $end */
 | 
			
		||||
        $end            = $this->parameters->get('end');
 | 
			
		||||
        $end->endOfDay();
 | 
			
		||||
 | 
			
		||||
        /** @var Collection $accounts */
 | 
			
		||||
        $accounts       = $params['accounts'];
 | 
			
		||||
 | 
			
		||||
        /** @var string $preferredRange */
 | 
			
		||||
        $preferredRange = $params['period'];
 | 
			
		||||
        // move date to end of day
 | 
			
		||||
        $queryParameters['start']->startOfDay();
 | 
			
		||||
        $queryParameters['end']->endOfDay();
 | 
			
		||||
 | 
			
		||||
        // prepare for currency conversion and data collection:
 | 
			
		||||
        /** @var TransactionCurrency $default */
 | 
			
		||||
        $default        = app('amount')->getDefaultCurrency();
 | 
			
		||||
        $default         = app('amount')->getDefaultCurrency();
 | 
			
		||||
 | 
			
		||||
        // get journals for entire period:
 | 
			
		||||
        /** @var GroupCollectorInterface $collector */
 | 
			
		||||
        $collector      = app(GroupCollectorInterface::class);
 | 
			
		||||
        $collector->setRange($start, $end)->withAccountInformation();
 | 
			
		||||
        $collector->setXorAccounts($accounts);
 | 
			
		||||
        $collector->setTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::RECONCILIATION, TransactionType::TRANSFER]);
 | 
			
		||||
        $journals       = $collector->getExtractedJournals();
 | 
			
		||||
 | 
			
		||||
        $object         = new AccountBalanceGrouped();
 | 
			
		||||
        $object->setPreferredRange($preferredRange);
 | 
			
		||||
        $this->collector->setRange($queryParameters['start'], $queryParameters['end'])
 | 
			
		||||
            ->withAccountInformation()
 | 
			
		||||
            ->setXorAccounts($accounts)
 | 
			
		||||
            ->setTypes([TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::RECONCILIATION, TransactionType::TRANSFER])
 | 
			
		||||
        ;
 | 
			
		||||
        $journals        = $this->collector->getExtractedJournals();
 | 
			
		||||
 | 
			
		||||
        $object          = new AccountBalanceGrouped();
 | 
			
		||||
        $object->setPreferredRange($queryParameters['period']);
 | 
			
		||||
        $object->setDefault($default);
 | 
			
		||||
        $object->setAccounts($accounts);
 | 
			
		||||
        $object->setJournals($journals);
 | 
			
		||||
        $object->setStart($start);
 | 
			
		||||
        $object->setEnd($end);
 | 
			
		||||
        $object->setStart($queryParameters['start']);
 | 
			
		||||
        $object->setEnd($queryParameters['end']);
 | 
			
		||||
        $object->groupByCurrencyAndPeriod();
 | 
			
		||||
        $chartData      = $object->convertToChartData();
 | 
			
		||||
        $data            = $object->convertToChartData();
 | 
			
		||||
        foreach ($data as $entry) {
 | 
			
		||||
            $this->chartData->add($entry);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return response()->json($this->clean($chartData));
 | 
			
		||||
        return response()->json($this->chartData->render());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										111
									
								
								app/Api/V2/Controllers/JsonApi/AccountController.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								app/Api/V2/Controllers/JsonApi/AccountController.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,111 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * AccountController.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Api\V2\Controllers\JsonApi;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Http\Controllers\Controller;
 | 
			
		||||
use FireflyIII\JsonApi\V2\Accounts\AccountCollectionQuery;
 | 
			
		||||
use FireflyIII\JsonApi\V2\Accounts\AccountSchema;
 | 
			
		||||
use FireflyIII\JsonApi\V2\Accounts\AccountSingleQuery;
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use Illuminate\Contracts\Support\Responsable;
 | 
			
		||||
use Illuminate\Http\Response;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Core\Responses\DataResponse;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Controllers\Actions;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AccountController
 | 
			
		||||
 *
 | 
			
		||||
 * This class handles api/v2 requests for accounts.
 | 
			
		||||
 * Most stuff is default stuff.
 | 
			
		||||
 */
 | 
			
		||||
class AccountController extends Controller
 | 
			
		||||
{
 | 
			
		||||
    use Actions\AttachRelationship;
 | 
			
		||||
    use Actions\Destroy;
 | 
			
		||||
    use Actions\DetachRelationship;
 | 
			
		||||
 | 
			
		||||
    use Actions\FetchMany;
 | 
			
		||||
    // use Actions\FetchOne;
 | 
			
		||||
    use Actions\FetchRelated;
 | 
			
		||||
    use Actions\FetchRelationship;
 | 
			
		||||
    use Actions\Store;
 | 
			
		||||
    use Actions\Update;
 | 
			
		||||
    use Actions\UpdateRelationship;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Fetch zero to many JSON API resources.
 | 
			
		||||
     *
 | 
			
		||||
     * @return Responsable|Response
 | 
			
		||||
     */
 | 
			
		||||
    public function index(AccountSchema $schema, AccountCollectionQuery $request)
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $models = $schema
 | 
			
		||||
            ->repository()
 | 
			
		||||
            ->queryAll()
 | 
			
		||||
            ->withRequest($request)
 | 
			
		||||
            ->get()
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
        // do something custom...
 | 
			
		||||
 | 
			
		||||
        return new DataResponse($models);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Fetch zero to one JSON API resource by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @return Responsable|Response
 | 
			
		||||
     */
 | 
			
		||||
    public function show(AccountSchema $schema, AccountSingleQuery $request, Account $account)
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $model = $schema->repository()
 | 
			
		||||
            ->queryOne($account)
 | 
			
		||||
            ->withRequest($request)
 | 
			
		||||
            ->first()
 | 
			
		||||
        ;
 | 
			
		||||
        Log::debug(sprintf('%s again!', __METHOD__));
 | 
			
		||||
 | 
			
		||||
        // do something custom...
 | 
			
		||||
 | 
			
		||||
        return new DataResponse($model);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //    public function readAccountBalances(AnonymousQuery $query, AccountBalanceSchema $schema, Account $account): Responsable
 | 
			
		||||
    //    {
 | 
			
		||||
    //        $schema = JsonApi::server()->schemas()->schemaFor('account-balances');
 | 
			
		||||
    //
 | 
			
		||||
    //        $models = $schema
 | 
			
		||||
    //            ->repository()
 | 
			
		||||
    //            ->queryAll()
 | 
			
		||||
    //            ->withRequest($query)
 | 
			
		||||
    //            ->withAccount($account)
 | 
			
		||||
    //            ->get()
 | 
			
		||||
    //        ;
 | 
			
		||||
    //
 | 
			
		||||
    //        return DataResponse::make($models);
 | 
			
		||||
    //    }
 | 
			
		||||
}
 | 
			
		||||
@@ -23,18 +23,15 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Api\V2\Request\Autocomplete;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Carbon\Exceptions\InvalidFormatException;
 | 
			
		||||
use FireflyIII\JsonApi\Rules\IsValidFilter;
 | 
			
		||||
use FireflyIII\JsonApi\Rules\IsValidPage;
 | 
			
		||||
use FireflyIII\Models\AccountType;
 | 
			
		||||
use FireflyIII\Support\Http\Api\AccountFilter;
 | 
			
		||||
use FireflyIII\Support\Http\Api\ParsesQueryFilters;
 | 
			
		||||
use FireflyIII\Support\Request\ChecksLogin;
 | 
			
		||||
use FireflyIII\Support\Request\ConvertsDataTypes;
 | 
			
		||||
use Illuminate\Foundation\Http\FormRequest;
 | 
			
		||||
use LaravelJsonApi\Core\Query\QueryParameters;
 | 
			
		||||
use LaravelJsonApi\Validation\Rule as JsonApiRule;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AutocompleteRequest
 | 
			
		||||
@@ -44,6 +41,7 @@ class AutocompleteRequest extends FormRequest
 | 
			
		||||
    use AccountFilter;
 | 
			
		||||
    use ChecksLogin;
 | 
			
		||||
    use ConvertsDataTypes;
 | 
			
		||||
    use ParsesQueryFilters;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Loops over all possible query parameters (these are shared over ALL auto complete requests)
 | 
			
		||||
@@ -55,47 +53,14 @@ class AutocompleteRequest extends FormRequest
 | 
			
		||||
    {
 | 
			
		||||
        $queryParameters = QueryParameters::cast($this->all());
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            $date = Carbon::createFromFormat('Y-m-d', $queryParameters->filter()?->value('date', date('Y-m-d')), config('app.timezone'));
 | 
			
		||||
        } catch (InvalidFormatException $e) {
 | 
			
		||||
            Log::debug(sprintf('Invalid date format in autocomplete request. Using today: %s', $e->getMessage()));
 | 
			
		||||
            $date = today();
 | 
			
		||||
        }
 | 
			
		||||
        $query           = $queryParameters->filter()?->value('query', '') ?? '';
 | 
			
		||||
        $size            = (int) ($queryParameters->page()['size'] ?? 50);
 | 
			
		||||
        $accountTypes    = $this->getAccountTypeParameter($queryParameters->filter()?->value('account_types', '') ?? '');
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'date'          => $date,
 | 
			
		||||
            'query'         => $query,
 | 
			
		||||
            'size'          => $size,
 | 
			
		||||
            'account_types' => $accountTypes,
 | 
			
		||||
            'date'          => $this->dateOrToday($queryParameters, 'date'),
 | 
			
		||||
            'query'         => $this->arrayOfStrings($queryParameters, 'query'),
 | 
			
		||||
            'size'          => $this->integerFromQueryParams($queryParameters, 'size', 50),
 | 
			
		||||
            'account_types' => $this->getAccountTypeParameter($this->arrayOfStrings($queryParameters, 'account_types')),
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //    public function getData(): array
 | 
			
		||||
    //    {
 | 
			
		||||
    //
 | 
			
		||||
    //        return [];
 | 
			
		||||
    //        $types = $this->convertString('types');
 | 
			
		||||
    //        $array = [];
 | 
			
		||||
    //        if ('' !== $types) {
 | 
			
		||||
    //            $array = explode(',', $types);
 | 
			
		||||
    //        }
 | 
			
		||||
    //        $limit = $this->convertInteger('limit');
 | 
			
		||||
    //        $limit = 0 === $limit ? 10 : $limit;
 | 
			
		||||
    //
 | 
			
		||||
    //        // remove 'initial balance' and another from allowed types. its internal
 | 
			
		||||
    //        $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
 | 
			
		||||
    //
 | 
			
		||||
    //        return [
 | 
			
		||||
    //            'types' => $array,
 | 
			
		||||
    //            'query' => $this->convertString('query'),
 | 
			
		||||
    //            'date'  => $this->getCarbonDate('date'),
 | 
			
		||||
    //            'limit' => $limit,
 | 
			
		||||
    //        ];
 | 
			
		||||
    //    }
 | 
			
		||||
 | 
			
		||||
    public function rules(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										118
									
								
								app/Api/V2/Request/Chart/ChartRequest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										118
									
								
								app/Api/V2/Request/Chart/ChartRequest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,118 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * DashboardChartRequest.php
 | 
			
		||||
 * Copyright (c) 2023 james@firefly-iii.org
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Api\V2\Request\Chart;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Enums\UserRoleEnum;
 | 
			
		||||
use FireflyIII\JsonApi\Rules\IsValidFilter;
 | 
			
		||||
use FireflyIII\Rules\IsFilterValueIn;
 | 
			
		||||
use FireflyIII\Support\Http\Api\ParsesQueryFilters;
 | 
			
		||||
use FireflyIII\Support\Http\Api\ValidatesUserGroupTrait;
 | 
			
		||||
use FireflyIII\Support\Request\ChecksLogin;
 | 
			
		||||
use FireflyIII\Support\Request\ConvertsDataTypes;
 | 
			
		||||
use Illuminate\Foundation\Http\FormRequest;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use Illuminate\Validation\Validator;
 | 
			
		||||
use LaravelJsonApi\Core\Query\QueryParameters;
 | 
			
		||||
use LaravelJsonApi\Validation\Rule as JsonApiRule;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class ChartRequest
 | 
			
		||||
 */
 | 
			
		||||
class ChartRequest extends FormRequest
 | 
			
		||||
{
 | 
			
		||||
    use ChecksLogin;
 | 
			
		||||
    use ConvertsDataTypes;
 | 
			
		||||
    use ParsesQueryFilters;
 | 
			
		||||
    use ValidatesUserGroupTrait;
 | 
			
		||||
 | 
			
		||||
    protected array $acceptedRoles = [UserRoleEnum::READ_ONLY];
 | 
			
		||||
 | 
			
		||||
    public function getParameters(): array
 | 
			
		||||
    {
 | 
			
		||||
        $queryParameters = QueryParameters::cast($this->all());
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'start'       => $this->dateOrToday($queryParameters, 'start'),
 | 
			
		||||
            'end'         => $this->dateOrToday($queryParameters, 'end'),
 | 
			
		||||
            'preselected' => $this->stringFromQueryParams($queryParameters, 'preselected', 'empty'),
 | 
			
		||||
            'period'      => $this->stringFromQueryParams($queryParameters, 'period', '1M'),
 | 
			
		||||
            'accounts'    => $this->arrayOfStrings($queryParameters, 'accounts'),
 | 
			
		||||
            // preselected heeft maar een paar toegestane waardes, dat moet ook goed gaan.
 | 
			
		||||
            //            'query'         => $this->arrayOfStrings($queryParameters, 'query'),
 | 
			
		||||
            //            'size'          => $this->integerFromQueryParams($queryParameters,'size', 50),
 | 
			
		||||
            //            'account_types' => $this->getAccountTypeParameter($this->arrayOfStrings($queryParameters, 'account_types')),
 | 
			
		||||
        ];
 | 
			
		||||
        // collect accounts based on this list?
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //        return [
 | 
			
		||||
    //            'accounts'    => $this->getAccountList(),
 | 
			
		||||
    //            'preselected' => $this->convertString('preselected'),
 | 
			
		||||
    //        ];
 | 
			
		||||
    //    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The rules that the incoming request must be matched against.
 | 
			
		||||
     */
 | 
			
		||||
    public function rules(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            'fields'  => JsonApiRule::notSupported(),
 | 
			
		||||
            'filter'  => ['nullable', 'array',
 | 
			
		||||
                new IsValidFilter(['start', 'end', 'preselected', 'accounts']),
 | 
			
		||||
                new IsFilterValueIn('preselected', config('firefly.preselected_accounts')),
 | 
			
		||||
            ],
 | 
			
		||||
            'include' => JsonApiRule::notSupported(),
 | 
			
		||||
            'page'    => JsonApiRule::notSupported(),
 | 
			
		||||
            'sort'    => JsonApiRule::notSupported(),
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
        //        return [
 | 
			
		||||
        //            'start'       => 'required|date|after:1900-01-01|before:2099-12-31',
 | 
			
		||||
        //            'end'         => 'required|date|after_or_equal:start|before:2099-12-31|after:1900-01-01',
 | 
			
		||||
        //            'preselected' => sprintf('in:%s', implode(',', config('firefly.preselected_accounts'))),
 | 
			
		||||
        //            'accounts.*'  => 'exists:accounts,id',
 | 
			
		||||
        //        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function withValidator(Validator $validator): void
 | 
			
		||||
    {
 | 
			
		||||
        $validator->after(
 | 
			
		||||
            static function (Validator $validator): void {
 | 
			
		||||
                // validate transaction query data.
 | 
			
		||||
                $data = $validator->getData();
 | 
			
		||||
                if (!array_key_exists('accounts', $data)) {
 | 
			
		||||
                    // $validator->errors()->add('accounts', trans('validation.filled', ['attribute' => 'accounts']));
 | 
			
		||||
                    return;
 | 
			
		||||
                }
 | 
			
		||||
                if (!is_array($data['accounts'])) {
 | 
			
		||||
                    $validator->errors()->add('accounts', trans('validation.filled', ['attribute' => 'accounts']));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        );
 | 
			
		||||
        if ($validator->fails()) {
 | 
			
		||||
            Log::channel('audit')->error(sprintf('Validation errors in %s', __CLASS__), $validator->errors()->toArray());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Console\Commands\Correction;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
 | 
			
		||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
 | 
			
		||||
use Illuminate\Console\Command;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class CorrectionSkeleton
 | 
			
		||||
 */
 | 
			
		||||
class CorrectAccountBalance extends Command
 | 
			
		||||
{
 | 
			
		||||
    use ShowsFriendlyMessages;
 | 
			
		||||
    protected $description = 'Recalculate all account balance amounts';
 | 
			
		||||
 | 
			
		||||
    protected $signature   = 'firefly-iii:correct-account-balance';
 | 
			
		||||
 | 
			
		||||
    public function handle(): int
 | 
			
		||||
    {
 | 
			
		||||
        $this->correctBalanceAmounts();
 | 
			
		||||
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function correctBalanceAmounts(): void
 | 
			
		||||
    {
 | 
			
		||||
        AccountBalanceCalculator::recalculateAll();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -74,7 +74,6 @@ class CorrectDatabase extends Command
 | 
			
		||||
            'firefly-iii:unify-group-accounts',
 | 
			
		||||
            'firefly-iii:trigger-credit-recalculation',
 | 
			
		||||
            'firefly-iii:migrate-preferences',
 | 
			
		||||
            'firefly-iii:correct-account-balance',
 | 
			
		||||
        ];
 | 
			
		||||
        foreach ($commands as $command) {
 | 
			
		||||
            $this->friendlyLine(sprintf('Now executing command "%s"', $command));
 | 
			
		||||
 
 | 
			
		||||
@@ -26,6 +26,8 @@ namespace FireflyIII\Console\Commands\Correction;
 | 
			
		||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
 | 
			
		||||
use FireflyIII\Models\Transaction;
 | 
			
		||||
use FireflyIII\Models\TransactionJournal;
 | 
			
		||||
use FireflyIII\Models\TransactionType;
 | 
			
		||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
 | 
			
		||||
use Illuminate\Console\Command;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
 | 
			
		||||
@@ -38,61 +40,18 @@ class FixUnevenAmount extends Command
 | 
			
		||||
 | 
			
		||||
    protected $description = 'Fix journals with uneven amounts.';
 | 
			
		||||
    protected $signature   = 'firefly-iii:fix-uneven-amount';
 | 
			
		||||
    private int $count;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Execute the console command.
 | 
			
		||||
     */
 | 
			
		||||
    public function handle(): int
 | 
			
		||||
    {
 | 
			
		||||
        $count    = 0;
 | 
			
		||||
        $journals = \DB::table('transactions')
 | 
			
		||||
            ->groupBy('transaction_journal_id')
 | 
			
		||||
            ->whereNull('deleted_at')
 | 
			
		||||
            ->get(['transaction_journal_id', \DB::raw('SUM(amount) AS the_sum')])
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
        /** @var \stdClass $entry */
 | 
			
		||||
        foreach ($journals as $entry) {
 | 
			
		||||
            $sum = (string)$entry->the_sum;
 | 
			
		||||
            if (!is_numeric($sum)
 | 
			
		||||
                || '' === $sum // @phpstan-ignore-line
 | 
			
		||||
                || str_contains($sum, 'e')
 | 
			
		||||
                || str_contains($sum, ',')) {
 | 
			
		||||
                $message = sprintf(
 | 
			
		||||
                    'Journal #%d has an invalid sum ("%s"). No sure what to do.',
 | 
			
		||||
                    $entry->transaction_journal_id,
 | 
			
		||||
                    $entry->the_sum
 | 
			
		||||
                );
 | 
			
		||||
                $this->friendlyWarning($message);
 | 
			
		||||
                app('log')->warning($message);
 | 
			
		||||
                ++$count;
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            $res = -1;
 | 
			
		||||
 | 
			
		||||
            try {
 | 
			
		||||
                $res = bccomp($sum, '0');
 | 
			
		||||
            } catch (\ValueError $e) {
 | 
			
		||||
                $this->friendlyError(sprintf('Could not bccomp("%s", "0").', $sum));
 | 
			
		||||
                Log::error($e->getMessage());
 | 
			
		||||
                Log::error($e->getTraceAsString());
 | 
			
		||||
            }
 | 
			
		||||
            if (0 !== $res) {
 | 
			
		||||
                $message = sprintf(
 | 
			
		||||
                    'Sum of journal #%d is %s instead of zero.',
 | 
			
		||||
                    $entry->transaction_journal_id,
 | 
			
		||||
                    $entry->the_sum
 | 
			
		||||
                );
 | 
			
		||||
                $this->friendlyWarning($message);
 | 
			
		||||
                app('log')->warning($message);
 | 
			
		||||
                $this->fixJournal($entry->transaction_journal_id);
 | 
			
		||||
                ++$count;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (0 === $count) {
 | 
			
		||||
            $this->friendlyPositive('Database amount integrity is OK');
 | 
			
		||||
        }
 | 
			
		||||
        $this->count = 0;
 | 
			
		||||
        $this->convertOldStyleTransfers();
 | 
			
		||||
        $this->fixUnevenAmounts();
 | 
			
		||||
        $this->matchCurrencies();
 | 
			
		||||
        AccountBalanceCalculator::forceRecalculateAll();
 | 
			
		||||
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
@@ -118,6 +77,7 @@ class FixUnevenAmount extends Command
 | 
			
		||||
            );
 | 
			
		||||
            Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
 | 
			
		||||
            TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
 | 
			
		||||
            ++$this->count;
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
@@ -139,14 +99,194 @@ class FixUnevenAmount extends Command
 | 
			
		||||
 | 
			
		||||
            Transaction::where('transaction_journal_id', $journal->id ?? 0)->forceDelete();
 | 
			
		||||
            TransactionJournal::where('id', $journal->id ?? 0)->forceDelete();
 | 
			
		||||
            ++$this->count;
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // may still be able to salvage this journal if it is a transfer with foreign currency info
 | 
			
		||||
        if ($this->isForeignCurrencyTransfer($journal)) {
 | 
			
		||||
            Log::debug(sprintf('Can skip foreign currency transfer #%d.', $journal->id));
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $message             = sprintf('Sum of journal #%d is not zero, journal is broken and now fixed.', $journal->id);
 | 
			
		||||
 | 
			
		||||
        $this->friendlyWarning($message);
 | 
			
		||||
        app('log')->warning($message);
 | 
			
		||||
 | 
			
		||||
        $destination->amount = $amount;
 | 
			
		||||
        $destination->save();
 | 
			
		||||
 | 
			
		||||
        $message             = sprintf('Corrected amount in transaction journal #%d', $param);
 | 
			
		||||
        $this->friendlyInfo($message);
 | 
			
		||||
        ++$this->count;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function fixUnevenAmounts(): void
 | 
			
		||||
    {
 | 
			
		||||
        $journals = \DB::table('transactions')
 | 
			
		||||
            ->groupBy('transaction_journal_id')
 | 
			
		||||
            ->whereNull('deleted_at')
 | 
			
		||||
            ->get(['transaction_journal_id', \DB::raw('SUM(amount) AS the_sum')])
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
        /** @var \stdClass $entry */
 | 
			
		||||
        foreach ($journals as $entry) {
 | 
			
		||||
            $sum = (string) $entry->the_sum;
 | 
			
		||||
            if (!is_numeric($sum)
 | 
			
		||||
                || '' === $sum // @phpstan-ignore-line
 | 
			
		||||
                || str_contains($sum, 'e')
 | 
			
		||||
                || str_contains($sum, ',')) {
 | 
			
		||||
                $message = sprintf(
 | 
			
		||||
                    'Journal #%d has an invalid sum ("%s"). No sure what to do.',
 | 
			
		||||
                    $entry->transaction_journal_id,
 | 
			
		||||
                    $entry->the_sum
 | 
			
		||||
                );
 | 
			
		||||
                $this->friendlyWarning($message);
 | 
			
		||||
                app('log')->warning($message);
 | 
			
		||||
                ++$this->count;
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            $res = -1;
 | 
			
		||||
 | 
			
		||||
            try {
 | 
			
		||||
                $res = bccomp($sum, '0');
 | 
			
		||||
            } catch (\ValueError $e) {
 | 
			
		||||
                $this->friendlyError(sprintf('Could not bccomp("%s", "0").', $sum));
 | 
			
		||||
                Log::error($e->getMessage());
 | 
			
		||||
                Log::error($e->getTraceAsString());
 | 
			
		||||
            }
 | 
			
		||||
            if (0 !== $res) {
 | 
			
		||||
                $this->fixJournal($entry->transaction_journal_id);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (0 === $this->count) {
 | 
			
		||||
            $this->friendlyPositive('Database amount integrity is OK');
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function matchCurrencies(): void
 | 
			
		||||
    {
 | 
			
		||||
        $journals = TransactionJournal::leftJoin('transactions', 'transaction_journals.id', 'transactions.transaction_journal_id')
 | 
			
		||||
            ->where('transactions.transaction_currency_id', '!=', \DB::raw('transaction_journals.transaction_currency_id'))
 | 
			
		||||
            ->get(['transaction_journals.*'])
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
        $count    = 0;
 | 
			
		||||
 | 
			
		||||
        /** @var TransactionJournal $journal */
 | 
			
		||||
        foreach ($journals as $journal) {
 | 
			
		||||
            if (!$this->isForeignCurrencyTransfer($journal)) {
 | 
			
		||||
                Transaction::where('transaction_journal_id', $journal->id)->update(['transaction_currency_id' => $journal->transaction_currency_id]);
 | 
			
		||||
                ++$count;
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            Log::debug(sprintf('Can skip foreign currency transfer #%d.', $journal->id));
 | 
			
		||||
        }
 | 
			
		||||
        if (0 === $count) {
 | 
			
		||||
            $this->friendlyPositive('Journal currency integrity is OK');
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $this->friendlyPositive(sprintf('Fixed %d journal(s) with mismatched currencies.', $journals->count()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function isForeignCurrencyTransfer(TransactionJournal $journal): bool
 | 
			
		||||
    {
 | 
			
		||||
        if (TransactionType::TRANSFER !== $journal->transactionType->type) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /** @var Transaction $destination */
 | 
			
		||||
        $destination = $journal->transactions()->where('amount', '>', 0)->first();
 | 
			
		||||
 | 
			
		||||
        /** @var Transaction $source */
 | 
			
		||||
        $source      = $journal->transactions()->where('amount', '<', 0)->first();
 | 
			
		||||
 | 
			
		||||
        // safety catch on NULL should not be necessary, we just had that catch.
 | 
			
		||||
        // source amount = dest foreign amount
 | 
			
		||||
        // source currency = dest foreign currency
 | 
			
		||||
        // dest amount = source foreign currency
 | 
			
		||||
        // dest currency = source foreign currency
 | 
			
		||||
 | 
			
		||||
        //        Log::debug(sprintf('[a] %s', bccomp(app('steam')->positive($source->amount), app('steam')->positive($destination->foreign_amount))));
 | 
			
		||||
        //        Log::debug(sprintf('[b] %s', bccomp(app('steam')->positive($destination->amount), app('steam')->positive($source->foreign_amount))));
 | 
			
		||||
        //        Log::debug(sprintf('[c] %s', var_export($source->transaction_currency_id === $destination->foreign_currency_id,true)));
 | 
			
		||||
        //        Log::debug(sprintf('[d] %s', var_export((int) $destination->transaction_currency_id ===(int)  $source->foreign_currency_id, true)));
 | 
			
		||||
 | 
			
		||||
        if (0 === bccomp(app('steam')->positive($source->amount), app('steam')->positive($destination->foreign_amount))
 | 
			
		||||
            && $source->transaction_currency_id === $destination->foreign_currency_id
 | 
			
		||||
            && 0 === bccomp(app('steam')->positive($destination->amount), app('steam')->positive($source->foreign_amount))
 | 
			
		||||
            && (int) $destination->transaction_currency_id === (int) $source->foreign_currency_id
 | 
			
		||||
        ) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function convertOldStyleTransfers(): void
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug('convertOldStyleTransfers()');
 | 
			
		||||
        // select transactions with a foreign amount and a foreign currency. and it's a transfer. and they are different.
 | 
			
		||||
        $transactions = Transaction::distinct()
 | 
			
		||||
            ->whereNotNull('foreign_currency_id')
 | 
			
		||||
            ->whereNotNull('foreign_amount')->get(['transactions.transaction_journal_id'])
 | 
			
		||||
        ;
 | 
			
		||||
        $count        = 0;
 | 
			
		||||
 | 
			
		||||
        Log::debug(sprintf('Found %d potential journal(s)', $transactions->count()));
 | 
			
		||||
 | 
			
		||||
        /** @var Transaction $transaction */
 | 
			
		||||
        foreach ($transactions as $transaction) {
 | 
			
		||||
            /** @var null|TransactionJournal $journal */
 | 
			
		||||
            $journal     = TransactionJournal::find($transaction->transaction_journal_id);
 | 
			
		||||
            if (null === $journal) {
 | 
			
		||||
                Log::debug('Found no journal, continue.');
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            // needs to be a transfer.
 | 
			
		||||
            if (TransactionType::TRANSFER !== $journal->transactionType->type) {
 | 
			
		||||
                Log::debug('Must be a transfer, continue.');
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /** @var null|Transaction $destination */
 | 
			
		||||
            $destination = $journal->transactions()->where('amount', '>', 0)->first();
 | 
			
		||||
 | 
			
		||||
            /** @var null|Transaction $source */
 | 
			
		||||
            $source      = $journal->transactions()->where('amount', '<', 0)->first();
 | 
			
		||||
            if (null === $destination || null === $source) {
 | 
			
		||||
                Log::debug('Source or destination transaction is NULL, continue.');
 | 
			
		||||
 | 
			
		||||
                // will be picked up later.
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
            if ($source->transaction_currency_id === $destination->transaction_currency_id) {
 | 
			
		||||
                Log::debug('Ready to swap data between transactions.');
 | 
			
		||||
                $destination->foreign_currency_id     = $source->transaction_currency_id;
 | 
			
		||||
                $destination->foreign_amount          = app('steam')->positive($source->amount);
 | 
			
		||||
                $destination->transaction_currency_id = $source->foreign_currency_id;
 | 
			
		||||
                $destination->amount                  = app('steam')->positive($source->foreign_amount);
 | 
			
		||||
                $destination->balance_dirty           = true;
 | 
			
		||||
                $source->balance_dirty                = true;
 | 
			
		||||
                $destination->save();
 | 
			
		||||
                $source->save();
 | 
			
		||||
                $this->friendlyWarning(sprintf('Corrected foreign amounts of transfer #%d.', $journal->id));
 | 
			
		||||
                ++$count;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (0 === $count) {
 | 
			
		||||
            $this->friendlyPositive('No "old style" foreign currency transfers.');
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -115,7 +115,7 @@ class UpdateGroupInformation extends Command
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if (0 !== $result) {
 | 
			
		||||
            $this->friendlyPositive(sprintf('User #%d: Moved %d %s objects to the correct group.', $user->id, $result, str_replace('FireflyIII\\Models\\', '', $className)));
 | 
			
		||||
            $this->friendlyPositive(sprintf('User #%d: Moved %d %s objects to the correct group.', $user->id, $result, str_replace('FireflyIII\Models\\', '', $className)));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -111,7 +111,7 @@ class ForceDecimalSize extends Command
 | 
			
		||||
    {
 | 
			
		||||
        // switch stuff based on database connection:
 | 
			
		||||
        $this->operator          = 'REGEXP';
 | 
			
		||||
        $this->regularExpression = '\'\\\\.[\\\\d]{%d}[1-9]+\'';
 | 
			
		||||
        $this->regularExpression = '\'\\\.[\\\d]{%d}[1-9]+\'';
 | 
			
		||||
        $this->cast              = 'CHAR';
 | 
			
		||||
        if ('pgsql' === config('database.default')) {
 | 
			
		||||
            $this->operator          = 'SIMILAR TO';
 | 
			
		||||
@@ -119,7 +119,7 @@ class ForceDecimalSize extends Command
 | 
			
		||||
            $this->cast              = 'TEXT';
 | 
			
		||||
        }
 | 
			
		||||
        if ('sqlite' === config('database.default')) {
 | 
			
		||||
            $this->regularExpression = '"\\.[\d]{%d}[1-9]+"';
 | 
			
		||||
            $this->regularExpression = '"\.[\d]{%d}[1-9]+"';
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -307,7 +307,7 @@ class ForceDecimalSize extends Command
 | 
			
		||||
            /** @var string $field */
 | 
			
		||||
            foreach ($fields as $field) {
 | 
			
		||||
                $value   = $item->{$field};
 | 
			
		||||
                if (null === $value) {
 | 
			
		||||
                if (null === $value || '' === $value) {
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                // fix $field by rounding it down correctly.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										70
									
								
								app/Console/Commands/Upgrade/CorrectAccountBalance.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								app/Console/Commands/Upgrade/CorrectAccountBalance.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,70 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * CorrectAccountBalance.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Console\Commands\Upgrade;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
 | 
			
		||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
 | 
			
		||||
use Illuminate\Console\Command;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class CorrectionSkeleton
 | 
			
		||||
 */
 | 
			
		||||
class CorrectAccountBalance extends Command
 | 
			
		||||
{
 | 
			
		||||
    use ShowsFriendlyMessages;
 | 
			
		||||
    public const string CONFIG_NAME = '610_correct_balances';
 | 
			
		||||
    protected $description          = 'Recalculate all account balance amounts';
 | 
			
		||||
    protected $signature            = 'firefly-iii:correct-account-balance {--F|force : Force the execution of this command.}';
 | 
			
		||||
 | 
			
		||||
    public function handle(): int
 | 
			
		||||
    {
 | 
			
		||||
        if ($this->isExecuted() && true !== $this->option('force')) {
 | 
			
		||||
            $this->friendlyInfo('This command has already been executed.');
 | 
			
		||||
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        $this->friendlyWarning('This command has been disabled.');
 | 
			
		||||
        $this->markAsExecuted();
 | 
			
		||||
 | 
			
		||||
        //        $this->correctBalanceAmounts();
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function correctBalanceAmounts(): void
 | 
			
		||||
    {
 | 
			
		||||
        AccountBalanceCalculator::recalculateAll();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function isExecuted(): bool
 | 
			
		||||
    {
 | 
			
		||||
        $configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
 | 
			
		||||
 | 
			
		||||
        return (bool)$configVar?->data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function markAsExecuted(): void
 | 
			
		||||
    {
 | 
			
		||||
        app('fireflyconfig')->set(self::CONFIG_NAME, true);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -90,7 +90,7 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
    {
 | 
			
		||||
        $configVar = app('fireflyconfig')->get(self::CONFIG_NAME, false);
 | 
			
		||||
        if (null !== $configVar) {
 | 
			
		||||
            return (bool)$configVar->data;
 | 
			
		||||
            return (bool) $configVar->data;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
@@ -120,7 +120,7 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
        $this->journalRepos->setUser($journal->user);
 | 
			
		||||
        $this->cliRepos->setUser($journal->user);
 | 
			
		||||
 | 
			
		||||
        $leadTransaction                  = $this->getLeadTransaction($journal);
 | 
			
		||||
        $leadTransaction = $this->getLeadTransaction($journal);
 | 
			
		||||
 | 
			
		||||
        if (null === $leadTransaction) {
 | 
			
		||||
            $this->friendlyError(sprintf('Could not reliably determine which transaction is in the lead for transaction journal #%d.', $journal->id));
 | 
			
		||||
@@ -128,8 +128,9 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $account                          = $leadTransaction->account;
 | 
			
		||||
        $currency                         = $this->getCurrency($account);
 | 
			
		||||
        $account         = $leadTransaction->account;
 | 
			
		||||
        $currency        = $this->getCurrency($account);
 | 
			
		||||
        $isMultiCurrency = $this->isMultiCurrency($account);
 | 
			
		||||
        if (null === $currency) {
 | 
			
		||||
            $this->friendlyError(
 | 
			
		||||
                sprintf(
 | 
			
		||||
@@ -145,14 +146,14 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
        }
 | 
			
		||||
        // fix each transaction:
 | 
			
		||||
        $journal->transactions->each(
 | 
			
		||||
            static function (Transaction $transaction) use ($currency): void {
 | 
			
		||||
            static function (Transaction $transaction) use ($currency, $isMultiCurrency): void {
 | 
			
		||||
                if (null === $transaction->transaction_currency_id) {
 | 
			
		||||
                    $transaction->transaction_currency_id = $currency->id;
 | 
			
		||||
                    $transaction->save();
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // when mismatch in transaction:
 | 
			
		||||
                if ($transaction->transaction_currency_id !== $currency->id) {
 | 
			
		||||
                if ($transaction->transaction_currency_id !== $currency->id && !$isMultiCurrency) {
 | 
			
		||||
                    $transaction->foreign_currency_id     = $transaction->transaction_currency_id;
 | 
			
		||||
                    $transaction->foreign_amount          = $transaction->amount;
 | 
			
		||||
                    $transaction->transaction_currency_id = $currency->id;
 | 
			
		||||
@@ -161,7 +162,9 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
            }
 | 
			
		||||
        );
 | 
			
		||||
        // also update the journal, of course:
 | 
			
		||||
        $journal->transaction_currency_id = $currency->id;
 | 
			
		||||
        if (!$isMultiCurrency) {
 | 
			
		||||
            $journal->transaction_currency_id = $currency->id;
 | 
			
		||||
        }
 | 
			
		||||
        ++$this->count;
 | 
			
		||||
        $journal->save();
 | 
			
		||||
    }
 | 
			
		||||
@@ -239,4 +242,14 @@ class OtherCurrenciesCorrections extends Command
 | 
			
		||||
    {
 | 
			
		||||
        app('fireflyconfig')->set(self::CONFIG_NAME, true);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function isMultiCurrency(Account $account): bool
 | 
			
		||||
    {
 | 
			
		||||
        $value = $this->accountRepos->getMetaValue($account, 'is_multi_currency', false);
 | 
			
		||||
        if (false === $value || null === $value) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return '1' === $value;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -65,6 +65,7 @@ class UpgradeDatabase extends Command
 | 
			
		||||
            'firefly-iii:budget-limit-periods',
 | 
			
		||||
            'firefly-iii:migrate-rule-actions',
 | 
			
		||||
            'firefly-iii:restore-oauth-keys',
 | 
			
		||||
            'firefly-iii:correct-account-balance',
 | 
			
		||||
            // also just in case, some integrity commands:
 | 
			
		||||
            'firefly-iii:create-group-memberships',
 | 
			
		||||
            'firefly-iii:upgrade-group-information',
 | 
			
		||||
 
 | 
			
		||||
@@ -37,6 +37,7 @@ use Illuminate\Support\Arr;
 | 
			
		||||
use Illuminate\Validation\ValidationException as LaravelValidationException;
 | 
			
		||||
use Laravel\Passport\Exceptions\OAuthServerException as LaravelOAuthException;
 | 
			
		||||
use LaravelJsonApi\Core\Exceptions\JsonApiException;
 | 
			
		||||
use LaravelJsonApi\Exceptions\ExceptionParser;
 | 
			
		||||
use League\OAuth2\Server\Exception\OAuthServerException;
 | 
			
		||||
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
 | 
			
		||||
use Symfony\Component\HttpFoundation\Response;
 | 
			
		||||
@@ -67,6 +68,16 @@ class Handler extends ExceptionHandler
 | 
			
		||||
            JsonApiException::class,
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Register the exception handling callbacks for the application.
 | 
			
		||||
     */
 | 
			
		||||
    public function register(): void
 | 
			
		||||
    {
 | 
			
		||||
        $this->renderable(
 | 
			
		||||
            ExceptionParser::make()->renderable()
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Render an exception into an HTTP response. It's complex but lucky for us, we never use it because
 | 
			
		||||
     * Firefly III never crashes.
 | 
			
		||||
@@ -81,15 +92,23 @@ class Handler extends ExceptionHandler
 | 
			
		||||
    public function render($request, \Throwable $e): Response
 | 
			
		||||
    {
 | 
			
		||||
        $expectsJson = $request->expectsJson();
 | 
			
		||||
        // if the user requests anything /api/, assume the user wants to see JSON.
 | 
			
		||||
        if (str_starts_with($request->getRequestUri(), '/api/')) {
 | 
			
		||||
            app('log')->debug('API endpoint, always assume user wants JSON.');
 | 
			
		||||
            $expectsJson = true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        app('log')->debug('Now in Handler::render()');
 | 
			
		||||
 | 
			
		||||
        if ($e instanceof JsonApiException) {
 | 
			
		||||
            // ignore it: controller will handle it.
 | 
			
		||||
 | 
			
		||||
            app('log')->debug(sprintf(
 | 
			
		||||
                'Return to parent to handle JsonApiException(%d)',
 | 
			
		||||
                $e->getCode()
 | 
			
		||||
            ));
 | 
			
		||||
 | 
			
		||||
            return parent::render($request, $e);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ($e instanceof LaravelValidationException && $expectsJson) {
 | 
			
		||||
            // ignore it: controller will handle it.
 | 
			
		||||
 | 
			
		||||
            app('log')->debug(sprintf('Return to parent to handle LaravelValidationException(%d)', $e->status));
 | 
			
		||||
 | 
			
		||||
            return parent::render($request, $e);
 | 
			
		||||
 
 | 
			
		||||
@@ -43,7 +43,7 @@ class AttachmentFactory
 | 
			
		||||
    public function create(array $data): ?Attachment
 | 
			
		||||
    {
 | 
			
		||||
        // append if necessary.
 | 
			
		||||
        $model      = !str_contains($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\\Models\\%s', $data['attachable_type'])
 | 
			
		||||
        $model      = !str_contains($data['attachable_type'], 'FireflyIII') ? sprintf('FireflyIII\Models\%s', $data['attachable_type'])
 | 
			
		||||
            : $data['attachable_type'];
 | 
			
		||||
 | 
			
		||||
        // get journal instead of transaction.
 | 
			
		||||
 
 | 
			
		||||
@@ -47,6 +47,7 @@ use FireflyIII\Support\NullArrayObject;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use FireflyIII\Validation\AccountValidator;
 | 
			
		||||
use Illuminate\Support\Collection;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class TransactionJournalFactory
 | 
			
		||||
@@ -261,8 +262,24 @@ class TransactionJournalFactory
 | 
			
		||||
        $transactionFactory->setForeignCurrency($foreignCurrency);
 | 
			
		||||
        $transactionFactory->setReconciled($row['reconciled'] ?? false);
 | 
			
		||||
 | 
			
		||||
        // if the foreign currency is set and is different, and the transaction type is a transfer,
 | 
			
		||||
        // Firefly III will save the foreign currency information in such a way that both
 | 
			
		||||
        // asset accounts can look at the "amount" and "transaction_currency_id" column and
 | 
			
		||||
        // see the currency they expect to see.
 | 
			
		||||
        $amount                = (string)$row['amount'];
 | 
			
		||||
        $foreignAmount         = (string)$row['foreign_amount'];
 | 
			
		||||
        if (null !== $foreignCurrency && $foreignCurrency->id !== $currency->id
 | 
			
		||||
        && TransactionType::TRANSFER === $type->type
 | 
			
		||||
        ) {
 | 
			
		||||
            $transactionFactory->setCurrency($foreignCurrency);
 | 
			
		||||
            $transactionFactory->setForeignCurrency($currency);
 | 
			
		||||
            $amount        = (string)$row['foreign_amount'];
 | 
			
		||||
            $foreignAmount = (string)$row['amount'];
 | 
			
		||||
            Log::debug('Swap native/foreign amounts in transfer for new save method.');
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            $transactionFactory->createPositive((string)$row['amount'], (string)$row['foreign_amount']);
 | 
			
		||||
            $transactionFactory->createPositive($amount, $foreignAmount);
 | 
			
		||||
        } catch (FireflyException $e) {
 | 
			
		||||
            app('log')->error(sprintf('Exception creating positive transaction: %s', $e->getMessage()));
 | 
			
		||||
            $this->forceTrDelete($negative);
 | 
			
		||||
 
 | 
			
		||||
@@ -25,6 +25,7 @@ namespace FireflyIII\Handlers\Observer;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Transaction;
 | 
			
		||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class TransactionObserver
 | 
			
		||||
@@ -39,13 +40,19 @@ class TransactionObserver
 | 
			
		||||
 | 
			
		||||
    public function updated(Transaction $transaction): void
 | 
			
		||||
    {
 | 
			
		||||
        app('log')->debug('Observe "updated" of a transaction.');
 | 
			
		||||
        AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
 | 
			
		||||
        Log::debug('Observe "updated" of a transaction.');
 | 
			
		||||
        if (1 === bccomp($transaction->amount, '0')) {
 | 
			
		||||
            Log::debug('Trigger recalculateForJournal');
 | 
			
		||||
            AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function created(Transaction $transaction): void
 | 
			
		||||
    {
 | 
			
		||||
        app('log')->debug('Observe "created" of a transaction.');
 | 
			
		||||
        AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
 | 
			
		||||
        Log::debug('Observe "created" of a transaction.');
 | 
			
		||||
        if (1 === bccomp($transaction->amount, '0')) {
 | 
			
		||||
            Log::debug('Trigger recalculateForJournal');
 | 
			
		||||
            AccountBalanceCalculator::recalculateForJournal($transaction->transactionJournal);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -717,7 +717,7 @@ trait MetaCollection
 | 
			
		||||
 | 
			
		||||
        $this->joinMetaDataTables();
 | 
			
		||||
        $this->query->where('journal_meta.name', '=', 'internal_reference');
 | 
			
		||||
        $this->query->where('journal_meta.data', 'LIKE', sprintf('%%%s%%', $internalReference));
 | 
			
		||||
        $this->query->where('journal_meta.data', '=', sprintf('%s', json_encode($internalReference)));
 | 
			
		||||
 | 
			
		||||
        return $this;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -805,7 +805,7 @@ class GroupCollector implements GroupCollectorInterface
 | 
			
		||||
                    return 'zzz';
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                exit('here we are');
 | 
			
		||||
                exit('here we are 2');
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Http\Controllers\Api\V3\Controllers;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Http\Controllers\Controller;
 | 
			
		||||
use FireflyIII\JsonApi\V3\AccountBalances\AccountBalanceSchema;
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use Illuminate\Contracts\Support\Responsable;
 | 
			
		||||
use LaravelJsonApi\Core\Facades\JsonApi;
 | 
			
		||||
use LaravelJsonApi\Core\Responses\DataResponse;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Controllers\Actions;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Requests\AnonymousQuery;
 | 
			
		||||
 | 
			
		||||
class AccountController extends Controller
 | 
			
		||||
{
 | 
			
		||||
    use Actions\AttachRelationship;
 | 
			
		||||
    use Actions\Destroy;
 | 
			
		||||
    use Actions\DetachRelationship;
 | 
			
		||||
    use Actions\FetchMany;
 | 
			
		||||
    use Actions\FetchOne;
 | 
			
		||||
    use Actions\FetchRelated;
 | 
			
		||||
    use Actions\FetchRelationship;
 | 
			
		||||
    use Actions\Store;
 | 
			
		||||
    use Actions\Update;
 | 
			
		||||
    use Actions\UpdateRelationship;
 | 
			
		||||
 | 
			
		||||
    public function readAccountBalances(AnonymousQuery $query, AccountBalanceSchema $schema, Account $account): Responsable
 | 
			
		||||
    {
 | 
			
		||||
        $schema = JsonApi::server()->schemas()->schemaFor('account-balances');
 | 
			
		||||
 | 
			
		||||
        $models = $schema
 | 
			
		||||
            ->repository()
 | 
			
		||||
            ->queryAll()
 | 
			
		||||
            ->withRequest($query)
 | 
			
		||||
            ->withAccount($account)
 | 
			
		||||
            ->get()
 | 
			
		||||
        ;
 | 
			
		||||
 | 
			
		||||
        return DataResponse::make($models);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -121,7 +121,7 @@ class LoginController extends Controller
 | 
			
		||||
 | 
			
		||||
        // Copied directly from AuthenticatesUsers, but with logging added:
 | 
			
		||||
        // If the login attempt was unsuccessful we will increment the number of attempts
 | 
			
		||||
        // to login and redirect the user back to the login form. Of course, when this
 | 
			
		||||
        // to log in and redirect the user back to the login form. Of course, when this
 | 
			
		||||
        // user surpasses their maximum number of attempts they will get locked out.
 | 
			
		||||
        $this->incrementLoginAttempts($request);
 | 
			
		||||
        Log::channel('audit')->warning(sprintf('Login failed. Attempt for user "%s" failed.', $request->get($this->username())));
 | 
			
		||||
@@ -233,7 +233,7 @@ class LoginController extends Controller
 | 
			
		||||
        $storeInCookie     = config('google2fa.store_in_cookie', false);
 | 
			
		||||
        if (false !== $storeInCookie) {
 | 
			
		||||
            $cookieName = config('google2fa.cookie_name', 'google2fa_token');
 | 
			
		||||
            request()->cookies->set($cookieName, 'invalid');
 | 
			
		||||
            \Cookie::queue(\Cookie::make($cookieName, 'invalid-'.time()));
 | 
			
		||||
        }
 | 
			
		||||
        $usernameField     = $this->username();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -185,7 +185,7 @@ class BudgetLimitController extends Controller
 | 
			
		||||
            $array['amount_formatted']       = app('amount')->formatAnything($limit->transactionCurrency, $limit['amount']);
 | 
			
		||||
            $array['days_left']              = (string)$this->activeDaysLeft($start, $end);
 | 
			
		||||
            // left per day:
 | 
			
		||||
            $array['left_per_day']           = bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
 | 
			
		||||
            $array['left_per_day']           = 0 === bccomp('0', $array['days_left']) ? bcadd($array['spent'], $array['amount']) : bcdiv(bcadd($array['spent'], $array['amount']), $array['days_left']);
 | 
			
		||||
 | 
			
		||||
            // left per day formatted.
 | 
			
		||||
            $array['left_per_day_formatted'] = app('amount')->formatAnything($limit->transactionCurrency, $array['left_per_day']);
 | 
			
		||||
 
 | 
			
		||||
@@ -30,6 +30,7 @@ use FireflyIII\Http\Middleware\IsDemoUser;
 | 
			
		||||
use FireflyIII\Models\AccountType;
 | 
			
		||||
use FireflyIII\Models\TransactionType;
 | 
			
		||||
use FireflyIII\Support\Http\Controllers\GetConfigurationData;
 | 
			
		||||
use FireflyIII\Support\Models\AccountBalanceCalculator;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Contracts\View\Factory;
 | 
			
		||||
use Illuminate\Http\RedirectResponse;
 | 
			
		||||
@@ -93,8 +94,8 @@ class DebugController extends Controller
 | 
			
		||||
        Artisan::call('view:clear');
 | 
			
		||||
 | 
			
		||||
        // also do some recalculations.
 | 
			
		||||
        Artisan::call('firefly-iii:correct-account-balance');
 | 
			
		||||
        Artisan::call('firefly-iii:trigger-credit-recalculation');
 | 
			
		||||
        AccountBalanceCalculator::forceRecalculateAll();
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            Artisan::call('twig:clean');
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ class HomeController extends Controller
 | 
			
		||||
        $stringEnd     = '';
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            $stringStart = e((string)$request->get('start'));
 | 
			
		||||
            $stringStart = e((string) $request->get('start'));
 | 
			
		||||
            $start       = Carbon::createFromFormat('Y-m-d', $stringStart);
 | 
			
		||||
        } catch (InvalidFormatException $e) {
 | 
			
		||||
            app('log')->error(sprintf('Start: could not parse date string "%s" so ignore it.', $stringStart));
 | 
			
		||||
@@ -73,7 +73,7 @@ class HomeController extends Controller
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            $stringEnd = e((string)$request->get('end'));
 | 
			
		||||
            $stringEnd = e((string) $request->get('end'));
 | 
			
		||||
            $end       = Carbon::createFromFormat('Y-m-d', $stringEnd);
 | 
			
		||||
        } catch (InvalidFormatException $e) {
 | 
			
		||||
            app('log')->error(sprintf('End could not parse date string "%s" so ignore it.', $stringEnd));
 | 
			
		||||
@@ -92,7 +92,7 @@ class HomeController extends Controller
 | 
			
		||||
        app('log')->debug('dateRange: Received dateRange', ['start' => $stringStart, 'end' => $stringEnd, 'label' => $request->get('label')]);
 | 
			
		||||
        // check if the label is "everything" or "Custom range" which will betray
 | 
			
		||||
        // a possible problem with the budgets.
 | 
			
		||||
        if ($label === (string)trans('firefly.everything') || $label === (string)trans('firefly.customRange')) {
 | 
			
		||||
        if ($label === (string) trans('firefly.everything') || $label === (string) trans('firefly.customRange')) {
 | 
			
		||||
            $isCustomRange = true;
 | 
			
		||||
            app('log')->debug('Range is now marked as "custom".');
 | 
			
		||||
        }
 | 
			
		||||
@@ -100,7 +100,7 @@ class HomeController extends Controller
 | 
			
		||||
        $diff          = $start->diffInDays($end, true) + 1;
 | 
			
		||||
 | 
			
		||||
        if ($diff > 366) {
 | 
			
		||||
            $request->session()->flash('warning', (string)trans('firefly.warning_much_data', ['days' => (int)$diff]));
 | 
			
		||||
            $request->session()->flash('warning', (string) trans('firefly.warning_much_data', ['days' => (int) $diff]));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $request->session()->put('is_custom_range', $isCustomRange);
 | 
			
		||||
@@ -128,10 +128,10 @@ class HomeController extends Controller
 | 
			
		||||
            return redirect(route('new-user.index'));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if ('v1' === (string)config('view.layout')) {
 | 
			
		||||
        if ('v1' === (string) config('view.layout')) {
 | 
			
		||||
            return $this->indexV1($repository);
 | 
			
		||||
        }
 | 
			
		||||
        if ('v2' === (string)config('view.layout')) {
 | 
			
		||||
        if ('v2' === (string) config('view.layout')) {
 | 
			
		||||
            return $this->indexV2();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -141,8 +141,9 @@ class HomeController extends Controller
 | 
			
		||||
    private function indexV1(AccountRepositoryInterface $repository): mixed
 | 
			
		||||
    {
 | 
			
		||||
        $types          = config('firefly.accountTypesByIdentifier.asset');
 | 
			
		||||
        $pageTitle      = (string) trans('firefly.main_dashboard_page_title');
 | 
			
		||||
        $count          = $repository->count($types);
 | 
			
		||||
        $subTitle       = (string)trans('firefly.welcome_back');
 | 
			
		||||
        $subTitle       = (string) trans('firefly.welcome_back');
 | 
			
		||||
        $transactions   = [];
 | 
			
		||||
        $frontpage      = app('preferences')->getFresh('frontpageAccounts', $repository->getAccountsByType([AccountType::ASSET])->pluck('id')->toArray());
 | 
			
		||||
        $frontpageArray = $frontpage->data;
 | 
			
		||||
@@ -177,20 +178,21 @@ class HomeController extends Controller
 | 
			
		||||
        $user           = auth()->user();
 | 
			
		||||
        event(new RequestedVersionCheckStatus($user));
 | 
			
		||||
 | 
			
		||||
        return view('index', compact('count', 'subTitle', 'transactions', 'billCount', 'start', 'end', 'today'));
 | 
			
		||||
        return view('index', compact('count', 'subTitle', 'transactions', 'billCount', 'start', 'end', 'today', 'pageTitle'));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private function indexV2(): mixed
 | 
			
		||||
    {
 | 
			
		||||
        $subTitle = (string)trans('firefly.welcome_back');
 | 
			
		||||
        $subTitle  = (string) trans('firefly.welcome_back');
 | 
			
		||||
        $pageTitle = (string) trans('firefly.main_dashboard_page_title');
 | 
			
		||||
 | 
			
		||||
        $start    = session('start', today(config('app.timezone'))->startOfMonth());
 | 
			
		||||
        $end      = session('end', today(config('app.timezone'))->endOfMonth());
 | 
			
		||||
        $start     = session('start', today(config('app.timezone'))->startOfMonth());
 | 
			
		||||
        $end       = session('end', today(config('app.timezone'))->endOfMonth());
 | 
			
		||||
 | 
			
		||||
        /** @var User $user */
 | 
			
		||||
        $user     = auth()->user();
 | 
			
		||||
        $user      = auth()->user();
 | 
			
		||||
        event(new RequestedVersionCheckStatus($user));
 | 
			
		||||
 | 
			
		||||
        return view('index', compact('subTitle', 'start', 'end'));
 | 
			
		||||
        return view('index', compact('subTitle', 'start', 'end', 'pageTitle'));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -81,6 +81,8 @@ class ReconcileController extends Controller
 | 
			
		||||
        if ($end->lt($start)) {
 | 
			
		||||
            [$start, $end] = [$end, $start];
 | 
			
		||||
        }
 | 
			
		||||
        $end->endOfDay();
 | 
			
		||||
        $start->startOfDay();
 | 
			
		||||
 | 
			
		||||
        $route           = route('accounts.reconcile.submit', [$account->id, $start->format('Ymd'), $end->format('Ymd')]);
 | 
			
		||||
        $selectedIds     = $request->get('journals') ?? [];
 | 
			
		||||
 
 | 
			
		||||
@@ -81,7 +81,12 @@ class RecurrenceController extends Controller
 | 
			
		||||
        $skip                          = $skip < 0 || $skip > 31 ? 0 : $skip;
 | 
			
		||||
        $weekend                       = $weekend < 1 || $weekend > 4 ? 1 : $weekend;
 | 
			
		||||
 | 
			
		||||
        if (null === $start || null === $end || null === $firstDate || null === $endDate) {
 | 
			
		||||
        if (null === $endDate) {
 | 
			
		||||
            // safety catch:
 | 
			
		||||
            $endDate = now()->addYear();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (null === $start || null === $end || null === $firstDate) {
 | 
			
		||||
            return response()->json();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@ class PreferencesController extends Controller
 | 
			
		||||
        // list of locales also has "equal" which makes it equal to whatever the language is.
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            $locales = json_decode((string)file_get_contents(resource_path(sprintf('lang/%s/locales.json', $language))), true, 512, JSON_THROW_ON_ERROR);
 | 
			
		||||
            $locales = json_decode((string)file_get_contents(resource_path(sprintf('locales/%s/locales.json', $language))), true, 512, JSON_THROW_ON_ERROR);
 | 
			
		||||
        } catch (\JsonException $e) {
 | 
			
		||||
            app('log')->error($e->getMessage());
 | 
			
		||||
            $locales = [];
 | 
			
		||||
 
 | 
			
		||||
@@ -84,6 +84,7 @@ class ShowController extends Controller
 | 
			
		||||
        $transformer->setParameters(new ParameterBag());
 | 
			
		||||
 | 
			
		||||
        $array                 = $transformer->transform($recurrence);
 | 
			
		||||
 | 
			
		||||
        $groups                = $this->recurring->getTransactions($recurrence);
 | 
			
		||||
        $today                 = today(config('app.timezone'));
 | 
			
		||||
        $array['repeat_until'] = null !== $array['repeat_until'] ? new Carbon($array['repeat_until']) : null;
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,6 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Http\Controllers\Transaction;
 | 
			
		||||
 | 
			
		||||
use Exception;
 | 
			
		||||
use FireflyIII\Events\UpdatedTransactionGroup;
 | 
			
		||||
use FireflyIII\Exceptions\FireflyException;
 | 
			
		||||
use FireflyIII\Http\Controllers\Controller;
 | 
			
		||||
@@ -65,7 +64,7 @@ class ConvertController extends Controller
 | 
			
		||||
        $this->middleware(
 | 
			
		||||
            function ($request, $next) {
 | 
			
		||||
                $this->accountRepository = app(AccountRepositoryInterface::class);
 | 
			
		||||
                app('view')->share('title', (string)trans('firefly.transactions'));
 | 
			
		||||
                app('view')->share('title', (string) trans('firefly.transactions'));
 | 
			
		||||
                app('view')->share('mainTitleIcon', 'fa-exchange');
 | 
			
		||||
 | 
			
		||||
                return $next($request);
 | 
			
		||||
@@ -95,7 +94,7 @@ class ConvertController extends Controller
 | 
			
		||||
 | 
			
		||||
        $groupTitle           = $group->title ?? $first->description;
 | 
			
		||||
        $groupArray           = $transformer->transformObject($group);
 | 
			
		||||
        $subTitle             = (string)trans('firefly.convert_to_'.$destinationType->type, ['description' => $groupTitle]);
 | 
			
		||||
        $subTitle             = (string) trans('firefly.convert_to_'.$destinationType->type, ['description' => $groupTitle]);
 | 
			
		||||
        $subTitleIcon         = 'fa-exchange';
 | 
			
		||||
 | 
			
		||||
        // get a list of asset accounts and liabilities and stuff, in various combinations:
 | 
			
		||||
@@ -111,7 +110,7 @@ class ConvertController extends Controller
 | 
			
		||||
 | 
			
		||||
        if ($sourceType->type === $destinationType->type) { // cannot convert to its own type.
 | 
			
		||||
            app('log')->debug('This is already a transaction of the expected type..');
 | 
			
		||||
            session()->flash('info', (string)trans('firefly.convert_is_already_type_'.$destinationType->type));
 | 
			
		||||
            session()->flash('info', (string) trans('firefly.convert_is_already_type_'.$destinationType->type));
 | 
			
		||||
 | 
			
		||||
            return redirect(route('transactions.show', [$group->id]));
 | 
			
		||||
        }
 | 
			
		||||
@@ -147,7 +146,7 @@ class ConvertController extends Controller
 | 
			
		||||
        // group accounts:
 | 
			
		||||
        /** @var Account $account */
 | 
			
		||||
        foreach ($accountList as $account) {
 | 
			
		||||
            $role                        = (string)$this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            $role                        = (string) $this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            $name                        = $account->name;
 | 
			
		||||
            if ('' === $role) {
 | 
			
		||||
                $role = 'no_account_type';
 | 
			
		||||
@@ -165,7 +164,7 @@ class ConvertController extends Controller
 | 
			
		||||
                $role = 'revenue_account';
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $key                         = (string)trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $key                         = (string) trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $grouped[$key][$account->id] = $name;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -184,7 +183,7 @@ class ConvertController extends Controller
 | 
			
		||||
        // group accounts:
 | 
			
		||||
        /** @var Account $account */
 | 
			
		||||
        foreach ($accountList as $account) {
 | 
			
		||||
            $role                        = (string)$this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            $role                        = (string) $this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            $name                        = $account->name;
 | 
			
		||||
            if ('' === $role) {
 | 
			
		||||
                $role = 'no_account_type';
 | 
			
		||||
@@ -202,7 +201,7 @@ class ConvertController extends Controller
 | 
			
		||||
                $role = 'expense_account';
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $key                         = (string)trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $key                         = (string) trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $grouped[$key][$account->id] = $name;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -225,7 +224,7 @@ class ConvertController extends Controller
 | 
			
		||||
            $balance                     = app('steam')->balance($account, today());
 | 
			
		||||
            $currency                    = $this->accountRepository->getAccountCurrency($account) ?? $defaultCurrency;
 | 
			
		||||
            $role                        = 'l_'.$account->accountType->type;
 | 
			
		||||
            $key                         = (string)trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $key                         = (string) trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $grouped[$key][$account->id] = $account->name.' ('.app('amount')->formatAnything($currency, $balance, false).')';
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -247,12 +246,12 @@ class ConvertController extends Controller
 | 
			
		||||
        foreach ($accountList as $account) {
 | 
			
		||||
            $balance                     = app('steam')->balance($account, today());
 | 
			
		||||
            $currency                    = $this->accountRepository->getAccountCurrency($account) ?? $defaultCurrency;
 | 
			
		||||
            $role                        = (string)$this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            $role                        = (string) $this->accountRepository->getMetaValue($account, 'account_role');
 | 
			
		||||
            if ('' === $role) {
 | 
			
		||||
                $role = 'no_account_type';
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $key                         = (string)trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $key                         = (string) trans('firefly.opt_group_'.$role);
 | 
			
		||||
            $grouped[$key][$account->id] = $account->name.' ('.app('amount')->formatAnything($currency, $balance, false).')';
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
@@ -285,7 +284,7 @@ class ConvertController extends Controller
 | 
			
		||||
        // correct transfers:
 | 
			
		||||
        $group->refresh();
 | 
			
		||||
 | 
			
		||||
        session()->flash('success', (string)trans('firefly.converted_to_'.$destinationType->type));
 | 
			
		||||
        session()->flash('success', (string) trans('firefly.converted_to_'.$destinationType->type));
 | 
			
		||||
        event(new UpdatedTransactionGroup($group, true, true));
 | 
			
		||||
 | 
			
		||||
        return redirect(route('transactions.show', [$group->id]));
 | 
			
		||||
@@ -306,11 +305,11 @@ class ConvertController extends Controller
 | 
			
		||||
        $destinationId    = $data['destination_id'][$journal->id] ?? null;
 | 
			
		||||
        $destinationName  = $data['destination_name'][$journal->id] ?? null;
 | 
			
		||||
 | 
			
		||||
        // double check its not an empty string.
 | 
			
		||||
        $sourceId         = '' === $sourceId || null === $sourceId ? null : (int)$sourceId;
 | 
			
		||||
        $sourceName       = '' === $sourceName ? null : (string)$sourceName;
 | 
			
		||||
        $destinationId    = '' === $destinationId || null === $destinationId ? null : (int)$destinationId;
 | 
			
		||||
        $destinationName  = '' === $destinationName ? null : (string)$destinationName;
 | 
			
		||||
        // double check it's not an empty string.
 | 
			
		||||
        $sourceId         = '' === $sourceId || null === $sourceId ? null : (int) $sourceId;
 | 
			
		||||
        $sourceName       = '' === $sourceName ? null : (string) $sourceName;
 | 
			
		||||
        $destinationId    = '' === $destinationId || null === $destinationId ? null : (int) $destinationId;
 | 
			
		||||
        $destinationName  = '' === $destinationName ? null : (string) $destinationName;
 | 
			
		||||
        $validSource      = $validator->validateSource(['id' => $sourceId, 'name' => $sourceName]);
 | 
			
		||||
        $validDestination = $validator->validateDestination(['id' => $destinationId, 'name' => $destinationName]);
 | 
			
		||||
 | 
			
		||||
@@ -331,6 +330,19 @@ class ConvertController extends Controller
 | 
			
		||||
            'type'             => $transactionType->type,
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
        // also set the currency to the currency of the source account, in case you're converting a deposit into a transfer.
 | 
			
		||||
        if (TransactionType::TRANSFER === $transactionType->type && TransactionType::DEPOSIT === $journal->transactionType->type) {
 | 
			
		||||
            $source         = $this->accountRepository->find((int) $sourceId);
 | 
			
		||||
            $sourceCurrency = $this->accountRepository->getAccountCurrency($source);
 | 
			
		||||
            $dest           = $this->accountRepository->find((int) $destinationId);
 | 
			
		||||
            $destCurrency   = $this->accountRepository->getAccountCurrency($dest);
 | 
			
		||||
            if (null !== $sourceCurrency && null !== $destCurrency && $sourceCurrency->code !== $destCurrency->code) {
 | 
			
		||||
                $update['currency_id']         = $sourceCurrency->id;
 | 
			
		||||
                $update['foreign_currency_id'] = $destCurrency->id;
 | 
			
		||||
                $update['foreign_amount']      = '1'; // not the best solution but at this point the amount is hard to get.
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /** @var JournalUpdateService $service */
 | 
			
		||||
        $service          = app(JournalUpdateService::class);
 | 
			
		||||
        $service->setTransactionJournal($journal);
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,7 @@ use Carbon\Carbon;
 | 
			
		||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
 | 
			
		||||
use FireflyIII\Support\Http\Controllers\RequestInformation;
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class SessionFilter.
 | 
			
		||||
@@ -63,6 +64,7 @@ class Range
 | 
			
		||||
    {
 | 
			
		||||
        // ignore preference. set the range to be the current month:
 | 
			
		||||
        if (!app('session')->has('start') && !app('session')->has('end')) {
 | 
			
		||||
            Log::debug('setRange: Session has no start or end.');
 | 
			
		||||
            $viewRange = app('preferences')->get('viewRange', '1M')->data;
 | 
			
		||||
            if (is_array($viewRange)) {
 | 
			
		||||
                $viewRange = '1M';
 | 
			
		||||
@@ -76,6 +78,8 @@ class Range
 | 
			
		||||
            app('session')->put('end', $end);
 | 
			
		||||
        }
 | 
			
		||||
        if (!app('session')->has('first')) {
 | 
			
		||||
            Log::debug('setRange: Session has no "first".');
 | 
			
		||||
 | 
			
		||||
            /** @var JournalRepositoryInterface $repository */
 | 
			
		||||
            $repository = app(JournalRepositoryInterface::class);
 | 
			
		||||
            $journal    = $repository->firstNull();
 | 
			
		||||
 
 | 
			
		||||
@@ -28,4 +28,9 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
 | 
			
		||||
/**
 | 
			
		||||
 * Class VerifyCsrfToken.
 | 
			
		||||
 */
 | 
			
		||||
class VerifyCsrfToken extends Middleware {}
 | 
			
		||||
class VerifyCsrfToken extends Middleware
 | 
			
		||||
{
 | 
			
		||||
    protected $except = [
 | 
			
		||||
        'oauth/token',
 | 
			
		||||
    ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -361,11 +361,17 @@ class CreateRecurringTransactions implements ShouldQueue
 | 
			
		||||
        // create transaction array and send to factory.
 | 
			
		||||
        $groupTitle              = null;
 | 
			
		||||
        $count                   = $recurrence->recurrenceTransactions->count();
 | 
			
		||||
        if ($count > 1) {
 | 
			
		||||
        // #8844, if there is one recurrence transaction, use the first title as the title.
 | 
			
		||||
        if (1 === $count) {
 | 
			
		||||
            /** @var RecurrenceTransaction $first */
 | 
			
		||||
            $first      = $recurrence->recurrenceTransactions()->first();
 | 
			
		||||
            $groupTitle = $first->description;
 | 
			
		||||
        }
 | 
			
		||||
        // #8844, if there are more, use the recurrence transaction itself.
 | 
			
		||||
        if ($count > 1) {
 | 
			
		||||
            $groupTitle = $recurrence->title;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (0 === $count) {
 | 
			
		||||
            app('log')->error('No transactions to be created in this recurrence. Cannot continue.');
 | 
			
		||||
 | 
			
		||||
@@ -411,12 +417,12 @@ class CreateRecurringTransactions implements ShouldQueue
 | 
			
		||||
        /** @var RecurrenceTransaction $transaction */
 | 
			
		||||
        foreach ($transactions as $index => $transaction) {
 | 
			
		||||
            $single   = [
 | 
			
		||||
                'type'                  => null === $first->transactionType ? strtolower($recurrence->transactionType->type) : strtolower($first->transactionType->type),
 | 
			
		||||
                'type'                  => null === $transaction?->transactionType?->type ? strtolower($recurrence->transactionType->type) : strtolower($transaction->transactionType->type),
 | 
			
		||||
                'date'                  => $date,
 | 
			
		||||
                'user'                  => $recurrence->user_id,
 | 
			
		||||
                'currency_id'           => $transaction->transaction_currency_id,
 | 
			
		||||
                'currency_code'         => null,
 | 
			
		||||
                'description'           => $first->description,
 | 
			
		||||
                'description'           => $transaction->description,
 | 
			
		||||
                'amount'                => $transaction->amount,
 | 
			
		||||
                'budget_id'             => $this->repository->getBudget($transaction),
 | 
			
		||||
                'budget_name'           => null,
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,8 @@ class IsValidFilter implements ValidationRule
 | 
			
		||||
 | 
			
		||||
    public function __construct(array $keys)
 | 
			
		||||
    {
 | 
			
		||||
        $this->allowed = $keys;
 | 
			
		||||
        $this->allowed   = $keys;
 | 
			
		||||
        $this->allowed[] = 'user_group_id';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[\Override]
 | 
			
		||||
@@ -45,7 +46,7 @@ class IsValidFilter implements ValidationRule
 | 
			
		||||
        }
 | 
			
		||||
        foreach ($value as $key => $val) {
 | 
			
		||||
            if (!in_array($key, $this->allowed, true)) {
 | 
			
		||||
                $fail('validation.bad_api_filter')->translate();
 | 
			
		||||
                $fail('validation.bad_api_filter')->translate(['filter' => $key]);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\AccountBalances;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\AccountBalances;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Entities\AccountBalance;
 | 
			
		||||
use LaravelJsonApi\Contracts\Store\QueriesAll;
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\AccountBalances;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\AccountBalances;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
use LaravelJsonApi\Core\Resources\JsonApiResource;
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\AccountBalances;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\AccountBalances;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Entities\AccountBalance;
 | 
			
		||||
use LaravelJsonApi\Core\Schema\Schema;
 | 
			
		||||
@@ -21,7 +21,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\AccountBalances\Capabilities;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\AccountBalances\Capabilities;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Entities\AccountBalance;
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
							
								
								
									
										77
									
								
								app/JsonApi/V2/Accounts/AccountCollectionQuery.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								app/JsonApi/V2/Accounts/AccountCollectionQuery.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Rules\Account\IsValidAccountType;
 | 
			
		||||
use FireflyIII\Rules\IsAllowedGroupAction;
 | 
			
		||||
use FireflyIII\Rules\IsDateOrTime;
 | 
			
		||||
use FireflyIII\Rules\IsValidDateRange;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Requests\ResourceQuery;
 | 
			
		||||
use LaravelJsonApi\Validation\Rule as JsonApiRule;
 | 
			
		||||
 | 
			
		||||
class AccountCollectionQuery extends ResourceQuery
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the validation rules that apply to the request query parameters.
 | 
			
		||||
     */
 | 
			
		||||
    public function rules(): array
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $validFilters = config('api.valid_api_filters')[Account::class];
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'fields'        => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'array',
 | 
			
		||||
                JsonApiRule::fieldSets(),
 | 
			
		||||
            ],
 | 
			
		||||
            'userGroupId'   => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'integer',
 | 
			
		||||
                new IsAllowedGroupAction(Account::class, request()->method()),
 | 
			
		||||
            ],
 | 
			
		||||
            'startPeriod'   => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'date',
 | 
			
		||||
                new IsDateOrTime(),
 | 
			
		||||
                new IsValidDateRange(),
 | 
			
		||||
            ],
 | 
			
		||||
            'endPeriod'     => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'date',
 | 
			
		||||
                new IsDateOrTime(),
 | 
			
		||||
                new IsValidDateRange(),
 | 
			
		||||
            ],
 | 
			
		||||
            'filter'        => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'array',
 | 
			
		||||
                JsonApiRule::filter($validFilters),
 | 
			
		||||
                new IsValidAccountType(),
 | 
			
		||||
            ],
 | 
			
		||||
            'include'       => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'string',
 | 
			
		||||
                JsonApiRule::includePaths(),
 | 
			
		||||
            ],
 | 
			
		||||
            'page'          => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'array',
 | 
			
		||||
                JsonApiRule::page(),
 | 
			
		||||
            ],
 | 
			
		||||
            'sort'          => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'string',
 | 
			
		||||
                JsonApiRule::sort(),
 | 
			
		||||
            ],
 | 
			
		||||
            'withCount'     => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'string',
 | 
			
		||||
                JsonApiRule::countable(),
 | 
			
		||||
            ],
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										112
									
								
								app/JsonApi/V2/Accounts/AccountRepository.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								app/JsonApi/V2/Accounts/AccountRepository.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * AccountRepository.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Contracts\Store\CreatesResources;
 | 
			
		||||
use LaravelJsonApi\Contracts\Store\QueriesAll;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\AbstractRepository;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Capabilities\CrudRelations;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Concerns\HasCrudCapability;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Concerns\HasRelationsCapability;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AccountRepository
 | 
			
		||||
 *
 | 
			
		||||
 * The repository collects a single or many (account) objects from the database and returns them to the
 | 
			
		||||
 * account resource. The account resource links all account properties to the JSON properties.
 | 
			
		||||
 *
 | 
			
		||||
 * For the queryAll thing, a separate query is constructed that does the actual querying of the database.
 | 
			
		||||
 * This is necessary because the user can't just query all accounts (it would return other user's data)
 | 
			
		||||
 * and because we also need to collect all kinds of metadata, like the currency and user info.
 | 
			
		||||
 */
 | 
			
		||||
class AccountRepository extends AbstractRepository implements QueriesAll, CreatesResources
 | 
			
		||||
{
 | 
			
		||||
    use HasCrudCapability;
 | 
			
		||||
    use HasRelationsCapability;
 | 
			
		||||
    use UsergroupAware;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * SiteRepository constructor.
 | 
			
		||||
     */
 | 
			
		||||
    public function __construct()
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function exists(string $resourceId): bool
 | 
			
		||||
    {
 | 
			
		||||
        $result = null !== Account::find((int) $resourceId);
 | 
			
		||||
        Log::debug(sprintf('%s: %s', __METHOD__, var_export($result, true)));
 | 
			
		||||
 | 
			
		||||
        return $result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function find(string $resourceId): ?object
 | 
			
		||||
    {
 | 
			
		||||
        exit(__METHOD__);
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        //        throw new \RuntimeException('trace me');
 | 
			
		||||
        $account    = Account::find((int) $resourceId);
 | 
			
		||||
        if (null === $account) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        // enrich the collected data
 | 
			
		||||
        $enrichment = new AccountEnrichment();
 | 
			
		||||
 | 
			
		||||
        return $enrichment->enrichSingle($account);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function queryAll(): Capabilities\AccountQuery
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return Capabilities\AccountQuery::make()
 | 
			
		||||
            ->withUserGroup($this->userGroup)
 | 
			
		||||
            ->withServer($this->server)
 | 
			
		||||
            ->withSchema($this->schema)
 | 
			
		||||
        ;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected function crud(): Capabilities\CrudAccount
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return Capabilities\CrudAccount::make();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * TODO piggy banks
 | 
			
		||||
     * TODO transactions
 | 
			
		||||
     */
 | 
			
		||||
    protected function relations(): CrudRelations
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return Capabilities\CrudAccountRelations::make();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										58
									
								
								app/JsonApi/V2/Accounts/AccountRequest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								app/JsonApi/V2/Accounts/AccountRequest.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Rules\Account\IsUniqueAccount;
 | 
			
		||||
use FireflyIII\Rules\IsBoolean;
 | 
			
		||||
use FireflyIII\Rules\IsValidPositiveAmount;
 | 
			
		||||
use FireflyIII\Rules\UniqueAccountNumber;
 | 
			
		||||
use FireflyIII\Rules\UniqueIban;
 | 
			
		||||
use FireflyIII\Support\Request\ConvertsDataTypes;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Requests\ResourceRequest;
 | 
			
		||||
 | 
			
		||||
class AccountRequest extends ResourceRequest
 | 
			
		||||
{
 | 
			
		||||
    use ConvertsDataTypes;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the validation rules for the resource.
 | 
			
		||||
     */
 | 
			
		||||
    public function rules(): array
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $accountRoles   = implode(',', config('firefly.accountRoles'));
 | 
			
		||||
        $ccPaymentTypes = implode(',', array_keys(config('firefly.ccTypes')));
 | 
			
		||||
        $types          = implode(',', array_keys(config('firefly.subTitlesByIdentifier')));
 | 
			
		||||
        $type           = $this->convertString('type');
 | 
			
		||||
        // var_dump($types);exit;
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'name'                         => ['required', 'max:1024', 'min:1'], // , new IsUniqueAccount()
 | 
			
		||||
            'account_type'                 => ['required', 'max:1024', 'min:1', sprintf('in:%s', $types)],
 | 
			
		||||
            //            'iban'                 => ['iban', 'nullable', new UniqueIban(null, $type)],
 | 
			
		||||
            //            'bic'                  => 'bic|nullable',
 | 
			
		||||
            //            'account_number'       => ['min:1', 'max:255', 'nullable', new UniqueAccountNumber(null, $type)],
 | 
			
		||||
            //            'opening_balance'      => 'numeric|required_with:opening_balance_date|nullable',
 | 
			
		||||
            //            'opening_balance_date' => 'date|required_with:opening_balance|nullable',
 | 
			
		||||
            //            'virtual_balance'      => 'numeric|nullable',
 | 
			
		||||
            //            'order'                => 'numeric|nullable',
 | 
			
		||||
            //            'currency_id'          => 'numeric|exists:transaction_currencies,id',
 | 
			
		||||
            //            'currency_code'        => 'min:3|max:3|exists:transaction_currencies,code',
 | 
			
		||||
            //            'active'               => [new IsBoolean()],
 | 
			
		||||
            //            'include_net_worth'    => [new IsBoolean()],
 | 
			
		||||
            //            'account_role'         => sprintf('nullable|in:%s|required_if:type,asset', $accountRoles),
 | 
			
		||||
            //            'credit_card_type'     => sprintf('nullable|in:%s|required_if:account_role,ccAsset', $ccPaymentTypes),
 | 
			
		||||
            //            'monthly_payment_date' => 'nullable|date|required_if:account_role,ccAsset|required_if:credit_card_type,monthlyFull',
 | 
			
		||||
            //            'liability_type'       => 'nullable|required_if:type,liability|required_if:type,liabilities|in:loan,debt,mortgage',
 | 
			
		||||
            //            'liability_amount'     => ['required_with:liability_start_date', new IsValidPositiveAmount()],
 | 
			
		||||
            //            'liability_start_date' => 'required_with:liability_amount|date',
 | 
			
		||||
            //            'liability_direction'  => 'nullable|required_if:type,liability|required_if:type,liabilities|in:credit,debit',
 | 
			
		||||
            //            'interest'             => 'min:0|max:100|numeric',
 | 
			
		||||
            //            'interest_period'      => sprintf('nullable|in:%s', implode(',', config('firefly.interest_periods'))),
 | 
			
		||||
            //            'notes'                => 'min:0|max:32768',
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										83
									
								
								app/JsonApi/V2/Accounts/AccountResource.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								app/JsonApi/V2/Accounts/AccountResource.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
use LaravelJsonApi\Core\Resources\JsonApiResource;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @property Account $resource
 | 
			
		||||
 */
 | 
			
		||||
class AccountResource extends JsonApiResource
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource id.
 | 
			
		||||
     */
 | 
			
		||||
    public function id(): string
 | 
			
		||||
    {
 | 
			
		||||
        return (string) $this->resource->id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource's attributes.
 | 
			
		||||
     *
 | 
			
		||||
     * @param null|Request $request
 | 
			
		||||
     */
 | 
			
		||||
    public function attributes($request): iterable
 | 
			
		||||
    {
 | 
			
		||||
        // Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'created_at'              => $this->resource->created_at,
 | 
			
		||||
            'updated_at'              => $this->resource->updated_at,
 | 
			
		||||
            'name'                    => $this->resource->name,
 | 
			
		||||
            'active'                  => $this->resource->active,
 | 
			
		||||
            'order'                   => $this->resource->order,
 | 
			
		||||
            'iban'                    => $this->resource->iban,
 | 
			
		||||
            'account_type'            => $this->resource->account_type_string,
 | 
			
		||||
            'account_role'            => $this->resource->account_role,
 | 
			
		||||
            'account_number'          => '' === $this->resource->account_number ? null : $this->resource->account_number,
 | 
			
		||||
 | 
			
		||||
            // currency (if the account has a currency setting, otherwise NULL).
 | 
			
		||||
            'currency_id'             => $this->resource->currency_id,
 | 
			
		||||
            'currency_name'           => $this->resource->currency_name,
 | 
			
		||||
            'currency_code'           => $this->resource->currency_code,
 | 
			
		||||
            'currency_symbol'         => $this->resource->currency_symbol,
 | 
			
		||||
            'currency_decimal_places' => $this->resource->currency_decimal_places,
 | 
			
		||||
            'is_multi_currency'       => '1' === $this->resource->is_multi_currency,
 | 
			
		||||
 | 
			
		||||
            // balances
 | 
			
		||||
            'balance'                 => $this->resource->balance,
 | 
			
		||||
            'native_balance'          => $this->resource->native_balance,
 | 
			
		||||
 | 
			
		||||
            // liability things
 | 
			
		||||
            'liability_direction'     => $this->resource->liability_direction,
 | 
			
		||||
            'interest'                => $this->resource->interest,
 | 
			
		||||
            'interest_period'         => $this->resource->interest_period,
 | 
			
		||||
            'current_debt'            => $this->resource->current_debt, // TODO may be removed in the future.
 | 
			
		||||
 | 
			
		||||
            // other things
 | 
			
		||||
            'last_activity'           => $this->resource->last_activity,
 | 
			
		||||
 | 
			
		||||
            // object group
 | 
			
		||||
            'object_group_id'         => $this->resource->object_group_id,
 | 
			
		||||
            'object_group_title'      => $this->resource->object_group_title,
 | 
			
		||||
            'object_group_order'      => $this->resource->object_group_order,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource's relationships.
 | 
			
		||||
     *
 | 
			
		||||
     * @param null|Request $request
 | 
			
		||||
     */
 | 
			
		||||
    public function relationships($request): iterable
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            $this->relation('user')->withData($this->resource->user),
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\Accounts;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
@@ -10,8 +10,13 @@ use LaravelJsonApi\Core\Resources\JsonApiResource;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @property Account $resource
 | 
			
		||||
 *
 | 
			
		||||
 * This class collects the resources attributes, the account in this case.
 | 
			
		||||
 * Generally speaking, each property here is directly related to a property on the account object itself.
 | 
			
		||||
 * However, many properties are collected from other sources, like the user or the currency.
 | 
			
		||||
 * As a result, the account repository is where it's at, which is where the collection takes place and is optimised.
 | 
			
		||||
 */
 | 
			
		||||
class AccountResource extends JsonApiResource
 | 
			
		||||
class AccountResourceOld extends JsonApiResource
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource's attributes.
 | 
			
		||||
@@ -20,32 +25,23 @@ class AccountResource extends JsonApiResource
 | 
			
		||||
     */
 | 
			
		||||
    public function attributes($request): iterable
 | 
			
		||||
    {
 | 
			
		||||
        // fields removed here have been migrated.
 | 
			
		||||
        return [
 | 
			
		||||
            'created_at'      => $this->resource->created_at,
 | 
			
		||||
            'updated_at'      => $this->resource->updated_at,
 | 
			
		||||
            'name'            => $this->resource->name,
 | 
			
		||||
            'iban'            => '' === $this->resource->iban ? null : $this->resource->iban,
 | 
			
		||||
            'active'          => $this->resource->active,
 | 
			
		||||
            'last_activity'   => $this->resource->last_activity,
 | 
			
		||||
            'type'            => $this->resource->type,
 | 
			
		||||
            'account_role'    => $this->resource->account_role,
 | 
			
		||||
            'created_at'    => $this->resource->created_at,
 | 
			
		||||
            'updated_at'    => $this->resource->updated_at,
 | 
			
		||||
            'name'          => $this->resource->name,
 | 
			
		||||
 | 
			
		||||
            //            'virtual_balance' => $this->resource->virtual_balance,
 | 
			
		||||
            //            'native_balance'  => $this->resource->native_balance,
 | 
			
		||||
            // 'user' => $this->resource->user_array,
 | 
			
		||||
            //            'balances' => []
 | 
			
		||||
            //
 | 
			
		||||
            // currency
 | 
			
		||||
            //            'currency_id'             => $this->resource->currency_id,
 | 
			
		||||
            //            'currency_code'           => $this->resource->currency_code,
 | 
			
		||||
            //            'currency_symbol'         => $this->resource->currency_symbol,
 | 
			
		||||
            //            'currency_decimal_places' => $this->resource->currency_decimal_places,
 | 
			
		||||
 | 
			
		||||
            // balance (in currency, on date)
 | 
			
		||||
            //            'current_balance'         => $this->resource->current_balance,
 | 
			
		||||
 | 
			
		||||
            //            'current_balance'         => app('steam')->bcround(app('steam')->balance($account, $date), $decimalPlaces),
 | 
			
		||||
            //            'current_balance_date'    => $date->toAtomString(),
 | 
			
		||||
 | 
			
		||||
            //            'notes'                   => $this->repository->getNoteText($account),
 | 
			
		||||
            //            'monthly_payment_date'    => $monthlyPaymentDate,
 | 
			
		||||
            //            'credit_card_type'        => $creditCardType,
 | 
			
		||||
@@ -65,11 +61,6 @@ class AccountResource extends JsonApiResource
 | 
			
		||||
 | 
			
		||||
            //            'order'                          => $order,
 | 
			
		||||
 | 
			
		||||
            //            'currency_id'                    => (string) $currency->id,
 | 
			
		||||
            //            'currency_code'                  => $currency->code,
 | 
			
		||||
            //            'currency_symbol'                => $currency->symbol,
 | 
			
		||||
            //            'currency_decimal_places'        => $currency->decimal_places,
 | 
			
		||||
            //
 | 
			
		||||
            //            'native_currency_id'             => (string) $this->default->id,
 | 
			
		||||
            //            'native_currency_code'           => $this->default->code,
 | 
			
		||||
            //            'native_currency_symbol'         => $this->default->symbol,
 | 
			
		||||
@@ -86,15 +77,9 @@ class AccountResource extends JsonApiResource
 | 
			
		||||
            //            'balance_difference_start'       => $diffStart,
 | 
			
		||||
            //            'balance_difference_end'         => $diffEnd,
 | 
			
		||||
            //
 | 
			
		||||
            //            // more meta
 | 
			
		||||
            //            'last_activity'                  => array_key_exists($id, $this->lastActivity) ? $this->lastActivity[$id]->toAtomString() : null,
 | 
			
		||||
            //
 | 
			
		||||
            //            // liability stuff
 | 
			
		||||
            //            'liability_type'                 => $liabilityType,
 | 
			
		||||
            //            'liability_direction'            => $liabilityDirection,
 | 
			
		||||
            //            'interest'                       => $interest,
 | 
			
		||||
            //            'interest_period'                => $interestPeriod,
 | 
			
		||||
            //            'current_debt'                   => $currentDebt,
 | 
			
		||||
            //
 | 
			
		||||
            //            // object group
 | 
			
		||||
            //            'object_group_id'                => null !== $objectGroupId ? (string) $objectGroupId : null,
 | 
			
		||||
@@ -123,7 +108,8 @@ class AccountResource extends JsonApiResource
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            $this->relation('user')->withData($this->resource->user),
 | 
			
		||||
            $this->relation('account_balances')->withData($this->resource->balances),
 | 
			
		||||
            $this->relation('currency')->withData($this->resource->transactionCurrency),
 | 
			
		||||
            // $this->relation('account_balances')->withData($this->resource->balances),
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										112
									
								
								app/JsonApi/V2/Accounts/AccountSchema.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								app/JsonApi/V2/Accounts/AccountSchema.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Core\Schema\Schema;
 | 
			
		||||
use LaravelJsonApi\Eloquent\Fields\Relations\HasOne;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Fields\Attribute;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Fields\ID;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Filters\Filter;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Pagination\EnumerablePagination;
 | 
			
		||||
 | 
			
		||||
class AccountSchema extends Schema
 | 
			
		||||
{
 | 
			
		||||
    use UsergroupAware;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The model the schema corresponds to.
 | 
			
		||||
     */
 | 
			
		||||
    public static string $model = Account::class;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource fields.
 | 
			
		||||
     */
 | 
			
		||||
    public function fields(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            ID::make(),
 | 
			
		||||
            Attribute::make('created_at'),
 | 
			
		||||
            Attribute::make('updated_at'),
 | 
			
		||||
 | 
			
		||||
            // basic info and meta data
 | 
			
		||||
            Attribute::make('name')->sortable(),
 | 
			
		||||
            Attribute::make('active')->sortable(),
 | 
			
		||||
            Attribute::make('order')->sortable(),
 | 
			
		||||
            Attribute::make('iban')->sortable(),
 | 
			
		||||
            Attribute::make('account_type'),
 | 
			
		||||
            Attribute::make('account_role'),
 | 
			
		||||
            Attribute::make('account_number')->sortable(),
 | 
			
		||||
 | 
			
		||||
            // currency
 | 
			
		||||
            Attribute::make('currency_id'),
 | 
			
		||||
            Attribute::make('currency_name'),
 | 
			
		||||
            Attribute::make('currency_code'),
 | 
			
		||||
            Attribute::make('currency_symbol'),
 | 
			
		||||
            Attribute::make('currency_decimal_places'),
 | 
			
		||||
            Attribute::make('is_multi_currency'),
 | 
			
		||||
 | 
			
		||||
            // balance
 | 
			
		||||
            Attribute::make('balance')->sortable(),
 | 
			
		||||
            Attribute::make('native_balance')->sortable(),
 | 
			
		||||
 | 
			
		||||
            // liability things
 | 
			
		||||
            Attribute::make('liability_direction'),
 | 
			
		||||
            Attribute::make('interest'),
 | 
			
		||||
            Attribute::make('interest_period'),
 | 
			
		||||
            // Attribute::make('current_debt')->sortable(),
 | 
			
		||||
 | 
			
		||||
            // TODO credit card fields.
 | 
			
		||||
 | 
			
		||||
            // dynamic data
 | 
			
		||||
            Attribute::make('last_activity')->sortable(),
 | 
			
		||||
            Attribute::make('balance_difference')->sortable(), // only used for sort.
 | 
			
		||||
 | 
			
		||||
            // group
 | 
			
		||||
            Attribute::make('object_group_id'),
 | 
			
		||||
            Attribute::make('object_group_title'),
 | 
			
		||||
            Attribute::make('object_group_order'),
 | 
			
		||||
 | 
			
		||||
            // relations.
 | 
			
		||||
            HasOne::make('user')->readOnly(),
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource filters.
 | 
			
		||||
     */
 | 
			
		||||
    public function filters(): array
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $array  = [];
 | 
			
		||||
        $config = config('api.valid_api_filters')[Account::class];
 | 
			
		||||
        foreach ($config as $entry) {
 | 
			
		||||
            $array[] = Filter::make($entry);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $array;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function repository(): AccountRepository
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        $this->setUserGroup($this->server->getUsergroup());
 | 
			
		||||
 | 
			
		||||
        return AccountRepository::make()
 | 
			
		||||
            ->withServer($this->server)
 | 
			
		||||
            ->withSchema($this)
 | 
			
		||||
            ->withUserGroup($this->userGroup)
 | 
			
		||||
        ;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function pagination(): EnumerablePagination
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return EnumerablePagination::make();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\Accounts;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use LaravelJsonApi\Eloquent\Contracts\Paginator;
 | 
			
		||||
@@ -17,7 +17,14 @@ use LaravelJsonApi\Eloquent\Filters\WhereIdIn;
 | 
			
		||||
use LaravelJsonApi\Eloquent\Pagination\PagePagination;
 | 
			
		||||
use LaravelJsonApi\Eloquent\Schema;
 | 
			
		||||
 | 
			
		||||
class AccountSchema extends Schema
 | 
			
		||||
/**
 | 
			
		||||
 * Class AccountSchema
 | 
			
		||||
 *
 | 
			
		||||
 * This is the schema of all fields that an account exposes to the world.
 | 
			
		||||
 * Fields do not have to have a relation to the actual model.
 | 
			
		||||
 * Fields mentioned here still need to be filled in by the AccountResource.
 | 
			
		||||
 */
 | 
			
		||||
class AccountSchemaOld extends Schema
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * The model the schema corresponds to.
 | 
			
		||||
@@ -34,18 +41,19 @@ class AccountSchema extends Schema
 | 
			
		||||
            DateTime::make('created_at')->sortable()->readOnly(),
 | 
			
		||||
            DateTime::make('updated_at')->sortable()->readOnly(),
 | 
			
		||||
            Str::make('name')->sortable(),
 | 
			
		||||
            Str::make('account_type'),
 | 
			
		||||
            Str::make('virtual_balance'),
 | 
			
		||||
            Str::make('iban'),
 | 
			
		||||
            Boolean::make('active'),
 | 
			
		||||
            Number::make('order'),
 | 
			
		||||
            HasOne::make('user'),
 | 
			
		||||
            HasMany::make('account_balances'),
 | 
			
		||||
            //            Str::make('account_type'),
 | 
			
		||||
            //            Str::make('virtual_balance'),
 | 
			
		||||
            //            Str::make('iban'),
 | 
			
		||||
            //            Boolean::make('active'),
 | 
			
		||||
            //            Number::make('order'),
 | 
			
		||||
            HasOne::make('user')->readOnly(),
 | 
			
		||||
            // HasMany::make('account_balances'),
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the resource filters.
 | 
			
		||||
     * Filters mentioned here can be used to filter the results.
 | 
			
		||||
     * TODO write down exactly how this works.
 | 
			
		||||
     */
 | 
			
		||||
    public function filters(): array
 | 
			
		||||
    {
 | 
			
		||||
							
								
								
									
										45
									
								
								app/JsonApi/V2/Accounts/AccountSingleQuery.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								app/JsonApi/V2/Accounts/AccountSingleQuery.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Laravel\Http\Requests\ResourceQuery;
 | 
			
		||||
use LaravelJsonApi\Validation\Rule as JsonApiRule;
 | 
			
		||||
 | 
			
		||||
class AccountSingleQuery extends ResourceQuery
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the validation rules that apply to the request query parameters.
 | 
			
		||||
     */
 | 
			
		||||
    public function rules(): array
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            'fields'    => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'array',
 | 
			
		||||
                JsonApiRule::fieldSets(),
 | 
			
		||||
            ],
 | 
			
		||||
            'filter'    => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'array',
 | 
			
		||||
                JsonApiRule::filter()->forget('id'),
 | 
			
		||||
            ],
 | 
			
		||||
            'include'   => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'string',
 | 
			
		||||
                JsonApiRule::includePaths(),
 | 
			
		||||
            ],
 | 
			
		||||
            'page'      => JsonApiRule::notSupported(),
 | 
			
		||||
            'sort'      => JsonApiRule::notSupported(),
 | 
			
		||||
            'withCount' => [
 | 
			
		||||
                'nullable',
 | 
			
		||||
                'string',
 | 
			
		||||
                JsonApiRule::countable(),
 | 
			
		||||
            ],
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										141
									
								
								app/JsonApi/V2/Accounts/Capabilities/AccountQuery.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								app/JsonApi/V2/Accounts/Capabilities/AccountQuery.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,141 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * AccountQuery.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts\Capabilities;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Support\Http\Api\AccountFilter;
 | 
			
		||||
use FireflyIII\Support\JsonApi\CollectsCustomParameters;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
 | 
			
		||||
use FireflyIII\Support\JsonApi\ExpandsQuery;
 | 
			
		||||
use FireflyIII\Support\JsonApi\FiltersPagination;
 | 
			
		||||
use FireflyIII\Support\JsonApi\SortsCollection;
 | 
			
		||||
use FireflyIII\Support\JsonApi\SortsQueryResults;
 | 
			
		||||
use FireflyIII\Support\JsonApi\ValidateSortParameters;
 | 
			
		||||
use Illuminate\Pagination\LengthAwarePaginator;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Contracts\Pagination\Page;
 | 
			
		||||
use LaravelJsonApi\Contracts\Store\HasPagination;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Capabilities\QueryAll;
 | 
			
		||||
 | 
			
		||||
class AccountQuery extends QueryAll implements HasPagination
 | 
			
		||||
{
 | 
			
		||||
    use AccountFilter;
 | 
			
		||||
    use CollectsCustomParameters;
 | 
			
		||||
    use ExpandsQuery;
 | 
			
		||||
    use FiltersPagination;
 | 
			
		||||
    use SortsCollection;
 | 
			
		||||
    use SortsQueryResults;
 | 
			
		||||
    use UsergroupAware;
 | 
			
		||||
    use ValidateSortParameters;
 | 
			
		||||
 | 
			
		||||
    // use PaginatesEnumerables;
 | 
			
		||||
 | 
			
		||||
    #[\Override]
 | 
			
		||||
    /**
 | 
			
		||||
     * This method returns all accounts, given a bunch of filters and sort fields, together with pagination.
 | 
			
		||||
     *
 | 
			
		||||
     * It is only used on the index, and nowhere else.
 | 
			
		||||
     */
 | 
			
		||||
    public function get(): iterable
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        // collect sort options
 | 
			
		||||
        $sort        = $this->queryParameters->sortFields();
 | 
			
		||||
 | 
			
		||||
        // collect pagination based on the page
 | 
			
		||||
        $pagination  = $this->filtersPagination($this->queryParameters->page());
 | 
			
		||||
 | 
			
		||||
        // check if we need all accounts, regardless of pagination
 | 
			
		||||
        // This is necessary when the user wants to sort on specific params.
 | 
			
		||||
        $needsAll    = $this->needsFullDataset(Account::class, $sort);
 | 
			
		||||
 | 
			
		||||
        // params that were not recognised, may be my own custom stuff.
 | 
			
		||||
        $otherParams = $this->getOtherParams($this->queryParameters->unrecognisedParameters());
 | 
			
		||||
 | 
			
		||||
        // start the query
 | 
			
		||||
        $query       = $this->userGroup->accounts();
 | 
			
		||||
 | 
			
		||||
        // add sort and filter parameters to the query.
 | 
			
		||||
        $query       = $this->addSortParams(Account::class, $query, $sort);
 | 
			
		||||
        $query       = $this->addFilterParams(Account::class, $query, $this->queryParameters->filter());
 | 
			
		||||
 | 
			
		||||
        // collect the result.
 | 
			
		||||
        $collection  = $query->get(['accounts.*']);
 | 
			
		||||
        // sort the data after the query, and return it right away.
 | 
			
		||||
        $collection  = $this->sortCollection(Account::class, $collection, $sort);
 | 
			
		||||
 | 
			
		||||
        // if the entire collection needs to be enriched and sorted, do so now:
 | 
			
		||||
        $totalCount  = $collection->count();
 | 
			
		||||
        Log::debug(sprintf('Total is %d', $totalCount));
 | 
			
		||||
        if ($needsAll) {
 | 
			
		||||
            Log::debug('Needs the entire collection');
 | 
			
		||||
            // enrich the entire collection
 | 
			
		||||
            $enrichment  = new AccountEnrichment();
 | 
			
		||||
            $enrichment->setStart($otherParams['start'] ?? null);
 | 
			
		||||
            $enrichment->setEnd($otherParams['end'] ?? null);
 | 
			
		||||
            $collection  = $enrichment->enrich($collection);
 | 
			
		||||
 | 
			
		||||
            // TODO sort the set based on post-query sort options:
 | 
			
		||||
            $collection  = $this->postQuerySort(Account::class, $collection, $sort);
 | 
			
		||||
 | 
			
		||||
            // take the current page from the enriched set.
 | 
			
		||||
            $currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
 | 
			
		||||
        }
 | 
			
		||||
        if (!$needsAll) {
 | 
			
		||||
            Log::debug('Needs only partial collection');
 | 
			
		||||
            // take from the collection the filtered page + page number:
 | 
			
		||||
            $currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
 | 
			
		||||
 | 
			
		||||
            // enrich only the current page.
 | 
			
		||||
            $enrichment  = new AccountEnrichment();
 | 
			
		||||
            $enrichment->setStart($otherParams['start'] ?? null);
 | 
			
		||||
            $enrichment->setEnd($otherParams['end'] ?? null);
 | 
			
		||||
            $currentPage = $enrichment->enrich($currentPage);
 | 
			
		||||
        }
 | 
			
		||||
        // get current page?
 | 
			
		||||
        Log::debug(sprintf('Skip %d, take %d', ($pagination['number'] - 1) * $pagination['size'], $pagination['size']));
 | 
			
		||||
        // $currentPage = $collection->skip(($pagination['number'] - 1) * $pagination['size'])->take($pagination['size']);
 | 
			
		||||
        Log::debug(sprintf('New collection size: %d', $currentPage->count()));
 | 
			
		||||
 | 
			
		||||
        // TODO add filters after the query, if there are filters that cannot be applied to the database
 | 
			
		||||
        // TODO same for sort things.
 | 
			
		||||
 | 
			
		||||
        return new LengthAwarePaginator($currentPage, $totalCount, $pagination['size'], $pagination['number']);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[\Override]
 | 
			
		||||
    public function paginate(array $page): Page
 | 
			
		||||
    {
 | 
			
		||||
        exit('here weare');
 | 
			
		||||
        // TODO: Implement paginate() method.
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    #[\Override]
 | 
			
		||||
    public function getOrPaginate(?array $page): iterable
 | 
			
		||||
    {
 | 
			
		||||
        exit('here weare');
 | 
			
		||||
        // TODO: Implement getOrPaginate() method.
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										60
									
								
								app/JsonApi/V2/Accounts/Capabilities/CrudAccount.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								app/JsonApi/V2/Accounts/Capabilities/CrudAccount.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,60 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * CrudAccount.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts\Capabilities;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\Account;
 | 
			
		||||
use FireflyIII\Support\JsonApi\CollectsCustomParameters;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Capabilities\CrudResource;
 | 
			
		||||
 | 
			
		||||
class CrudAccount extends CrudResource
 | 
			
		||||
{
 | 
			
		||||
    use CollectsCustomParameters;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Read the supplied site.
 | 
			
		||||
     */
 | 
			
		||||
    public function read(Account $account): ?Account
 | 
			
		||||
    {
 | 
			
		||||
        $otherParams = $this->getOtherParams($this->request->query->all());
 | 
			
		||||
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        // enrich the collected data
 | 
			
		||||
        $enrichment  = new AccountEnrichment();
 | 
			
		||||
 | 
			
		||||
        // set start and date, if present.
 | 
			
		||||
        $enrichment->setStart($otherParams['start'] ?? null);
 | 
			
		||||
        $enrichment->setEnd($otherParams['end'] ?? null);
 | 
			
		||||
 | 
			
		||||
        return $enrichment->enrichSingle($account);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function create(array $validatedData): Account
 | 
			
		||||
    {
 | 
			
		||||
        var_dump($validatedData);
 | 
			
		||||
 | 
			
		||||
        exit;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
<?php
 | 
			
		||||
/**
 | 
			
		||||
 * api.php
 | 
			
		||||
 * Copyright (c) 2019 james@firefly-iii.org
 | 
			
		||||
/*
 | 
			
		||||
 * CrudAccountRelations.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
@@ -16,21 +16,13 @@
 | 
			
		||||
 * 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/>.
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * PLEASE DO NOT EDIT THIS FILE DIRECTLY.
 | 
			
		||||
 * YOUR CHANGES WILL BE OVERWRITTEN!
 | 
			
		||||
 * YOUR PR WITH CHANGES TO THIS FILE WILL BE REJECTED!
 | 
			
		||||
 *
 | 
			
		||||
 * GO TO CROWDIN TO FIX OR CHANGE TRANSLATIONS!
 | 
			
		||||
 *
 | 
			
		||||
 * https://crowdin.com/project/firefly-iii
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Accounts\Capabilities;
 | 
			
		||||
 | 
			
		||||
return [
 | 
			
		||||
];
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Capabilities\CrudRelations;
 | 
			
		||||
 | 
			
		||||
class CrudAccountRelations extends CrudRelations {}
 | 
			
		||||
							
								
								
									
										53
									
								
								app/JsonApi/V2/Server.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								app/JsonApi/V2/Server.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V2;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\JsonApi\V2\Accounts\AccountSchema;
 | 
			
		||||
use FireflyIII\JsonApi\V2\Users\UserSchema;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UserGroupDetectable;
 | 
			
		||||
use Illuminate\Support\Facades\Log;
 | 
			
		||||
use LaravelJsonApi\Core\Server\Server as BaseServer;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class Server
 | 
			
		||||
 *
 | 
			
		||||
 * This class serves as a generic class for the v2 API "server".
 | 
			
		||||
 */
 | 
			
		||||
class Server extends BaseServer
 | 
			
		||||
{
 | 
			
		||||
    use UsergroupAware;
 | 
			
		||||
    use UserGroupDetectable;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The base URI namespace for this server.
 | 
			
		||||
     */
 | 
			
		||||
    protected string $baseUri = '/api/v2';
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Bootstrap the server when it is handling an HTTP request.
 | 
			
		||||
     */
 | 
			
		||||
    public function serving(): void
 | 
			
		||||
    {
 | 
			
		||||
        Log::debug(__METHOD__);
 | 
			
		||||
        // at this point the user may not actually have access to this user group.
 | 
			
		||||
        $res = $this->detectUserGroup();
 | 
			
		||||
        $this->setUserGroup($res);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the server's list of schemas.
 | 
			
		||||
     */
 | 
			
		||||
    protected function allSchemas(): array
 | 
			
		||||
    {
 | 
			
		||||
        // Log::debug(__METHOD__);
 | 
			
		||||
 | 
			
		||||
        return [
 | 
			
		||||
            AccountSchema::class,
 | 
			
		||||
            UserSchema::class,
 | 
			
		||||
            // AccountBalanceSchema::class,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\Users;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Users;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Models\User;
 | 
			
		||||
use Illuminate\Http\Request;
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\Users;
 | 
			
		||||
namespace FireflyIII\JsonApi\V2\Users;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use LaravelJsonApi\Eloquent\Contracts\Paginator;
 | 
			
		||||
@@ -1,73 +0,0 @@
 | 
			
		||||
<?php
 | 
			
		||||
/*
 | 
			
		||||
 * AccountQuery.php
 | 
			
		||||
 * Copyright (c) 2024 james@firefly-iii.org.
 | 
			
		||||
 *
 | 
			
		||||
 * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
			
		||||
 *
 | 
			
		||||
 * This program is free software: you can redistribute it and/or modify
 | 
			
		||||
 * it under the terms of the GNU Affero General Public License as
 | 
			
		||||
 * published by the Free Software Foundation, either version 3 of the
 | 
			
		||||
 * License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU Affero General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Affero General Public License
 | 
			
		||||
 * along with this program.  If not, see https://www.gnu.org/licenses/.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3\Accounts\Capabilities;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\Support\JsonApi\Concerns\UsergroupAware;
 | 
			
		||||
use FireflyIII\Support\JsonApi\Enrichments\AccountEnrichment;
 | 
			
		||||
use FireflyIII\Support\JsonApi\ExpandsQuery;
 | 
			
		||||
use FireflyIII\Support\JsonApi\FiltersPagination;
 | 
			
		||||
use FireflyIII\Support\JsonApi\SortsCollection;
 | 
			
		||||
use FireflyIII\Support\JsonApi\ValidateSortParameters;
 | 
			
		||||
use LaravelJsonApi\Contracts\Store\HasPagination;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Capabilities\QueryAll;
 | 
			
		||||
use LaravelJsonApi\NonEloquent\Concerns\PaginatesEnumerables;
 | 
			
		||||
 | 
			
		||||
class AccountQuery extends QueryAll implements HasPagination
 | 
			
		||||
{
 | 
			
		||||
    use ExpandsQuery;
 | 
			
		||||
    use FiltersPagination;
 | 
			
		||||
    use PaginatesEnumerables;
 | 
			
		||||
    use SortsCollection;
 | 
			
		||||
    use UsergroupAware;
 | 
			
		||||
    use ValidateSortParameters;
 | 
			
		||||
 | 
			
		||||
    #[\Override]
 | 
			
		||||
    public function get(): iterable
 | 
			
		||||
    {
 | 
			
		||||
        $filters    = $this->queryParameters->filter();
 | 
			
		||||
        $sort       = $this->queryParameters->sortFields();
 | 
			
		||||
        $pagination = $this->filtersPagination($this->queryParameters->page());
 | 
			
		||||
        $needsAll   = $this->validateParams('account', $sort);
 | 
			
		||||
        $query      = $this->userGroup->accounts();
 | 
			
		||||
 | 
			
		||||
        if (!$needsAll) {
 | 
			
		||||
            $query = $this->addPagination($query, $pagination);
 | 
			
		||||
        }
 | 
			
		||||
        $query      = $this->addSortParams($query, $sort);
 | 
			
		||||
        $query      = $this->addFilterParams('account', $query, $filters);
 | 
			
		||||
 | 
			
		||||
        $collection = $query->get(['accounts.*']);
 | 
			
		||||
 | 
			
		||||
        // enrich data
 | 
			
		||||
        $enrichment = new AccountEnrichment();
 | 
			
		||||
        $collection = $enrichment->enrich($collection);
 | 
			
		||||
 | 
			
		||||
        // add filters after the query
 | 
			
		||||
 | 
			
		||||
        // add sort after the query
 | 
			
		||||
        return $this->sortCollection($collection, $sort);
 | 
			
		||||
        //        var_dump($filters->value('name'));
 | 
			
		||||
        //        exit;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\JsonApi\V3;
 | 
			
		||||
 | 
			
		||||
use FireflyIII\JsonApi\V3\Accounts\AccountSchema;
 | 
			
		||||
use FireflyIII\JsonApi\V3\AccountBalances\AccountBalanceSchema;
 | 
			
		||||
use FireflyIII\JsonApi\V3\Users\UserSchema;
 | 
			
		||||
use LaravelJsonApi\Core\Server\Server as BaseServer;
 | 
			
		||||
 | 
			
		||||
class Server extends BaseServer
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * The base URI namespace for this server.
 | 
			
		||||
     */
 | 
			
		||||
    protected string $baseUri = '/api/v3';
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Bootstrap the server when it is handling an HTTP request.
 | 
			
		||||
     */
 | 
			
		||||
    public function serving(): void
 | 
			
		||||
    {
 | 
			
		||||
        // no-op
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the server's list of schemas.
 | 
			
		||||
     */
 | 
			
		||||
    protected function allSchemas(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            AccountSchema::class,
 | 
			
		||||
            UserSchema::class,
 | 
			
		||||
            AccountBalanceSchema::class,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -23,14 +23,12 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use GeneaLabs\LaravelModelCaching\Traits\Cachable;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
@@ -38,84 +36,14 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class Account
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                      $id
 | 
			
		||||
 * @property null|Carbon              $created_at
 | 
			
		||||
 * @property null|Carbon              $updated_at
 | 
			
		||||
 * @property null|Carbon              $deleted_at
 | 
			
		||||
 * @property int                      $user_id
 | 
			
		||||
 * @property int                      $account_type_id
 | 
			
		||||
 * @property string                   $name
 | 
			
		||||
 * @property string                   $virtual_balance
 | 
			
		||||
 * @property null|string              $iban
 | 
			
		||||
 * @property bool                     $active
 | 
			
		||||
 * @property bool                     $encrypted
 | 
			
		||||
 * @property int                      $order
 | 
			
		||||
 * @property AccountMeta[]|Collection $accountMeta
 | 
			
		||||
 * @property null|int                 $account_meta_count
 | 
			
		||||
 * @property AccountType              $accountType
 | 
			
		||||
 * @property Attachment[]|Collection  $attachments
 | 
			
		||||
 * @property null|int                 $attachments_count
 | 
			
		||||
 * @property string                   $account_number
 | 
			
		||||
 * @property string                   $edit_name
 | 
			
		||||
 * @property Collection|Location[]    $locations
 | 
			
		||||
 * @property null|int                 $locations_count
 | 
			
		||||
 * @property Collection|Note[]        $notes
 | 
			
		||||
 * @property null|int                 $notes_count
 | 
			
		||||
 * @property Collection|ObjectGroup[] $objectGroups
 | 
			
		||||
 * @property null|int                 $object_groups_count
 | 
			
		||||
 * @property Collection|PiggyBank[]   $piggyBanks
 | 
			
		||||
 * @property null|int                 $piggy_banks_count
 | 
			
		||||
 * @property Collection|Transaction[] $transactions
 | 
			
		||||
 * @property null|int                 $transactions_count
 | 
			
		||||
 * @property User                     $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static EloquentBuilder|Account accountTypeIn($types)
 | 
			
		||||
 * @method static EloquentBuilder|Account newModelQuery()
 | 
			
		||||
 * @method static EloquentBuilder|Account newQuery()
 | 
			
		||||
 * @method static Builder|Account         onlyTrashed()
 | 
			
		||||
 * @method static EloquentBuilder|Account query()
 | 
			
		||||
 * @method static EloquentBuilder|Account whereAccountTypeId($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereActive($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereCreatedAt($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereDeletedAt($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereEncrypted($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereIban($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereId($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereName($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereOrder($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereUpdatedAt($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereUserId($value)
 | 
			
		||||
 * @method static EloquentBuilder|Account whereVirtualBalance($value)
 | 
			
		||||
 * @method static Builder|Account         withTrashed()
 | 
			
		||||
 * @method static Builder|Account         withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property Carbon   $lastActivityDate
 | 
			
		||||
 * @property string   $startBalance
 | 
			
		||||
 * @property string   $endBalance
 | 
			
		||||
 * @property string   $difference
 | 
			
		||||
 * @property string   $interest
 | 
			
		||||
 * @property string   $interestPeriod
 | 
			
		||||
 * @property string   $accountTypeString
 | 
			
		||||
 * @property Location $location
 | 
			
		||||
 * @property string   $liability_direction
 | 
			
		||||
 * @property string   $current_debt
 | 
			
		||||
 * @property int      $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static EloquentBuilder|Account whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property null|UserGroup $userGroup
 | 
			
		||||
 * @property mixed          $account_id
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAccount
 | 
			
		||||
 */
 | 
			
		||||
class Account extends Model
 | 
			
		||||
{
 | 
			
		||||
    use Cachable;
 | 
			
		||||
    use HasFactory;
 | 
			
		||||
    use ReturnsIntegerIdTrait;
 | 
			
		||||
    use ReturnsIntegerUserIdTrait;
 | 
			
		||||
@@ -144,7 +72,7 @@ class Account extends Model
 | 
			
		||||
    public static function routeBinder(string $value): self
 | 
			
		||||
    {
 | 
			
		||||
        if (auth()->check()) {
 | 
			
		||||
            $accountId = (int)$value;
 | 
			
		||||
            $accountId = (int) $value;
 | 
			
		||||
 | 
			
		||||
            /** @var User $user */
 | 
			
		||||
            $user      = auth()->user();
 | 
			
		||||
@@ -246,7 +174,7 @@ class Account extends Model
 | 
			
		||||
 | 
			
		||||
    public function setVirtualBalanceAttribute(mixed $value): void
 | 
			
		||||
    {
 | 
			
		||||
        $value                               = (string)$value;
 | 
			
		||||
        $value                               = (string) $value;
 | 
			
		||||
        if ('' === $value) {
 | 
			
		||||
            $value = null;
 | 
			
		||||
        }
 | 
			
		||||
@@ -266,7 +194,7 @@ class Account extends Model
 | 
			
		||||
    protected function accountId(): Attribute
 | 
			
		||||
    {
 | 
			
		||||
        return Attribute::make(
 | 
			
		||||
            get: static fn ($value) => (int)$value,
 | 
			
		||||
            get: static fn ($value) => (int) $value,
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -276,21 +204,21 @@ class Account extends Model
 | 
			
		||||
    protected function accountTypeId(): Attribute
 | 
			
		||||
    {
 | 
			
		||||
        return Attribute::make(
 | 
			
		||||
            get: static fn ($value) => (int)$value,
 | 
			
		||||
            get: static fn ($value) => (int) $value,
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected function iban(): Attribute
 | 
			
		||||
    {
 | 
			
		||||
        return Attribute::make(
 | 
			
		||||
            get: static fn ($value) => null === $value ? null : trim(str_replace(' ', '', (string)$value)),
 | 
			
		||||
            get: static fn ($value) => null === $value ? null : trim(str_replace(' ', '', (string) $value)),
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected function order(): Attribute
 | 
			
		||||
    {
 | 
			
		||||
        return Attribute::make(
 | 
			
		||||
            get: static fn ($value) => (int)$value,
 | 
			
		||||
            get: static fn ($value) => (int) $value,
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -300,7 +228,7 @@ class Account extends Model
 | 
			
		||||
    protected function virtualBalance(): Attribute
 | 
			
		||||
    {
 | 
			
		||||
        return Attribute::make(
 | 
			
		||||
            get: static fn ($value) => (string)$value,
 | 
			
		||||
            get: static fn ($value) => (string) $value,
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,9 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @mixin IdeHelperAccountBalance
 | 
			
		||||
 */
 | 
			
		||||
class AccountBalance extends Model
 | 
			
		||||
{
 | 
			
		||||
    use HasFactory;
 | 
			
		||||
 
 | 
			
		||||
@@ -23,35 +23,12 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AccountMeta
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property int         $account_id
 | 
			
		||||
 * @property string      $name
 | 
			
		||||
 * @property mixed       $data
 | 
			
		||||
 * @property Account     $account
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|AccountMeta newModelQuery()
 | 
			
		||||
 * @method static Builder|AccountMeta newQuery()
 | 
			
		||||
 * @method static Builder|AccountMeta query()
 | 
			
		||||
 * @method static Builder|AccountMeta whereAccountId($value)
 | 
			
		||||
 * @method static Builder|AccountMeta whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|AccountMeta whereData($value)
 | 
			
		||||
 * @method static Builder|AccountMeta whereId($value)
 | 
			
		||||
 * @method static Builder|AccountMeta whereName($value)
 | 
			
		||||
 * @method static Builder|AccountMeta whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAccountMeta
 | 
			
		||||
 */
 | 
			
		||||
class AccountMeta extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,33 +23,12 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\AccountType
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                  $id
 | 
			
		||||
 * @property null|Carbon          $created_at
 | 
			
		||||
 * @property null|Carbon          $updated_at
 | 
			
		||||
 * @property string               $type
 | 
			
		||||
 * @property Account[]|Collection $accounts
 | 
			
		||||
 * @property null|int             $accounts_count
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|AccountType newModelQuery()
 | 
			
		||||
 * @method static Builder|AccountType newQuery()
 | 
			
		||||
 * @method static Builder|AccountType query()
 | 
			
		||||
 * @method static Builder|AccountType whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|AccountType whereId($value)
 | 
			
		||||
 * @method static Builder|AccountType whereType($value)
 | 
			
		||||
 * @method static Builder|AccountType whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAccountType
 | 
			
		||||
 */
 | 
			
		||||
class AccountType extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,71 +23,19 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Attachment
 | 
			
		||||
 *
 | 
			
		||||
 * @property int               $id
 | 
			
		||||
 * @property null|Carbon       $created_at
 | 
			
		||||
 * @property null|Carbon       $updated_at
 | 
			
		||||
 * @property null|Carbon       $deleted_at
 | 
			
		||||
 * @property int               $user_id
 | 
			
		||||
 * @property int               $attachable_id
 | 
			
		||||
 * @property string            $attachable_type
 | 
			
		||||
 * @property bool              $file_exists
 | 
			
		||||
 * @property string            $md5
 | 
			
		||||
 * @property string            $filename
 | 
			
		||||
 * @property null|string       $title
 | 
			
		||||
 * @property null|string       $description
 | 
			
		||||
 * @property string            $mime
 | 
			
		||||
 * @property int|string        $size
 | 
			
		||||
 * @property bool              $uploaded
 | 
			
		||||
 * @property string            $notes_text
 | 
			
		||||
 * @property \Eloquent|Model   $attachable
 | 
			
		||||
 * @property Collection|Note[] $notes
 | 
			
		||||
 * @property null|int          $notes_count
 | 
			
		||||
 * @property User              $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment newQuery()
 | 
			
		||||
 * @method static Builder|Attachment                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereAttachableId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereAttachableType($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereDescription($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereFilename($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereMd5($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereMime($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereSize($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereTitle($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUploaded($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserId($value)
 | 
			
		||||
 * @method static Builder|Attachment                               withTrashed()
 | 
			
		||||
 * @method static Builder|Attachment                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Attachment whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAttachment
 | 
			
		||||
 */
 | 
			
		||||
class Attachment extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,53 +24,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class AuditLogEntry
 | 
			
		||||
 *
 | 
			
		||||
 * @property \Eloquent|Model $auditable
 | 
			
		||||
 * @property \Eloquent|Model $changer
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|AuditLogEntry                            newModelQuery()
 | 
			
		||||
 * @method static Builder|AuditLogEntry                            newQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Query\Builder|AuditLogEntry onlyTrashed()
 | 
			
		||||
 * @method static Builder|AuditLogEntry                            query()
 | 
			
		||||
 * @method static \Illuminate\Database\Query\Builder|AuditLogEntry withTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Query\Builder|AuditLogEntry withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property null|Carbon $deleted_at
 | 
			
		||||
 * @property int         $auditable_id
 | 
			
		||||
 * @property string      $auditable_type
 | 
			
		||||
 * @property int         $changer_id
 | 
			
		||||
 * @property string      $changer_type
 | 
			
		||||
 * @property string      $action
 | 
			
		||||
 * @property null|array  $before
 | 
			
		||||
 * @property null|array  $after
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereAction($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereAfter($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereAuditableId($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereAuditableType($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereBefore($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereChangerId($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereChangerType($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereDeletedAt($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereId($value)
 | 
			
		||||
 * @method static Builder|AuditLogEntry whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAuditLogEntry
 | 
			
		||||
 */
 | 
			
		||||
class AuditLogEntry extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,47 +24,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\AutoBudget
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                 $id
 | 
			
		||||
 * @property null|Carbon         $created_at
 | 
			
		||||
 * @property null|Carbon         $updated_at
 | 
			
		||||
 * @property null|Carbon         $deleted_at
 | 
			
		||||
 * @property int                 $budget_id
 | 
			
		||||
 * @property int                 $transaction_currency_id
 | 
			
		||||
 * @property int|string          $auto_budget_type
 | 
			
		||||
 * @property string              $amount
 | 
			
		||||
 * @property string              $period
 | 
			
		||||
 * @property Budget              $budget
 | 
			
		||||
 * @property TransactionCurrency $transactionCurrency
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery()
 | 
			
		||||
 * @method static Builder|AutoBudget                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAmount($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAutoBudgetType($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereBudgetId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget wherePeriod($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereTransactionCurrencyId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|AutoBudget                               withTrashed()
 | 
			
		||||
 * @method static Builder|AutoBudget                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAutoBudget
 | 
			
		||||
 */
 | 
			
		||||
class AutoBudget extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,8 +23,6 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
@@ -32,45 +30,10 @@ use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\AvailableBudget
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                 $id
 | 
			
		||||
 * @property null|Carbon         $created_at
 | 
			
		||||
 * @property null|Carbon         $updated_at
 | 
			
		||||
 * @property null|Carbon         $deleted_at
 | 
			
		||||
 * @property int                 $user_id
 | 
			
		||||
 * @property int                 $transaction_currency_id
 | 
			
		||||
 * @property string              $amount
 | 
			
		||||
 * @property Carbon              $start_date
 | 
			
		||||
 * @property Carbon              $end_date
 | 
			
		||||
 * @property TransactionCurrency $transactionCurrency
 | 
			
		||||
 * @property User                $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget newQuery()
 | 
			
		||||
 * @method static Builder|AvailableBudget                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereAmount($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereEndDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereStartDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereTransactionCurrencyId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserId($value)
 | 
			
		||||
 * @method static Builder|AvailableBudget                               withTrashed()
 | 
			
		||||
 * @method static Builder|AvailableBudget                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|AvailableBudget whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperAvailableBudget
 | 
			
		||||
 */
 | 
			
		||||
class AvailableBudget extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,88 +23,20 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Bill
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                             $id
 | 
			
		||||
 * @property null|Carbon                     $created_at
 | 
			
		||||
 * @property null|Carbon                     $updated_at
 | 
			
		||||
 * @property null|Carbon                     $deleted_at
 | 
			
		||||
 * @property int                             $user_id
 | 
			
		||||
 * @property int                             $transaction_currency_id
 | 
			
		||||
 * @property string                          $name
 | 
			
		||||
 * @property string                          $match
 | 
			
		||||
 * @property string                          $amount_min
 | 
			
		||||
 * @property string                          $amount_max
 | 
			
		||||
 * @property Carbon                          $date
 | 
			
		||||
 * @property null|Carbon                     $end_date
 | 
			
		||||
 * @property null|Carbon                     $extension_date
 | 
			
		||||
 * @property string                          $repeat_freq
 | 
			
		||||
 * @property int                             $skip
 | 
			
		||||
 * @property bool                            $automatch
 | 
			
		||||
 * @property bool                            $active
 | 
			
		||||
 * @property bool                            $name_encrypted
 | 
			
		||||
 * @property bool                            $match_encrypted
 | 
			
		||||
 * @property int                             $order
 | 
			
		||||
 * @property Attachment[]|Collection         $attachments
 | 
			
		||||
 * @property null|int                        $attachments_count
 | 
			
		||||
 * @property Collection|Note[]               $notes
 | 
			
		||||
 * @property null|int                        $notes_count
 | 
			
		||||
 * @property Collection|ObjectGroup[]        $objectGroups
 | 
			
		||||
 * @property null|int                        $object_groups_count
 | 
			
		||||
 * @property null|TransactionCurrency        $transactionCurrency
 | 
			
		||||
 * @property Collection|TransactionJournal[] $transactionJournals
 | 
			
		||||
 * @property null|int                        $transaction_journals_count
 | 
			
		||||
 * @property User                            $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill newQuery()
 | 
			
		||||
 * @method static Builder|Bill                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereActive($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereAmountMax($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereAmountMin($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereAutomatch($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereEndDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereExtensionDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereMatch($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereMatchEncrypted($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereNameEncrypted($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereOrder($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereRepeatFreq($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereSkip($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereTransactionCurrencyId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserId($value)
 | 
			
		||||
 * @method static Builder|Bill                               withTrashed()
 | 
			
		||||
 * @method static Builder|Bill                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Bill whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperBill
 | 
			
		||||
 */
 | 
			
		||||
class Bill extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,71 +23,20 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Budget
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                             $id
 | 
			
		||||
 * @property null|Carbon                     $created_at
 | 
			
		||||
 * @property null|Carbon                     $updated_at
 | 
			
		||||
 * @property null|Carbon                     $deleted_at
 | 
			
		||||
 * @property int                             $user_id
 | 
			
		||||
 * @property string                          $name
 | 
			
		||||
 * @property bool                            $active
 | 
			
		||||
 * @property bool                            $encrypted
 | 
			
		||||
 * @property int                             $order
 | 
			
		||||
 * @property Attachment[]|Collection         $attachments
 | 
			
		||||
 * @property null|int                        $attachments_count
 | 
			
		||||
 * @property AutoBudget[]|Collection         $autoBudgets
 | 
			
		||||
 * @property null|int                        $auto_budgets_count
 | 
			
		||||
 * @property BudgetLimit[]|Collection        $budgetlimits
 | 
			
		||||
 * @property null|int                        $budgetlimits_count
 | 
			
		||||
 * @property Collection|TransactionJournal[] $transactionJournals
 | 
			
		||||
 * @property null|int                        $transaction_journals_count
 | 
			
		||||
 * @property Collection|Transaction[]        $transactions
 | 
			
		||||
 * @property null|int                        $transactions_count
 | 
			
		||||
 * @property User                            $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget newQuery()
 | 
			
		||||
 * @method static Builder|Budget                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereActive($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereEncrypted($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereOrder($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserId($value)
 | 
			
		||||
 * @method static Builder|Budget                               withTrashed()
 | 
			
		||||
 * @method static Builder|Budget                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property string $email
 | 
			
		||||
 * @property int    $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property Collection|Note[] $notes
 | 
			
		||||
 * @property null|int          $notes_count
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperBudget
 | 
			
		||||
 */
 | 
			
		||||
class Budget extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,50 +23,17 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Events\Model\BudgetLimit\Created;
 | 
			
		||||
use FireflyIII\Events\Model\BudgetLimit\Deleted;
 | 
			
		||||
use FireflyIII\Events\Model\BudgetLimit\Updated;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\BudgetLimit
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                      $id
 | 
			
		||||
 * @property null|Carbon              $created_at
 | 
			
		||||
 * @property null|Carbon              $updated_at
 | 
			
		||||
 * @property int                      $budget_id
 | 
			
		||||
 * @property int                      $transaction_currency_id
 | 
			
		||||
 * @property Carbon                   $start_date
 | 
			
		||||
 * @property null|Carbon              $end_date
 | 
			
		||||
 * @property string                   $amount
 | 
			
		||||
 * @property string                   $spent
 | 
			
		||||
 * @property null|string              $period
 | 
			
		||||
 * @property int|string               $generated
 | 
			
		||||
 * @property Budget                   $budget
 | 
			
		||||
 * @property null|TransactionCurrency $transactionCurrency
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|BudgetLimit newModelQuery()
 | 
			
		||||
 * @method static Builder|BudgetLimit newQuery()
 | 
			
		||||
 * @method static Builder|BudgetLimit query()
 | 
			
		||||
 * @method static Builder|BudgetLimit whereAmount($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereBudgetId($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereEndDate($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereGenerated($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereId($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit wherePeriod($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereStartDate($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereTransactionCurrencyId($value)
 | 
			
		||||
 * @method static Builder|BudgetLimit whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperBudgetLimit
 | 
			
		||||
 */
 | 
			
		||||
class BudgetLimit extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,60 +23,18 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Category
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                             $id
 | 
			
		||||
 * @property null|Carbon                     $created_at
 | 
			
		||||
 * @property null|Carbon                     $updated_at
 | 
			
		||||
 * @property null|Carbon                     $deleted_at
 | 
			
		||||
 * @property int                             $user_id
 | 
			
		||||
 * @property string                          $name
 | 
			
		||||
 * @property Carbon                          $lastActivity
 | 
			
		||||
 * @property bool                            $encrypted
 | 
			
		||||
 * @property Attachment[]|Collection         $attachments
 | 
			
		||||
 * @property null|int                        $attachments_count
 | 
			
		||||
 * @property Collection|Note[]               $notes
 | 
			
		||||
 * @property null|int                        $notes_count
 | 
			
		||||
 * @property Collection|TransactionJournal[] $transactionJournals
 | 
			
		||||
 * @property null|int                        $transaction_journals_count
 | 
			
		||||
 * @property Collection|Transaction[]        $transactions
 | 
			
		||||
 * @property null|int                        $transactions_count
 | 
			
		||||
 * @property User                            $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
 | 
			
		||||
 * @method static Builder|Category                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereEncrypted($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereUserId($value)
 | 
			
		||||
 * @method static Builder|Category                               withTrashed()
 | 
			
		||||
 * @method static Builder|Category                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Category whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperCategory
 | 
			
		||||
 */
 | 
			
		||||
class Category extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,37 +23,12 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Configuration
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property null|Carbon $deleted_at
 | 
			
		||||
 * @property string      $name
 | 
			
		||||
 * @property mixed       $data
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration newQuery()
 | 
			
		||||
 * @method static Builder|Configuration                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereData($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Configuration whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|Configuration                               withTrashed()
 | 
			
		||||
 * @method static Builder|Configuration                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperConfiguration
 | 
			
		||||
 */
 | 
			
		||||
class Configuration extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,56 +23,16 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class CurrencyExchangeRate
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                 $id
 | 
			
		||||
 * @property null|Carbon         $created_at
 | 
			
		||||
 * @property null|Carbon         $updated_at
 | 
			
		||||
 * @property null|string         $deleted_at
 | 
			
		||||
 * @property int                 $user_id
 | 
			
		||||
 * @property int                 $from_currency_id
 | 
			
		||||
 * @property int                 $to_currency_id
 | 
			
		||||
 * @property Carbon              $date
 | 
			
		||||
 * @property string              $rate
 | 
			
		||||
 * @property string              $user_rate
 | 
			
		||||
 * @property TransactionCurrency $fromCurrency
 | 
			
		||||
 * @property TransactionCurrency $toCurrency
 | 
			
		||||
 * @property User                $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate newModelQuery()
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate newQuery()
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate query()
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereDate($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereDeletedAt($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereFromCurrencyId($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereId($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereRate($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereToCurrencyId($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereUserId($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereUserRate($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate whereUserGroupId($value)
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate onlyTrashed()
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate withTrashed()
 | 
			
		||||
 * @method static Builder|CurrencyExchangeRate withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperCurrencyExchangeRate
 | 
			
		||||
 */
 | 
			
		||||
class CurrencyExchangeRate extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,42 +24,15 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class GroupMembership
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property null|string $deleted_at
 | 
			
		||||
 * @property int         $user_id
 | 
			
		||||
 * @property int         $user_group_id
 | 
			
		||||
 * @property int         $user_role_id
 | 
			
		||||
 * @property User        $user
 | 
			
		||||
 * @property UserGroup   $userGroup
 | 
			
		||||
 * @property UserRole    $userRole
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|GroupMembership newModelQuery()
 | 
			
		||||
 * @method static Builder|GroupMembership newQuery()
 | 
			
		||||
 * @method static Builder|GroupMembership query()
 | 
			
		||||
 * @method static Builder|GroupMembership whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereDeletedAt($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereId($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereUserGroupId($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereUserId($value)
 | 
			
		||||
 * @method static Builder|GroupMembership whereUserRoleId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperGroupMembership
 | 
			
		||||
 */
 | 
			
		||||
class GroupMembership extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,46 +24,15 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class InvitedUser
 | 
			
		||||
 *
 | 
			
		||||
 * @property User $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|InvitedUser newModelQuery()
 | 
			
		||||
 * @method static Builder|InvitedUser newQuery()
 | 
			
		||||
 * @method static Builder|InvitedUser query()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property int         $user_id
 | 
			
		||||
 * @property string      $email
 | 
			
		||||
 * @property string      $invite_code
 | 
			
		||||
 * @property Carbon      $expires
 | 
			
		||||
 * @property bool        $redeemed
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|InvitedUser whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereEmail($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereExpires($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereId($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereInviteCode($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereRedeemed($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|InvitedUser whereUserId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property mixed $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperInvitedUser
 | 
			
		||||
 */
 | 
			
		||||
class InvitedUser extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,47 +23,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\LinkType
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                                 $id
 | 
			
		||||
 * @property null|Carbon                         $created_at
 | 
			
		||||
 * @property null|Carbon                         $updated_at
 | 
			
		||||
 * @property null|Carbon                         $deleted_at
 | 
			
		||||
 * @property string                              $name
 | 
			
		||||
 * @property string                              $outward
 | 
			
		||||
 * @property string                              $inward
 | 
			
		||||
 * @property int                                 $journalCount
 | 
			
		||||
 * @property bool                                $editable
 | 
			
		||||
 * @property Collection|TransactionJournalLink[] $transactionJournalLinks
 | 
			
		||||
 * @property null|int                            $transaction_journal_links_count
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType newQuery()
 | 
			
		||||
 * @method static Builder|LinkType                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereEditable($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereInward($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereOutward($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|LinkType whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|LinkType                               withTrashed()
 | 
			
		||||
 * @method static Builder|LinkType                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperLinkType
 | 
			
		||||
 */
 | 
			
		||||
class LinkType extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,49 +24,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Location
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                  $id
 | 
			
		||||
 * @property null|Carbon          $created_at
 | 
			
		||||
 * @property null|Carbon          $updated_at
 | 
			
		||||
 * @property null|Carbon          $deleted_at
 | 
			
		||||
 * @property int                  $locatable_id
 | 
			
		||||
 * @property string               $locatable_type
 | 
			
		||||
 * @property null|float           $latitude
 | 
			
		||||
 * @property null|float           $longitude
 | 
			
		||||
 * @property null|int             $zoom_level
 | 
			
		||||
 * @property Account[]|Collection $accounts
 | 
			
		||||
 * @property null|int             $accounts_count
 | 
			
		||||
 * @property \Eloquent|Model      $locatable
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|Location newModelQuery()
 | 
			
		||||
 * @method static Builder|Location newQuery()
 | 
			
		||||
 * @method static Builder|Location query()
 | 
			
		||||
 * @method static Builder|Location whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|Location whereDeletedAt($value)
 | 
			
		||||
 * @method static Builder|Location whereId($value)
 | 
			
		||||
 * @method static Builder|Location whereLatitude($value)
 | 
			
		||||
 * @method static Builder|Location whereLocatableId($value)
 | 
			
		||||
 * @method static Builder|Location whereLocatableType($value)
 | 
			
		||||
 * @method static Builder|Location whereLongitude($value)
 | 
			
		||||
 * @method static Builder|Location whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|Location whereZoomLevel($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property Collection<int, TransactionJournal> $transactionJournals
 | 
			
		||||
 * @property null|int                            $transaction_journals_count
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperLocation
 | 
			
		||||
 */
 | 
			
		||||
class Location extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,44 +23,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Note
 | 
			
		||||
 *
 | 
			
		||||
 * @property int             $id
 | 
			
		||||
 * @property null|Carbon     $created_at
 | 
			
		||||
 * @property null|Carbon     $updated_at
 | 
			
		||||
 * @property null|Carbon     $deleted_at
 | 
			
		||||
 * @property int             $noteable_id
 | 
			
		||||
 * @property string          $noteable_type
 | 
			
		||||
 * @property null|string     $title
 | 
			
		||||
 * @property null|string     $text
 | 
			
		||||
 * @property \Eloquent|Model $noteable
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note newQuery()
 | 
			
		||||
 * @method static Builder|Note                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereNoteableId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereNoteableType($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereText($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereTitle($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Note whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|Note                               withTrashed()
 | 
			
		||||
 * @method static Builder|Note                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperNote
 | 
			
		||||
 */
 | 
			
		||||
class Note extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,53 +24,17 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\ObjectGroup
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                    $id
 | 
			
		||||
 * @property int                    $user_id
 | 
			
		||||
 * @property null|Carbon            $created_at
 | 
			
		||||
 * @property null|Carbon            $updated_at
 | 
			
		||||
 * @property null|Carbon            $deleted_at
 | 
			
		||||
 * @property string                 $title
 | 
			
		||||
 * @property int                    $order
 | 
			
		||||
 * @property Account[]|Collection   $accounts
 | 
			
		||||
 * @property null|int               $accounts_count
 | 
			
		||||
 * @property Bill[]|Collection      $bills
 | 
			
		||||
 * @property null|int               $bills_count
 | 
			
		||||
 * @property Collection|PiggyBank[] $piggyBanks
 | 
			
		||||
 * @property null|int               $piggy_banks_count
 | 
			
		||||
 * @property User                   $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|ObjectGroup newModelQuery()
 | 
			
		||||
 * @method static Builder|ObjectGroup newQuery()
 | 
			
		||||
 * @method static Builder|ObjectGroup query()
 | 
			
		||||
 * @method static Builder|ObjectGroup whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereDeletedAt($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereId($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereOrder($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereTitle($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|ObjectGroup whereUserId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|ObjectGroup whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperObjectGroup
 | 
			
		||||
 */
 | 
			
		||||
class ObjectGroup extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,67 +23,18 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\PiggyBank
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                              $id
 | 
			
		||||
 * @property null|Carbon                      $created_at
 | 
			
		||||
 * @property null|Carbon                      $updated_at
 | 
			
		||||
 * @property null|Carbon                      $deleted_at
 | 
			
		||||
 * @property int                              $account_id
 | 
			
		||||
 * @property string                           $name
 | 
			
		||||
 * @property string                           $targetamount
 | 
			
		||||
 * @property null|Carbon                      $startdate
 | 
			
		||||
 * @property null|Carbon                      $targetdate
 | 
			
		||||
 * @property int                              $order
 | 
			
		||||
 * @property bool                             $active
 | 
			
		||||
 * @property bool                             $encrypted
 | 
			
		||||
 * @property Account                          $account
 | 
			
		||||
 * @property Attachment[]|Collection          $attachments
 | 
			
		||||
 * @property null|int                         $attachments_count
 | 
			
		||||
 * @property Collection|Note[]                $notes
 | 
			
		||||
 * @property null|int                         $notes_count
 | 
			
		||||
 * @property Collection|ObjectGroup[]         $objectGroups
 | 
			
		||||
 * @property null|int                         $object_groups_count
 | 
			
		||||
 * @property Collection|PiggyBankEvent[]      $piggyBankEvents
 | 
			
		||||
 * @property null|int                         $piggy_bank_events_count
 | 
			
		||||
 * @property Collection|PiggyBankRepetition[] $piggyBankRepetitions
 | 
			
		||||
 * @property null|int                         $piggy_bank_repetitions_count
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank newQuery()
 | 
			
		||||
 * @method static Builder|PiggyBank                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereAccountId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereActive($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereEncrypted($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereOrder($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereStartdate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereTargetamount($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereTargetdate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|PiggyBank whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|PiggyBank                               withTrashed()
 | 
			
		||||
 * @method static Builder|PiggyBank                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperPiggyBank
 | 
			
		||||
 */
 | 
			
		||||
class PiggyBank extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,39 +23,13 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\PiggyBankEvent
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                     $id
 | 
			
		||||
 * @property null|Carbon             $created_at
 | 
			
		||||
 * @property null|Carbon             $updated_at
 | 
			
		||||
 * @property int                     $piggy_bank_id
 | 
			
		||||
 * @property null|int                $transaction_journal_id
 | 
			
		||||
 * @property Carbon                  $date
 | 
			
		||||
 * @property string                  $amount
 | 
			
		||||
 * @property PiggyBank               $piggyBank
 | 
			
		||||
 * @property null|TransactionJournal $transactionJournal
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|PiggyBankEvent newModelQuery()
 | 
			
		||||
 * @method static Builder|PiggyBankEvent newQuery()
 | 
			
		||||
 * @method static Builder|PiggyBankEvent query()
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereAmount($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereDate($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereId($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent wherePiggyBankId($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereTransactionJournalId($value)
 | 
			
		||||
 * @method static Builder|PiggyBankEvent whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperPiggyBankEvent
 | 
			
		||||
 */
 | 
			
		||||
class PiggyBankEvent extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,6 @@ declare(strict_types=1);
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
@@ -32,31 +31,7 @@ use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\PiggyBankRepetition
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property int         $piggy_bank_id
 | 
			
		||||
 * @property null|Carbon $startdate
 | 
			
		||||
 * @property null|Carbon $targetdate
 | 
			
		||||
 * @property string      $currentamount
 | 
			
		||||
 * @property PiggyBank   $piggyBank
 | 
			
		||||
 *
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition newModelQuery()
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition newQuery()
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition onDates(Carbon $start, Carbon $target)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition query()
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition relevantOnDate(Carbon $date)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereCreatedAt($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereCurrentamount($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereId($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition wherePiggyBankId($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereStartdate($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereTargetdate($value)
 | 
			
		||||
 * @method static EloquentBuilder|PiggyBankRepetition whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperPiggyBankRepetition
 | 
			
		||||
 */
 | 
			
		||||
class PiggyBankRepetition extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,40 +23,15 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Preference
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                        $id
 | 
			
		||||
 * @property null|Carbon                $created_at
 | 
			
		||||
 * @property null|Carbon                $updated_at
 | 
			
		||||
 * @property int                        $user_id
 | 
			
		||||
 * @property string                     $name
 | 
			
		||||
 * @property null|array|bool|int|string $data
 | 
			
		||||
 * @property User                       $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|Preference newModelQuery()
 | 
			
		||||
 * @method static Builder|Preference newQuery()
 | 
			
		||||
 * @method static Builder|Preference query()
 | 
			
		||||
 * @method static Builder|Preference whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|Preference whereData($value)
 | 
			
		||||
 * @method static Builder|Preference whereId($value)
 | 
			
		||||
 * @method static Builder|Preference whereName($value)
 | 
			
		||||
 * @method static Builder|Preference whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|Preference whereUserId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property mixed $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperPreference
 | 
			
		||||
 */
 | 
			
		||||
class Preference extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,78 +23,19 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Recurrence
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                                $id
 | 
			
		||||
 * @property null|Carbon                        $created_at
 | 
			
		||||
 * @property null|Carbon                        $updated_at
 | 
			
		||||
 * @property null|Carbon                        $deleted_at
 | 
			
		||||
 * @property int                                $user_id
 | 
			
		||||
 * @property int                                $transaction_type_id
 | 
			
		||||
 * @property string                             $title
 | 
			
		||||
 * @property string                             $description
 | 
			
		||||
 * @property null|Carbon                        $first_date
 | 
			
		||||
 * @property null|Carbon                        $repeat_until
 | 
			
		||||
 * @property null|Carbon                        $latest_date
 | 
			
		||||
 * @property int|string                         $repetitions
 | 
			
		||||
 * @property bool                               $apply_rules
 | 
			
		||||
 * @property bool                               $active
 | 
			
		||||
 * @property Attachment[]|Collection            $attachments
 | 
			
		||||
 * @property null|int                           $attachments_count
 | 
			
		||||
 * @property Collection|Note[]                  $notes
 | 
			
		||||
 * @property null|int                           $notes_count
 | 
			
		||||
 * @property Collection|RecurrenceMeta[]        $recurrenceMeta
 | 
			
		||||
 * @property null|int                           $recurrence_meta_count
 | 
			
		||||
 * @property Collection|RecurrenceRepetition[]  $recurrenceRepetitions
 | 
			
		||||
 * @property null|int                           $recurrence_repetitions_count
 | 
			
		||||
 * @property Collection|RecurrenceTransaction[] $recurrenceTransactions
 | 
			
		||||
 * @property null|int                           $recurrence_transactions_count
 | 
			
		||||
 * @property TransactionCurrency                $transactionCurrency
 | 
			
		||||
 * @property TransactionType                    $transactionType
 | 
			
		||||
 * @property User                               $user
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence newQuery()
 | 
			
		||||
 * @method static Builder|Recurrence                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereActive($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereApplyRules($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereDescription($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereFirstDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereLatestDate($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereRepeatUntil($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereRepetitions($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereTitle($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereTransactionTypeId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserId($value)
 | 
			
		||||
 * @method static Builder|Recurrence                               withTrashed()
 | 
			
		||||
 * @method static Builder|Recurrence                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property int $user_group_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|Recurrence whereUserGroupId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRecurrence
 | 
			
		||||
 */
 | 
			
		||||
class Recurrence extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,42 +23,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\RecurrenceMeta
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property null|Carbon $deleted_at
 | 
			
		||||
 * @property int         $recurrence_id
 | 
			
		||||
 * @property string      $name
 | 
			
		||||
 * @property mixed       $value
 | 
			
		||||
 * @property Recurrence  $recurrence
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta newQuery()
 | 
			
		||||
 * @method static Builder|RecurrenceMeta                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereRecurrenceId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceMeta whereValue($value)
 | 
			
		||||
 * @method static Builder|RecurrenceMeta                               withTrashed()
 | 
			
		||||
 * @method static Builder|RecurrenceMeta                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRecurrenceMeta
 | 
			
		||||
 */
 | 
			
		||||
class RecurrenceMeta extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,46 +23,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\RecurrenceRepetition
 | 
			
		||||
 *
 | 
			
		||||
 * @property int         $id
 | 
			
		||||
 * @property null|Carbon $created_at
 | 
			
		||||
 * @property null|Carbon $updated_at
 | 
			
		||||
 * @property null|Carbon $deleted_at
 | 
			
		||||
 * @property int         $recurrence_id
 | 
			
		||||
 * @property string      $repetition_type
 | 
			
		||||
 * @property string      $repetition_moment
 | 
			
		||||
 * @property int         $repetition_skip
 | 
			
		||||
 * @property int         $weekend
 | 
			
		||||
 * @property Recurrence  $recurrence
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition newQuery()
 | 
			
		||||
 * @method static Builder|RecurrenceRepetition                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRecurrenceId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionMoment($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionSkip($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereRepetitionType($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceRepetition whereWeekend($value)
 | 
			
		||||
 * @method static Builder|RecurrenceRepetition                               withTrashed()
 | 
			
		||||
 * @method static Builder|RecurrenceRepetition                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRecurrenceRepetition
 | 
			
		||||
 */
 | 
			
		||||
class RecurrenceRepetition extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,67 +23,15 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\RecurrenceTransaction
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                                    $id
 | 
			
		||||
 * @property null|Carbon                            $created_at
 | 
			
		||||
 * @property null|Carbon                            $updated_at
 | 
			
		||||
 * @property null|Carbon                            $deleted_at
 | 
			
		||||
 * @property int                                    $recurrence_id
 | 
			
		||||
 * @property int                                    $transaction_currency_id
 | 
			
		||||
 * @property null|int|string                        $foreign_currency_id
 | 
			
		||||
 * @property int                                    $source_id
 | 
			
		||||
 * @property int                                    $destination_id
 | 
			
		||||
 * @property string                                 $amount
 | 
			
		||||
 * @property string                                 $foreign_amount
 | 
			
		||||
 * @property string                                 $description
 | 
			
		||||
 * @property Account                                $destinationAccount
 | 
			
		||||
 * @property null|TransactionCurrency               $foreignCurrency
 | 
			
		||||
 * @property Recurrence                             $recurrence
 | 
			
		||||
 * @property Collection|RecurrenceTransactionMeta[] $recurrenceTransactionMeta
 | 
			
		||||
 * @property null|int                               $recurrence_transaction_meta_count
 | 
			
		||||
 * @property Account                                $sourceAccount
 | 
			
		||||
 * @property TransactionCurrency                    $transactionCurrency
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction newQuery()
 | 
			
		||||
 * @method static Builder|RecurrenceTransaction                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereAmount($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDescription($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereDestinationId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereForeignAmount($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereForeignCurrencyId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereRecurrenceId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereSourceId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionCurrencyId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereUpdatedAt($value)
 | 
			
		||||
 * @method static Builder|RecurrenceTransaction                               withTrashed()
 | 
			
		||||
 * @method static Builder|RecurrenceTransaction                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @property null|int $transaction_type_id
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransaction whereTransactionTypeId($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @property null|TransactionType $transactionType
 | 
			
		||||
 * @property mixed                $user_id
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRecurrenceTransaction
 | 
			
		||||
 */
 | 
			
		||||
class RecurrenceTransaction extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,42 +23,14 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use Illuminate\Database\Eloquent\Casts\Attribute;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
use Illuminate\Database\Query\Builder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\RecurrenceTransactionMeta
 | 
			
		||||
 *
 | 
			
		||||
 * @property int                   $id
 | 
			
		||||
 * @property null|Carbon           $created_at
 | 
			
		||||
 * @property null|Carbon           $updated_at
 | 
			
		||||
 * @property null|Carbon           $deleted_at
 | 
			
		||||
 * @property int|string            $rt_id
 | 
			
		||||
 * @property string                $name
 | 
			
		||||
 * @property mixed                 $value
 | 
			
		||||
 * @property RecurrenceTransaction $recurrenceTransaction
 | 
			
		||||
 *
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newModelQuery()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta newQuery()
 | 
			
		||||
 * @method static Builder|RecurrenceTransactionMeta                               onlyTrashed()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta query()
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereCreatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereDeletedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereName($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereRtId($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereUpdatedAt($value)
 | 
			
		||||
 * @method static \Illuminate\Database\Eloquent\Builder|RecurrenceTransactionMeta whereValue($value)
 | 
			
		||||
 * @method static Builder|RecurrenceTransactionMeta                               withTrashed()
 | 
			
		||||
 * @method static Builder|RecurrenceTransactionMeta                               withoutTrashed()
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRecurrenceTransactionMeta
 | 
			
		||||
 */
 | 
			
		||||
class RecurrenceTransactionMeta extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -23,38 +23,13 @@ declare(strict_types=1);
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use Carbon\Carbon;
 | 
			
		||||
use Eloquent;
 | 
			
		||||
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
 | 
			
		||||
use FireflyIII\User;
 | 
			
		||||
use Illuminate\Database\Eloquent\Builder;
 | 
			
		||||
use Illuminate\Database\Eloquent\Collection;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * FireflyIII\Models\Role
 | 
			
		||||
 *
 | 
			
		||||
 * @property int               $id
 | 
			
		||||
 * @property null|Carbon       $created_at
 | 
			
		||||
 * @property null|Carbon       $updated_at
 | 
			
		||||
 * @property string            $name
 | 
			
		||||
 * @property null|string       $display_name
 | 
			
		||||
 * @property null|string       $description
 | 
			
		||||
 * @property Collection|User[] $users
 | 
			
		||||
 * @property null|int          $users_count
 | 
			
		||||
 *
 | 
			
		||||
 * @method static Builder|Role newModelQuery()
 | 
			
		||||
 * @method static Builder|Role newQuery()
 | 
			
		||||
 * @method static Builder|Role query()
 | 
			
		||||
 * @method static Builder|Role whereCreatedAt($value)
 | 
			
		||||
 * @method static Builder|Role whereDescription($value)
 | 
			
		||||
 * @method static Builder|Role whereDisplayName($value)
 | 
			
		||||
 * @method static Builder|Role whereId($value)
 | 
			
		||||
 * @method static Builder|Role whereName($value)
 | 
			
		||||
 * @method static Builder|Role whereUpdatedAt($value)
 | 
			
		||||
 *
 | 
			
		||||
 * @mixin Eloquent
 | 
			
		||||
 * @mixin IdeHelperRole
 | 
			
		||||
 */
 | 
			
		||||
class Role extends Model
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user