mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This commit is contained in:
parent
5ba079e71c
commit
0c6e00666b
@ -97,8 +97,6 @@ class DestroyController extends Controller
|
|||||||
|
|
||||||
$this->groupRepository->destroy($transactionGroup);
|
$this->groupRepository->destroy($transactionGroup);
|
||||||
|
|
||||||
// trigger just after destruction
|
|
||||||
event(new DestroyedTransactionGroup($transactionGroup));
|
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers\Transaction;
|
namespace FireflyIII\Http\Controllers\Transaction;
|
||||||
|
|
||||||
|
use FireflyIII\Events\DestroyedTransactionGroup;
|
||||||
use FireflyIII\Events\UpdatedAccount;
|
use FireflyIII\Events\UpdatedAccount;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
use FireflyIII\Http\Controllers\Controller;
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
@ -131,9 +132,6 @@ class DeleteController extends Controller
|
|||||||
|
|
||||||
$this->repository->destroy($group);
|
$this->repository->destroy($group);
|
||||||
|
|
||||||
app('preferences')->mark();
|
|
||||||
|
|
||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
foreach($accounts as $account) {
|
foreach($accounts as $account) {
|
||||||
Log::debug(sprintf('Now going to trigger updated account event for account #%d', $account->id));
|
Log::debug(sprintf('Now going to trigger updated account event for account #%d', $account->id));
|
||||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Services\Internal\Destroy;
|
namespace FireflyIII\Services\Internal\Destroy;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use FireflyIII\Events\DestroyedTransactionGroup;
|
||||||
use FireflyIII\Models\TransactionGroup;
|
use FireflyIII\Models\TransactionGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,6 +50,8 @@ class TransactionGroupDestroyService
|
|||||||
} catch (Exception $e) { // @phpstan-ignore-line
|
} catch (Exception $e) { // @phpstan-ignore-line
|
||||||
// @ignoreException
|
// @ignoreException
|
||||||
}
|
}
|
||||||
|
// trigger just after destruction
|
||||||
|
event(new DestroyedTransactionGroup($transactionGroup));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user