Merge pull request #7217 from firefly-iii/v604

v604 into develop
This commit is contained in:
James Cole
2023-03-12 18:24:40 +01:00
committed by GitHub
7 changed files with 32 additions and 20 deletions

View File

@@ -203,6 +203,8 @@ trait TransactionValidation
Log::debug(sprintf('Source account expects %s', $sourceCurrency->code));
Log::debug(sprintf('Destination account expects %s', $destinationCurrency->code));
Log::debug(sprintf('Amount is %s', $transaction['amount']));
if (TransactionType::DEPOSIT === ucfirst($transactionType)) {
Log::debug(sprintf('Processing as a "%s"', $transactionType));
// use case: deposit from liability account to an asset account
@@ -219,7 +221,7 @@ trait TransactionValidation
$foreignCurrencyCode = $transaction['foreign_currency_code'] ?? false;
$foreignCurrencyId = (int)($transaction['foreign_currency_id'] ?? 0);
Log::debug(sprintf('Foreign currency code seems to be #%d "%s"', $foreignCurrencyId, $foreignCurrencyCode), $transaction);
if ($foreignCurrencyCode !== $sourceCurrency->code && $foreignCurrencyId !== $sourceCurrency->id) {
if ($foreignCurrencyCode !== $sourceCurrency->code && $foreignCurrencyId !== (int)$sourceCurrency->id) {
$validator->errors()->add(sprintf('transactions.%d.foreign_currency_code', $index), (string)trans('validation.require_foreign_src'));
return;
}
@@ -244,7 +246,9 @@ trait TransactionValidation
$foreignCurrencyCode = $transaction['foreign_currency_code'] ?? false;
$foreignCurrencyId = (int)($transaction['foreign_currency_id'] ?? 0);
Log::debug(sprintf('Foreign currency code seems to be #%d "%s"', $foreignCurrencyId, $foreignCurrencyCode), $transaction);
if ($foreignCurrencyCode !== $destinationCurrency->code && $foreignCurrencyId !== $destinationCurrency->id) {
if ($foreignCurrencyCode !== $destinationCurrency->code && $foreignCurrencyId !== (int)$destinationCurrency->id) {
Log::debug(sprintf('No match on code, "%s" vs "%s"', $foreignCurrencyCode, $destinationCurrency->code));
Log::debug(sprintf('No match on ID, #%d vs #%d', $foreignCurrencyId, $destinationCurrency->id));
$validator->errors()->add(sprintf('transactions.%d.foreign_amount', $index), (string)trans('validation.require_foreign_dest'));
}
}

View File

@@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## v6.0.4 - 2023-03-13
### Fixed
- [Issue 7214](https://github.com/firefly-iii/firefly-iii/issues/7214) Import issue blocking multi currency transactions
## v6.0.3 - 2023-03-13
### Fixed

29
composer.lock generated
View File

@@ -2868,34 +2868,37 @@
},
{
"name": "league/csv",
"version": "9.8.0",
"version": "9.9.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/csv.git",
"reference": "9d2e0265c5d90f5dd601bc65ff717e05cec19b47"
"reference": "b4418ede47fbd88facc34e40a16c8ce9153b961b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/csv/zipball/9d2e0265c5d90f5dd601bc65ff717e05cec19b47",
"reference": "9d2e0265c5d90f5dd601bc65ff717e05cec19b47",
"url": "https://api.github.com/repos/thephpleague/csv/zipball/b4418ede47fbd88facc34e40a16c8ce9153b961b",
"reference": "b4418ede47fbd88facc34e40a16c8ce9153b961b",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"php": "^7.4 || ^8.0"
"php": "^8.1.2"
},
"require-dev": {
"ext-curl": "*",
"doctrine/collections": "^2.1.2",
"ext-dom": "*",
"friendsofphp/php-cs-fixer": "^v3.4.0",
"phpstan/phpstan": "^1.3.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.1.0",
"phpunit/phpunit": "^9.5.11"
"ext-xdebug": "*",
"friendsofphp/php-cs-fixer": "^v3.14.3",
"phpbench/phpbench": "^1.2.8",
"phpstan/phpstan": "^1.10.4",
"phpstan/phpstan-deprecation-rules": "^1.1.2",
"phpstan/phpstan-phpunit": "^1.3.10",
"phpstan/phpstan-strict-rules": "^1.5.0",
"phpunit/phpunit": "^10.0.14"
},
"suggest": {
"ext-dom": "Required to use the XMLConverter and or the HTMLConverter classes",
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters"
},
"type": "library",
@@ -2948,7 +2951,7 @@
"type": "github"
}
],
"time": "2022-01-04T00:13:07+00:00"
"time": "2023-03-11T15:57:12+00:00"
},
{
"name": "league/event",

View File

@@ -107,7 +107,7 @@ return [
'webhooks' => true,
'handle_debts' => true,
],
'version' => '6.0.3',
'version' => '6.0.4',
'api_version' => '2.0.1',
'db_version' => 19,

View File

@@ -338,7 +338,7 @@ page container: q-ma-xs (margin all, xs) AND q-mb-md to give the page content so
<q-footer class="bg-grey-8 text-white" bordered>
<q-toolbar>
<div>
<small>Firefly III v v6.0.3 &copy; James Cole, AGPL-3.0-or-later.</small>
<small>Firefly III v v6.0.4 &copy; James Cole, AGPL-3.0-or-later.</small>
</div>
</q-toolbar>
</q-footer>

View File

@@ -648,10 +648,10 @@ return [
'search_modifier_updated_at_after_day' => 'La transacción se actualizó por última vez en o después día del mes ":value"',
'search_modifier_created_at_on_year' => 'La transacción fue creada en el año":value"',
'search_modifier_created_at_on_month' => 'La transacción fue creada en el mes ":value"',
'search_modifier_created_at_on_day' => 'Transaction was created on day of month ":value"',
'search_modifier_created_at_on_day' => 'La transacción fue creada en el día del mes ":value"',
'search_modifier_not_created_at_on_year' => 'La transacción no fue creada en el año ":value"',
'search_modifier_not_created_at_on_month' => 'La transacción no fue creada en el mes ":value"',
'search_modifier_not_created_at_on_day' => 'Transaction was not created on day of month ":value"',
'search_modifier_not_created_at_on_day' => 'La transacción no fue creada en el día del mes ":value"',
'search_modifier_created_at_before_year' => 'Transaction was created in or before year ":value"',
'search_modifier_created_at_before_month' => 'Transaction was created in or before month ":value"',
'search_modifier_created_at_before_day' => 'Transaction was created on or before day of month ":value"',

View File

@@ -12,6 +12,6 @@ sonar.organization=firefly-iii
#sonar.sourceEncoding=UTF-8
sonar.projectVersion=6.0.3
sonar.projectVersion=6.0.4
sonar.sources=app,bootstrap,database,resources/assets,resources/views,routes,tests
sonar.sourceEncoding=UTF-8