mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 19:00:22 -06:00
Fix #6118
This commit is contained in:
parent
2e8ea7493a
commit
b4feb27118
@ -24,9 +24,11 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Services\Internal\Update;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Factory\PiggyBankEventFactory;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\PiggyBankEvent;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
@ -103,6 +105,14 @@ class GroupCloneService
|
||||
// add note saying "cloned".
|
||||
|
||||
// add relation.
|
||||
// clone linked piggy banks
|
||||
/** @var PiggyBankEvent $event */
|
||||
$event = $journal->piggyBankEvents()->first();
|
||||
if(null !== $event) {
|
||||
$piggyBank = $event->piggyBank;
|
||||
$factory = app(PiggyBankEventFactory::class);
|
||||
$factory->create($newJournal, $piggyBank);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user