This commit is contained in:
James Cole 2022-07-17 07:18:50 +02:00
parent 2e8ea7493a
commit b4feb27118
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -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);
}
}
/**