mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Fix #5200
This commit is contained in:
@@ -431,7 +431,7 @@ class CreateRecurringTransactions implements ShouldQueue
|
|||||||
'user' => $recurrence->user_id,
|
'user' => $recurrence->user_id,
|
||||||
'currency_id' => (int)$transaction->transaction_currency_id,
|
'currency_id' => (int)$transaction->transaction_currency_id,
|
||||||
'currency_code' => null,
|
'currency_code' => null,
|
||||||
'description' => $recurrence->recurrenceTransactions()->first()->description,
|
'description' => $transactions->first()->description,
|
||||||
'amount' => $transaction->amount,
|
'amount' => $transaction->amount,
|
||||||
'budget_id' => $this->repository->getBudget($transaction),
|
'budget_id' => $this->repository->getBudget($transaction),
|
||||||
'budget_name' => null,
|
'budget_name' => null,
|
||||||
@@ -452,7 +452,7 @@ class CreateRecurringTransactions implements ShouldQueue
|
|||||||
'tags' => $this->repository->getTags($transaction),
|
'tags' => $this->repository->getTags($transaction),
|
||||||
'piggy_bank_id' => $this->repository->getPiggyBank($transaction),
|
'piggy_bank_id' => $this->repository->getPiggyBank($transaction),
|
||||||
'piggy_bank_name' => null,
|
'piggy_bank_name' => null,
|
||||||
'bill_id' => null,
|
'bill_id' => $this->repository->getBillId($transaction),
|
||||||
'bill_name' => null,
|
'bill_name' => null,
|
||||||
'recurrence_total' => $total,
|
'recurrence_total' => $total,
|
||||||
'recurrence_count' => $count,
|
'recurrence_count' => $count,
|
||||||
|
@@ -613,4 +613,20 @@ class RecurringRepository implements RecurringRepositoryInterface
|
|||||||
|
|
||||||
return $filtered;
|
return $filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getBillId(RecurrenceTransaction $recTransaction): ?int
|
||||||
|
{
|
||||||
|
$return = null;
|
||||||
|
/** @var RecurrenceTransactionMeta $meta */
|
||||||
|
foreach ($recTransaction->recurrenceTransactionMeta as $meta) {
|
||||||
|
if ('bill_id' === $meta->name) {
|
||||||
|
$return = (int)$meta->value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -82,6 +82,15 @@ interface RecurringRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function getCategoryId(RecurrenceTransaction $recTransaction): ?int;
|
public function getCategoryId(RecurrenceTransaction $recTransaction): ?int;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the category from a recurring transaction transaction.
|
||||||
|
*
|
||||||
|
* @param RecurrenceTransaction $recTransaction
|
||||||
|
*
|
||||||
|
* @return null|int
|
||||||
|
*/
|
||||||
|
public function getBillId(RecurrenceTransaction $recTransaction): ?int;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the category from a recurring transaction transaction.
|
* Get the category from a recurring transaction transaction.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user