Merge pull request #10721 from firefly-iii/release-1754589876

🤖 Automatically merge the PR into the develop branch.
This commit is contained in:
github-actions[bot]
2025-08-07 20:04:43 +02:00
committed by GitHub
13 changed files with 125 additions and 116 deletions

View File

@@ -307,9 +307,9 @@ class BudgetController extends Controller
foreach ($budget['transaction_journals'] as $journal) { foreach ($budget['transaction_journals'] as $journal) {
// #10678 // #10678
// skip transactions between two asset / liability accounts. // skip transactions between two asset / liability accounts.
if( if (
in_array($journal['source_account_type'], config('firefly.valid_currency_account_types')) && in_array($journal['source_account_type'], config('firefly.valid_currency_account_types'), true)
in_array($journal['destination_account_type'], config('firefly.valid_currency_account_types')) && in_array($journal['destination_account_type'], config('firefly.valid_currency_account_types'), true)
) { ) {
continue; continue;
} }

View File

@@ -140,7 +140,8 @@ class AccountEnrichment implements EnrichmentInterface
{ {
$set = AccountMeta::whereIn('name', ['is_multi_currency', 'include_net_worth', 'currency_id', 'account_role', 'account_number', 'BIC', 'liability_direction', 'interest', 'interest_period', 'current_debt']) $set = AccountMeta::whereIn('name', ['is_multi_currency', 'include_net_worth', 'currency_id', 'account_role', 'account_number', 'BIC', 'liability_direction', 'interest', 'interest_period', 'current_debt'])
->whereIn('account_id', $this->ids) ->whereIn('account_id', $this->ids)
->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data'])->toArray(); ->get(['account_meta.id', 'account_meta.account_id', 'account_meta.name', 'account_meta.data'])->toArray()
;
/** @var array $entry */ /** @var array $entry */
foreach ($set as $entry) { foreach ($set as $entry) {
@@ -168,7 +169,8 @@ class AccountEnrichment implements EnrichmentInterface
$notes = Note::query()->whereIn('noteable_id', $this->ids) $notes = Note::query()->whereIn('noteable_id', $this->ids)
->whereNotNull('notes.text') ->whereNotNull('notes.text')
->where('notes.text', '!=', '') ->where('notes.text', '!=', '')
->where('noteable_type', Account::class)->get(['notes.noteable_id', 'notes.text'])->toArray(); ->where('noteable_type', Account::class)->get(['notes.noteable_id', 'notes.text'])->toArray()
;
foreach ($notes as $note) { foreach ($notes as $note) {
$this->notes[(int)$note['noteable_id']] = (string)$note['text']; $this->notes[(int)$note['noteable_id']] = (string)$note['text'];
} }
@@ -178,7 +180,8 @@ class AccountEnrichment implements EnrichmentInterface
private function collectLocations(): void private function collectLocations(): void
{ {
$locations = Location::query()->whereIn('locatable_id', $this->ids) $locations = Location::query()->whereIn('locatable_id', $this->ids)
->where('locatable_type', Account::class)->get(['locations.locatable_id', 'locations.latitude', 'locations.longitude', 'locations.zoom_level'])->toArray(); ->where('locatable_type', Account::class)->get(['locations.locatable_id', 'locations.latitude', 'locations.longitude', 'locations.zoom_level'])->toArray()
;
foreach ($locations as $location) { foreach ($locations as $location) {
$this->locations[(int)$location['locatable_id']] $this->locations[(int)$location['locatable_id']]
= [ = [
@@ -200,7 +203,8 @@ class AccountEnrichment implements EnrichmentInterface
->setUserGroup($this->userGroup) ->setUserGroup($this->userGroup)
->setAccounts($this->collection) ->setAccounts($this->collection)
->withAccountInformation() ->withAccountInformation()
->setTypes([TransactionTypeEnum::OPENING_BALANCE->value]); ->setTypes([TransactionTypeEnum::OPENING_BALANCE->value])
;
$journals = $collector->getExtractedJournals(); $journals = $collector->getExtractedJournals();
foreach ($journals as $journal) { foreach ($journals as $journal) {
$this->openingBalances[(int)$journal['source_account_id']] $this->openingBalances[(int)$journal['source_account_id']]
@@ -355,7 +359,8 @@ class AccountEnrichment implements EnrichmentInterface
$set = DB::table('object_groupables') $set = DB::table('object_groupables')
->whereIn('object_groupable_id', $this->ids) ->whereIn('object_groupable_id', $this->ids)
->where('object_groupable_type', Account::class) ->where('object_groupable_type', Account::class)
->get(['object_groupable_id', 'object_group_id']); ->get(['object_groupable_id', 'object_group_id'])
;
$ids = array_unique($set->pluck('object_group_id')->toArray()); $ids = array_unique($set->pluck('object_group_id')->toArray());

View File

@@ -91,7 +91,8 @@ class BudgetEnrichment implements EnrichmentInterface
$notes = Note::query()->whereIn('noteable_id', $this->ids) $notes = Note::query()->whereIn('noteable_id', $this->ids)
->whereNotNull('notes.text') ->whereNotNull('notes.text')
->where('notes.text', '!=', '') ->where('notes.text', '!=', '')
->where('noteable_type', Budget::class)->get(['notes.noteable_id', 'notes.text'])->toArray(); ->where('noteable_type', Budget::class)->get(['notes.noteable_id', 'notes.text'])->toArray()
;
foreach ($notes as $note) { foreach ($notes as $note) {
$this->notes[(int)$note['noteable_id']] = (string)$note['text']; $this->notes[(int)$note['noteable_id']] = (string)$note['text'];
} }
@@ -178,7 +179,8 @@ class BudgetEnrichment implements EnrichmentInterface
$set = DB::table('object_groupables') $set = DB::table('object_groupables')
->whereIn('object_groupable_id', $this->ids) ->whereIn('object_groupable_id', $this->ids)
->where('object_groupable_type', Budget::class) ->where('object_groupable_type', Budget::class)
->get(['object_groupable_id', 'object_group_id']); ->get(['object_groupable_id', 'object_group_id'])
;
$ids = array_unique($set->pluck('object_group_id')->toArray()); $ids = array_unique($set->pluck('object_group_id')->toArray());

View File

@@ -94,7 +94,8 @@ class BudgetLimitEnrichment implements EnrichmentInterface
$notes = Note::query()->whereIn('noteable_id', $this->ids) $notes = Note::query()->whereIn('noteable_id', $this->ids)
->whereNotNull('notes.text') ->whereNotNull('notes.text')
->where('notes.text', '!=', '') ->where('notes.text', '!=', '')
->where('noteable_type', BudgetLimit::class)->get(['notes.noteable_id', 'notes.text'])->toArray(); ->where('noteable_type', BudgetLimit::class)->get(['notes.noteable_id', 'notes.text'])->toArray()
;
foreach ($notes as $note) { foreach ($notes as $note) {
$this->notes[(int)$note['noteable_id']] = (string)$note['text']; $this->notes[(int)$note['noteable_id']] = (string)$note['text'];
} }

View File

@@ -29,7 +29,7 @@ class PiggyBankEnrichment implements EnrichmentInterface
private array $currencyIds = []; private array $currencyIds = [];
private array $currencies = []; private array $currencies = [];
private array $accountIds = []; private array $accountIds = [];
//private array $accountCurrencies = []; // private array $accountCurrencies = [];
private array $notes = []; private array $notes = [];
private array $mappedObjects = []; private array $mappedObjects = [];
private TransactionCurrency $primaryCurrency; private TransactionCurrency $primaryCurrency;
@@ -121,7 +121,7 @@ class PiggyBankEnrichment implements EnrichmentInterface
if (!array_key_exists($currencyId, $this->currencies)) { if (!array_key_exists($currencyId, $this->currencies)) {
$this->currencies[$currencyId] = TransactionCurrency::find($currencyId); $this->currencies[$currencyId] = TransactionCurrency::find($currencyId);
} }
//$this->accountCurrencies[$accountId] = $this->currencies[$currencyId]; // $this->accountCurrencies[$accountId] = $this->currencies[$currencyId];
} }
// get account info. // get account info.

View File

@@ -173,7 +173,7 @@ class RecurringEnrichment implements EnrichmentInterface
$this->transactions[$id][$transactionId] = [ $this->transactions[$id][$transactionId] = [
'id' => (string)$transactionId, 'id' => (string)$transactionId,
//'recurrence_id' => $id, // 'recurrence_id' => $id,
'transaction_currency_id' => (int)$transaction->transaction_currency_id, 'transaction_currency_id' => (int)$transaction->transaction_currency_id,
'foreign_currency_id' => null === $transaction->foreign_currency_id ? null : (int)$transaction->foreign_currency_id, 'foreign_currency_id' => null === $transaction->foreign_currency_id ? null : (int)$transaction->foreign_currency_id,
'source_id' => (int)$transaction->source_id, 'source_id' => (int)$transaction->source_id,

View File

@@ -73,6 +73,7 @@ class BudgetLimitTransformer extends AbstractTransformer
if ($this->convertToPrimary && $currency->id !== $this->primaryCurrency->id) { if ($this->convertToPrimary && $currency->id !== $this->primaryCurrency->id) {
$pcAmount = Steam::bcround($budgetLimit->native_amount, $this->primaryCurrency->decimal_places); $pcAmount = Steam::bcround($budgetLimit->native_amount, $this->primaryCurrency->decimal_places);
} }
return [ return [
'id' => (string)$budgetLimit->id, 'id' => (string)$budgetLimit->id,
'created_at' => $budgetLimit->created_at->toAtomString(), 'created_at' => $budgetLimit->created_at->toAtomString(),

10
composer.lock generated
View File

@@ -1879,16 +1879,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v12.21.0", "version": "v12.22.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "ac8c4e73bf1b5387b709f7736d41427e6af1c93b" "reference": "6ab00c913ef6ec6fad0bd506f7452c0bb9e792c3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/ac8c4e73bf1b5387b709f7736d41427e6af1c93b", "url": "https://api.github.com/repos/laravel/framework/zipball/6ab00c913ef6ec6fad0bd506f7452c0bb9e792c3",
"reference": "ac8c4e73bf1b5387b709f7736d41427e6af1c93b", "reference": "6ab00c913ef6ec6fad0bd506f7452c0bb9e792c3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2090,7 +2090,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-07-22T15:41:55+00:00" "time": "2025-08-07T13:49:53+00:00"
}, },
{ {
"name": "laravel/passport", "name": "laravel/passport",

View File

@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-08-07', 'version' => 'develop/2025-08-07',
'build_time' => 1754540556, 'build_time' => 1754589772,
'api_version' => '2.1.0', // field is no longer used. 'api_version' => '2.1.0', // field is no longer used.
'db_version' => 26, 'db_version' => 26,

8
package-lock.json generated
View File

@@ -11524,9 +11524,9 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "7.0.6", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-7.1.0.tgz",
"integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==", "integrity": "sha512-3jdAy3NhBJYsa/lCFcnRfbK4kNkO/bhijFCnv5ByUQk/eekYagoV2yQSISUrhpV+5JiY5hmwOh7jNnQ68dFMuQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -11534,7 +11534,7 @@
"fdir": "^6.4.6", "fdir": "^6.4.6",
"picomatch": "^4.0.3", "picomatch": "^4.0.3",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"rollup": "^4.40.0", "rollup": "^4.43.0",
"tinyglobby": "^0.2.14" "tinyglobby": "^0.2.14"
}, },
"bin": { "bin": {