mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
🤖 Auto commit for release 'develop' on 2025-07-31
This commit is contained in:
@@ -66,7 +66,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
'paid_dates' => $this->filterPaidDates($paidDates[$id] ?? []),
|
'paid_dates' => $this->filterPaidDates($paidDates[$id] ?? []),
|
||||||
'pay_dates' => $payDates[$id] ?? [],
|
'pay_dates' => $payDates[$id] ?? [],
|
||||||
'nem' => $nem,
|
'nem' => $nem,
|
||||||
'nem_diff' => $this->getNextExpectedMatchDiff($nem, $payDates[$id] ?? [])
|
'nem_diff' => $this->getNextExpectedMatchDiff($nem, $payDates[$id] ?? []),
|
||||||
];
|
];
|
||||||
$amounts = [
|
$amounts = [
|
||||||
'amount_min' => Steam::bcround($item->amount_min, $currency->decimal_places),
|
'amount_min' => Steam::bcround($item->amount_min, $currency->decimal_places),
|
||||||
@@ -119,7 +119,8 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
$notes = Note::query()->whereIn('noteable_id', $this->subscriptionIds)
|
$notes = Note::query()->whereIn('noteable_id', $this->subscriptionIds)
|
||||||
->whereNotNull('notes.text')
|
->whereNotNull('notes.text')
|
||||||
->where('notes.text', '!=', '')
|
->where('notes.text', '!=', '')
|
||||||
->where('noteable_type', Bill::class)->get(['notes.noteable_id', 'notes.text'])->toArray();
|
->where('noteable_type', Bill::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'];
|
||||||
}
|
}
|
||||||
@@ -161,7 +162,8 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
$set = DB::table('object_groupables')
|
$set = DB::table('object_groupables')
|
||||||
->whereIn('object_groupable_id', $this->subscriptionIds)
|
->whereIn('object_groupable_id', $this->subscriptionIds)
|
||||||
->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());
|
||||||
|
|
||||||
@@ -183,6 +185,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
if (null === $this->start || null === $this->end) {
|
if (null === $this->start || null === $this->end) {
|
||||||
Log::debug('Parameters are NULL, return empty array');
|
Log::debug('Parameters are NULL, return empty array');
|
||||||
$this->paidDates = [];
|
$this->paidDates = [];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +229,8 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
'transactions.amount',
|
'transactions.amount',
|
||||||
'transactions.foreign_amount',
|
'transactions.foreign_amount',
|
||||||
]
|
]
|
||||||
);
|
)
|
||||||
|
;
|
||||||
Log::debug(sprintf('Count %d entries in set', $set->count()));
|
Log::debug(sprintf('Count %d entries in set', $set->count()));
|
||||||
|
|
||||||
// for each bill, do a loop.
|
// for each bill, do a loop.
|
||||||
@@ -345,6 +349,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
{
|
{
|
||||||
return array_map(function (array $entry) {
|
return array_map(function (array $entry) {
|
||||||
unset($entry['date_object']);
|
unset($entry['date_object']);
|
||||||
|
|
||||||
return $entry;
|
return $entry;
|
||||||
}, $entries);
|
}, $entries);
|
||||||
}
|
}
|
||||||
@@ -372,6 +377,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
$firstPayDate = null;
|
$firstPayDate = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $nem;
|
return $nem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +386,7 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
if (null === $nem) {
|
if (null === $nem) {
|
||||||
return trans('firefly.not_expected_period');
|
return trans('firefly.not_expected_period');
|
||||||
}
|
}
|
||||||
$nemDiff = trans('firefly.not_expected_period');;
|
$nemDiff = trans('firefly.not_expected_period');
|
||||||
// converting back and forth is bad code but OK.
|
// converting back and forth is bad code but OK.
|
||||||
if ($nem->isToday()) {
|
if ($nem->isToday()) {
|
||||||
$nemDiff = trans('firefly.today');
|
$nemDiff = trans('firefly.today');
|
||||||
@@ -399,4 +405,3 @@ class SubscriptionEnrichment implements EnrichmentInterface
|
|||||||
return $nemDiff;
|
return $nemDiff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,7 +45,6 @@ class BillTransformer extends AbstractTransformer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the bill.
|
* Transform the bill.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function transform(Bill $bill): array
|
public function transform(Bill $bill): array
|
||||||
{
|
{
|
||||||
@@ -100,6 +99,4 @@ class BillTransformer extends AbstractTransformer
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -79,7 +79,7 @@ return [
|
|||||||
// see cer.php for exchange rates feature flag.
|
// see cer.php for exchange rates feature flag.
|
||||||
],
|
],
|
||||||
'version' => 'develop/2025-07-31',
|
'version' => 'develop/2025-07-31',
|
||||||
'build_time' => 1753936691,
|
'build_time' => 1753939947,
|
||||||
'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,
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user