Merge branch 'develop' of github.com:firefly-iii/firefly-iii into develop

# Conflicts:
#	app/Api/V1/Controllers/Models/Bill/ShowController.php
#	app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php
#	app/Transformers/BillTransformer.php
This commit is contained in:
James Cole
2025-07-31 07:30:25 +02:00
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace FireflyIII\Support\JsonApi\Enrichments; namespace FireflyIII\Support\JsonApi\Enrichments;
use Carbon\Carbon; use Carbon\Carbon;
@@ -96,13 +98,14 @@ class SubscriptionEnrichment implements EnrichmentInterface
} }
$item->amounts = $amounts; $item->amounts = $amounts;
$item->meta = $meta; $item->meta = $meta;
return $item; return $item;
}); });
return $collection; return $collection;
} }
public function enrichSingle(Model|array $model): array|Model public function enrichSingle(array|Model $model): array|Model
{ {
Log::debug(__METHOD__); Log::debug(__METHOD__);
$collection = new Collection([$model]); $collection = new Collection([$model]);
@@ -160,7 +163,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
->where('object_groupable_type', Bill::class) ->where('object_groupable_type', Bill::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());
foreach ($set as $entry) { foreach ($set as $entry) {
$this->mappedObjects[(int)$entry->object_groupable_id] = (int)$entry->object_group_id; $this->mappedObjects[(int)$entry->object_groupable_id] = (int)$entry->object_group_id;

View File

@@ -51,6 +51,7 @@ class BillTransformer extends AbstractTransformer
{ {
$currency = $bill->transactionCurrency; $currency = $bill->transactionCurrency;
return [ return [
'id' => $bill->id, 'id' => $bill->id,
'created_at' => $bill->created_at->toAtomString(), 'created_at' => $bill->created_at->toAtomString(),
@@ -81,6 +82,7 @@ class BillTransformer extends AbstractTransformer
'object_group_order' => $bill->meta['object_group_order'], 'object_group_order' => $bill->meta['object_group_order'],
'object_group_title' => $bill->meta['object_group_title'], 'object_group_title' => $bill->meta['object_group_title'],
'paid_dates' => $bill->meta['paid_dates'], 'paid_dates' => $bill->meta['paid_dates'],
'pay_dates' => $bill->meta['pay_dates'], 'pay_dates' => $bill->meta['pay_dates'],
'next_expected_match' => $bill->meta['nem']?->toAtomString(), 'next_expected_match' => $bill->meta['nem']?->toAtomString(),

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => env('USE_RUNNING_BALANCE', false), 'running_balance_column' => env('USE_RUNNING_BALANCE', false),
// see cer.php for exchange rates feature flag. // see cer.php for exchange rates feature flag.
], ],
'version' => 'develop/2025-07-30', 'version' => 'develop/2025-07-31',
'build_time' => 1753878970, 'build_time' => 1753936691,
'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,