Merge branch 'develop' into 5.8-dev

This commit is contained in:
James Cole
2022-09-24 07:03:03 +02:00
16 changed files with 331 additions and 305 deletions

View File

@@ -380,13 +380,19 @@ class CreateRecurringTransactions implements ShouldQueue
// create transaction array and send to factory.
$groupTitle = null;
if ($recurrence->recurrenceTransactions->count() > 1) {
$count = $recurrence->recurrenceTransactions->count();
if ($count > 1) {
/** @var RecurrenceTransaction $first */
$first = $recurrence->recurrenceTransactions()->first();
$groupTitle = $first->description;
}
if(0 === $count) {
Log::error('No transactions to be created in this recurrence. Cannot continue.');
return null;
}
$array = [
'user' => $recurrence->user_id,