mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-09 22:26:04 +00:00
Update some logging.
This commit is contained in:
@@ -36,9 +36,9 @@ class PiggyBankEventFactory
|
|||||||
{
|
{
|
||||||
public function create(TransactionJournal $journal, ?PiggyBank $piggyBank): void
|
public function create(TransactionJournal $journal, ?PiggyBank $piggyBank): void
|
||||||
{
|
{
|
||||||
app('log')->debug(sprintf('Now in PiggyBankEventCreate for a %s', $journal->transactionType->type));
|
Log::debug(sprintf('Now in PiggyBankEventCreate for a %s', $journal->transactionType->type));
|
||||||
if (!$piggyBank instanceof PiggyBank) {
|
if (!$piggyBank instanceof PiggyBank) {
|
||||||
app('log')->debug('Piggy bank is null');
|
Log::debug('Piggy bank is null');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ class PiggyBankEventFactory
|
|||||||
|
|
||||||
$amount = $piggyRepos->getExactAmount($piggyBank, $journal);
|
$amount = $piggyRepos->getExactAmount($piggyBank, $journal);
|
||||||
if (0 === bccomp($amount, '0')) {
|
if (0 === bccomp($amount, '0')) {
|
||||||
app('log')->debug('Amount is zero, will not create event.');
|
Log::debug('Amount is zero, will not create event.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -263,6 +263,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface, UserGroupInte
|
|||||||
[ // @phpstan-ignore-line
|
[ // @phpstan-ignore-line
|
||||||
'rules' => static function (HasMany $query): void {
|
'rules' => static function (HasMany $query): void {
|
||||||
$query->orderBy('order', 'ASC');
|
$query->orderBy('order', 'ASC');
|
||||||
|
$query->where('rules.active', true);
|
||||||
},
|
},
|
||||||
'rules.ruleTriggers' => static function (HasMany $query): void {
|
'rules.ruleTriggers' => static function (HasMany $query): void {
|
||||||
$query->orderBy('order', 'ASC');
|
$query->orderBy('order', 'ASC');
|
||||||
@@ -319,6 +320,7 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface, UserGroupInte
|
|||||||
[ // @phpstan-ignore-line
|
[ // @phpstan-ignore-line
|
||||||
'rules' => static function (HasMany $query): void {
|
'rules' => static function (HasMany $query): void {
|
||||||
$query->orderBy('order', 'ASC');
|
$query->orderBy('order', 'ASC');
|
||||||
|
$query->where('rules.active', true);
|
||||||
},
|
},
|
||||||
'rules.ruleTriggers' => static function (HasMany $query): void {
|
'rules.ruleTriggers' => static function (HasMany $query): void {
|
||||||
$query->orderBy('order', 'ASC');
|
$query->orderBy('order', 'ASC');
|
||||||
|
@@ -59,9 +59,7 @@ class UpdatePiggyBank implements ActionInterface
|
|||||||
|
|
||||||
$piggyBank = $this->findPiggyBank($user, $actionValue);
|
$piggyBank = $this->findPiggyBank($user, $actionValue);
|
||||||
if (!$piggyBank instanceof PiggyBank) {
|
if (!$piggyBank instanceof PiggyBank) {
|
||||||
Log::info(
|
Log::info(sprintf('No piggy bank named "%s", cant execute action #%d of rule #%d', $actionValue, $this->action->id, $this->action->rule_id));
|
||||||
sprintf('No piggy bank named "%s", cant execute action #%d of rule #%d', $actionValue, $this->action->id, $this->action->rule_id)
|
|
||||||
);
|
|
||||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.cannot_find_piggy', ['name' => $actionValue])));
|
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.cannot_find_piggy', ['name' => $actionValue])));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user