Compare commits

..

20 Commits

Author SHA1 Message Date
github-actions
119b9920a6 Auto commit for release 'develop' on 2024-05-30 2024-05-30 05:48:54 +02:00
James Cole
2ea57cdd38 Merge pull request #8930 from stevewasiura/patch-2
icon title chgd from Deposit to Transfer
2024-05-29 18:00:47 +02:00
James Cole
bb94bdfdaf Merge pull request #8929 from stevewasiura/patch-1
icon title chgd from Deposit to Transfer
2024-05-29 17:59:49 +02:00
Steve Wasiura
4de8398cc2 icon title chgd from Deposit to Transfer
Signed-off-by: Steve Wasiura <steve@waztech.com>
2024-05-29 09:20:39 -04:00
Steve Wasiura
e6e8cd5d8a icon title chgd from Deposit to Transfer
Signed-off-by: Steve Wasiura <steve@waztech.com>
2024-05-29 09:15:53 -04:00
James Cole
0b200309ba Catch empty strings 2024-05-28 05:53:17 +02:00
github-actions
a184548912 Auto commit for release 'develop' on 2024-05-27 2024-05-27 05:08:44 +02:00
James Cole
c987191212 Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop
# Conflicts:
#	app/Console/Commands/Upgrade/CorrectAccountBalance.php
2024-05-26 15:37:20 +02:00
James Cole
7009b444d9 Skip creation using if statement. 2024-05-26 15:36:30 +02:00
github-actions
06551d5367 Auto commit for release 'develop' on 2024-05-25 2024-05-25 20:18:23 +02:00
James Cole
a20622ac0c Fix https://github.com/firefly-iii/firefly-iii/issues/8911 2024-05-25 11:28:32 +02:00
James Cole
ca38117fca Fix https://github.com/firefly-iii/firefly-iii/issues/8907 2024-05-25 08:10:23 +02:00
James Cole
9478f78d4f Merge branch 'main' into develop 2024-05-25 08:05:45 +02:00
James Cole
5c2397bbae Remove unused workflows. 2024-05-25 08:05:32 +02:00
James Cole
92fefef816 Merge branch 'main' into develop 2024-05-24 05:30:29 +02:00
James Cole
d3ced65524 Remove 2024-05-24 05:30:17 +02:00
James Cole
29eb748831 Merge branch 'main' into develop 2024-05-24 05:22:57 +02:00
James Cole
252076ec1f Add to cleanup 2024-05-22 06:12:19 +02:00
James Cole
bbec28591f Add workflow that responds to PRs 2024-05-22 06:02:49 +02:00
James Cole
075a360ba6 Add new workflow for issue thing. 2024-05-21 20:20:06 +02:00
21 changed files with 716 additions and 665 deletions

View File

@@ -72,16 +72,16 @@
},
{
"name": "composer/pcre",
"version": "3.1.3",
"version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
"reference": "04229f163664973f68f38f6f73d917799168ef24"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
"url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24",
"reference": "04229f163664973f68f38f6f73d917799168ef24",
"shasum": ""
},
"require": {
@@ -123,7 +123,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.1.4"
},
"funding": [
{
@@ -139,7 +139,7 @@
"type": "tidelift"
}
],
"time": "2024-03-19T10:26:25+00:00"
"time": "2024-05-27T13:40:54+00:00"
},
{
"name": "composer/semver",
@@ -398,16 +398,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.57.2",
"version": "v3.58.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c"
"reference": "04e9424025677a86914b9a4944dbbf4060bb0aff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/22f7f3145606df92b02fb1bd22c30abfce956d3c",
"reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/04e9424025677a86914b9a4944dbbf4060bb0aff",
"reference": "04e9424025677a86914b9a4944dbbf4060bb0aff",
"shasum": ""
},
"require": {
@@ -486,7 +486,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.2"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.58.1"
},
"funding": [
{
@@ -494,7 +494,7 @@
"type": "github"
}
],
"time": "2024-05-20T20:41:57+00:00"
"time": "2024-05-29T16:39:07+00:00"
},
{
"name": "psr/container",
@@ -950,16 +950,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 +1011,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,7 +1019,7 @@
"type": "open_collective"
}
],
"time": "2023-11-16T16:21:57+00:00"
"time": "2024-05-24T10:39:05+00:00"
},
{
"name": "react/socket",

View File

@@ -4,6 +4,7 @@ Over time, many people have contributed to Firefly III. Their efforts are not al
Please find below all the people who contributed to the Firefly III code. Their names are mentioned in the year of their first contribution.
## 2024
- Steve Wasiura
- imlonghao
- Rahman Yusuf
- Michael Thomas

View File

@@ -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();
}
}

View File

@@ -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));

View File

@@ -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.

View File

@@ -0,0 +1,69 @@
<?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->correctBalanceAmounts();
$this->markAsExecuted();
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);
}
}

View File

@@ -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',

View File

@@ -93,7 +93,6 @@ 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');
try {

View File

@@ -120,13 +120,13 @@ class AccountBalanceCalculator
// first create for normal currency:
$entry = $this->getAccountBalanceByAccount($account, $transactionCurrency);
$entry->balance = bcadd($entry->balance, $sumAmount);
$entry->balance = bcadd((string) $entry->balance, $sumAmount);
$entry->save();
// then do foreign amount, if present:
if ($foreignCurrency > 0) {
$entry = $this->getAccountBalanceByAccount($account, $foreignCurrency);
$entry->balance = bcadd($entry->balance, $sumForeignAmount);
$entry->balance = bcadd((string) $entry->balance, $sumForeignAmount);
$entry->save();
}
}

109
composer.lock generated
View File

@@ -2286,16 +2286,16 @@
},
{
"name": "laravel/framework",
"version": "v11.8.0",
"version": "v11.9.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "ceb892a25817c888ef3df4d1a2af9cac53978300"
"reference": "60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/ceb892a25817c888ef3df4d1a2af9cac53978300",
"reference": "ceb892a25817c888ef3df4d1a2af9cac53978300",
"url": "https://api.github.com/repos/laravel/framework/zipball/60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7",
"reference": "60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7",
"shasum": ""
},
"require": {
@@ -2487,7 +2487,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2024-05-21T17:57:45+00:00"
"time": "2024-05-28T18:16:41+00:00"
},
{
"name": "laravel/passport",
@@ -2567,16 +2567,16 @@
},
{
"name": "laravel/prompts",
"version": "v0.1.22",
"version": "v0.1.23",
"source": {
"type": "git",
"url": "https://github.com/laravel/prompts.git",
"reference": "37f94de71758dbfbccc9d299b0e5eb76e02a40f5"
"reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/37f94de71758dbfbccc9d299b0e5eb76e02a40f5",
"reference": "37f94de71758dbfbccc9d299b0e5eb76e02a40f5",
"url": "https://api.github.com/repos/laravel/prompts/zipball/9bc4df7c699b0452c6b815e64a2d84b6d7f99400",
"reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400",
"shasum": ""
},
"require": {
@@ -2619,9 +2619,9 @@
"description": "Add beautiful and user-friendly forms to your command-line applications.",
"support": {
"issues": "https://github.com/laravel/prompts/issues",
"source": "https://github.com/laravel/prompts/tree/v0.1.22"
"source": "https://github.com/laravel/prompts/tree/v0.1.23"
},
"time": "2024-05-10T19:22:18+00:00"
"time": "2024-05-27T13:53:20+00:00"
},
{
"name": "laravel/sanctum",
@@ -3202,40 +3202,39 @@
},
{
"name": "league/csv",
"version": "9.15.0",
"version": "9.16.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/csv.git",
"reference": "fa7e2441c0bc9b2360f4314fd6c954f7ff40d435"
"reference": "998280c6c34bd67d8125fdc8b45bae28d761b440"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/csv/zipball/fa7e2441c0bc9b2360f4314fd6c954f7ff40d435",
"reference": "fa7e2441c0bc9b2360f4314fd6c954f7ff40d435",
"url": "https://api.github.com/repos/thephpleague/csv/zipball/998280c6c34bd67d8125fdc8b45bae28d761b440",
"reference": "998280c6c34bd67d8125fdc8b45bae28d761b440",
"shasum": ""
},
"require": {
"ext-filter": "*",
"ext-json": "*",
"ext-mbstring": "*",
"php": "^8.1.2"
},
"require-dev": {
"doctrine/collections": "^2.1.4",
"doctrine/collections": "^2.2.2",
"ext-dom": "*",
"ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^v3.22.0",
"friendsofphp/php-cs-fixer": "^3.57.1",
"phpbench/phpbench": "^1.2.15",
"phpstan/phpstan": "^1.10.57",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15",
"phpstan/phpstan-strict-rules": "^1.5.2",
"phpunit/phpunit": "^10.5.9",
"symfony/var-dumper": "^6.4.2"
"phpstan/phpstan": "^1.11.1",
"phpstan/phpstan-deprecation-rules": "^1.2.0",
"phpstan/phpstan-phpunit": "^1.4.0",
"phpstan/phpstan-strict-rules": "^1.6.0",
"phpunit/phpunit": "^10.5.16 || ^11.1.3",
"symfony/var-dumper": "^6.4.6 || ^7.0.7"
},
"suggest": {
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters"
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters",
"ext-mbstring": "Needed to ease transcoding CSV using mb stream filters"
},
"type": "library",
"extra": {
@@ -3287,7 +3286,7 @@
"type": "github"
}
],
"time": "2024-02-20T20:00:00+00:00"
"time": "2024-05-24T11:04:54+00:00"
},
{
"name": "league/event",
@@ -3966,16 +3965,16 @@
},
{
"name": "nesbot/carbon",
"version": "3.3.1",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a"
"reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a",
"reference": "8ff64b92c1b1ec84fcde9f8bb9ff2ca34cb8a77a",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8eab8983c83c30e0bacbef8d311e3f3b8172727f",
"reference": "8eab8983c83c30e0bacbef8d311e3f3b8172727f",
"shasum": ""
},
"require": {
@@ -4068,7 +4067,7 @@
"type": "tidelift"
}
],
"time": "2024-05-01T06:54:22+00:00"
"time": "2024-05-24T14:26:34+00:00"
},
{
"name": "nette/schema",
@@ -5917,16 +5916,16 @@
},
{
"name": "spatie/ignition",
"version": "1.14.1",
"version": "1.14.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/ignition.git",
"reference": "c23cc018c5f423d2f413b99f84655fceb6549811"
"reference": "5e11c11f675bb5251f061491a493e04a1a571532"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/ignition/zipball/c23cc018c5f423d2f413b99f84655fceb6549811",
"reference": "c23cc018c5f423d2f413b99f84655fceb6549811",
"url": "https://api.github.com/repos/spatie/ignition/zipball/5e11c11f675bb5251f061491a493e04a1a571532",
"reference": "5e11c11f675bb5251f061491a493e04a1a571532",
"shasum": ""
},
"require": {
@@ -5996,7 +5995,7 @@
"type": "github"
}
],
"time": "2024-05-03T15:56:16+00:00"
"time": "2024-05-29T08:10:20+00:00"
},
{
"name": "spatie/laravel-html",
@@ -9867,16 +9866,16 @@
},
{
"name": "composer/pcre",
"version": "3.1.3",
"version": "3.1.4",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8"
"reference": "04229f163664973f68f38f6f73d917799168ef24"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
"reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8",
"url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24",
"reference": "04229f163664973f68f38f6f73d917799168ef24",
"shasum": ""
},
"require": {
@@ -9918,7 +9917,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.1.4"
},
"funding": [
{
@@ -9934,7 +9933,7 @@
"type": "tidelift"
}
],
"time": "2024-03-19T10:26:25+00:00"
"time": "2024-05-27T13:40:54+00:00"
},
{
"name": "doctrine/deprecations",
@@ -10171,16 +10170,16 @@
},
{
"name": "larastan/larastan",
"version": "v2.9.6",
"version": "v2.9.7",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
"reference": "93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f"
"reference": "5c805f636095cc2e0b659e3954775cf8f1dad1bb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f",
"reference": "93d5b95d2e29cdb8203363d44abfdbc0bc7ef57f",
"url": "https://api.github.com/repos/larastan/larastan/zipball/5c805f636095cc2e0b659e3954775cf8f1dad1bb",
"reference": "5c805f636095cc2e0b659e3954775cf8f1dad1bb",
"shasum": ""
},
"require": {
@@ -10194,7 +10193,7 @@
"illuminate/support": "^9.52.16 || ^10.28.0 || ^11.0",
"php": "^8.0.2",
"phpmyadmin/sql-parser": "^5.9.0",
"phpstan/phpstan": "^1.10.66"
"phpstan/phpstan": "^1.11.1"
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
@@ -10249,7 +10248,7 @@
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
"source": "https://github.com/larastan/larastan/tree/v2.9.6"
"source": "https://github.com/larastan/larastan/tree/v2.9.7"
},
"funding": [
{
@@ -10269,7 +10268,7 @@
"type": "patreon"
}
],
"time": "2024-05-09T11:53:26+00:00"
"time": "2024-05-27T18:33:26+00:00"
},
{
"name": "laravel-json-api/testing",
@@ -11014,16 +11013,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.11.1",
"version": "1.11.2",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b"
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b",
"reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d5d4294a70deb7547db655c47685d680e39cfec",
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec",
"shasum": ""
},
"require": {
@@ -11068,7 +11067,7 @@
"type": "github"
}
],
"time": "2024-05-15T08:00:59+00:00"
"time": "2024-05-24T13:23:04+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",

View File

@@ -117,7 +117,7 @@ return [
'expression_engine' => false,
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2024-05-23',
'version' => 'develop/2024-05-30',
'api_version' => '2.1.0',
'db_version' => 24,

View File

@@ -49,10 +49,12 @@ class AccountTypeSeeder extends Seeder
AccountType::LIABILITY_CREDIT,
];
foreach ($types as $type) {
try {
AccountType::create(['type' => $type]);
} catch (\PDOException $e) {
// @ignoreException
if (null === AccountType::where('type', $type)->first()) {
try {
AccountType::create(['type' => $type]);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

View File

@@ -36,7 +36,7 @@ class ConfigSeeder extends Seeder
*/
public function run(): void
{
$entry = Configuration::where('name', 'db_version')->first();
$entry = Configuration::where('name', 'db_version')->first();
if (null === $entry) {
Configuration::create(
[
@@ -44,11 +44,11 @@ class ConfigSeeder extends Seeder
'data' => 1,
]
);
return;
}
if (null !== $entry) {
$version = (int)config('firefly.db_version');
$entry->data = $version;
$entry->save();
}
$version = (int) config('firefly.db_version');
$entry->data = $version;
$entry->save();
}
}

View File

@@ -60,10 +60,12 @@ class LinkTypeSeeder extends Seeder
],
];
foreach ($types as $type) {
try {
LinkType::create($type);
} catch (\PDOException $e) {
// @ignoreException
if (null === LinkType::where('name', $type['name'])->first()) {
try {
LinkType::create($type);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

View File

@@ -46,10 +46,12 @@ class PermissionSeeder extends Seeder
],
];
foreach ($roles as $role) {
try {
Role::create($role);
} catch (\PDOException $e) {
// @ignoreException
if (null === Role::where('name', $role['name'])->first()) {
try {
Role::create($role);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

View File

@@ -71,10 +71,12 @@ class TransactionCurrencySeeder extends Seeder
$currencies[] = ['code' => 'HRK', 'name' => 'Croatian kuna', 'symbol' => 'kn', 'decimal_places' => 2];
foreach ($currencies as $currency) {
try {
TransactionCurrency::create($currency);
} catch (\PDOException $e) {
// @ignoreException
if (null === TransactionCurrency::where('code', $currency['code'])->first()) {
try {
TransactionCurrency::create($currency);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

View File

@@ -44,10 +44,12 @@ class TransactionTypeSeeder extends Seeder
];
foreach ($types as $type) {
try {
TransactionType::create(['type' => $type]);
} catch (\PDOException $e) {
// @ignoreException
if (null === TransactionType::where('type', $type)->first()) {
try {
TransactionType::create(['type' => $type]);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

View File

@@ -45,10 +45,12 @@ class UserRoleSeeder extends Seeder
/** @var string $role */
foreach ($roles as $role) {
try {
UserRole::create(['title' => $role]);
} catch (\PDOException $e) {
// @ignoreException
if (null === UserRole::where('title', $role)->first()) {
try {
UserRole::create(['title' => $role]);
} catch (\PDOException $e) {
// @ignoreException
}
}
}
}

1047
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -78,7 +78,7 @@
{% endif %}
{% if journal.transaction_type_type == 'Transfer' %}
<span class="fa fa-exchange fa-fw" title="{{ trans('firefly.Deposit') }}"></span>
<span class="fa fa-exchange fa-fw" title="{{ trans('firefly.Transfer') }}"></span>
{% endif %}
{% if journal.transaction_type_type == 'Reconciliation' %}

View File

@@ -47,7 +47,7 @@
{% endif %}
{% if transaction.transaction_type_type == 'Transfer' %}
<span class="fa fa-exchange fa-fw" title="{{ trans('firefly.Deposit') }}"></span>
<span class="fa fa-exchange fa-fw" title="{{ trans('firefly.Transfer') }}"></span>
{% endif %}
{% if transaction.transaction_type_type == 'Reconciliation' %}