mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-08-29 01:13:08 +00:00
Event for clone
This commit is contained in:
@@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Transaction;
|
||||
|
||||
use FireflyIII\Events\StoredTransactionGroup;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
@@ -68,6 +69,9 @@ class CreateController extends Controller
|
||||
$service = app(GroupCloneService::class);
|
||||
$newGroup = $service->cloneGroup($group);
|
||||
|
||||
// event!
|
||||
event(new StoredTransactionGroup($newGroup, true));
|
||||
|
||||
app('preferences')->mark();
|
||||
|
||||
$title = $newGroup->title ?? $newGroup->transactionJournals->first()->description;
|
||||
|
Reference in New Issue
Block a user