mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-04 12:01:57 +00:00
This commit is contained in:
@@ -154,6 +154,7 @@ class BudgetLimitHandler
|
||||
]
|
||||
);
|
||||
$availableBudget->save();
|
||||
app('log')->debug(sprintf('ID of new AB is #%d', $availableBudget->id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -672,8 +672,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
// include budget ID + name (if any)
|
||||
->withBudgetInformation()
|
||||
// include bill ID + name (if any)
|
||||
->withBillInformation()
|
||||
;
|
||||
->withBillInformation();
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -931,6 +930,11 @@ class GroupCollector implements GroupCollectorInterface
|
||||
private function postFilterCollection(Collection $collection): Collection
|
||||
{
|
||||
$currentCollection = $collection;
|
||||
$countFilters = count($this->postFilters);
|
||||
$countCollection = count($currentCollection);
|
||||
if (0 === $countFilters && 0 === $countCollection) {
|
||||
return $currentCollection;
|
||||
}
|
||||
app('log')->debug(sprintf('GroupCollector: postFilterCollection has %d filter(s) and %d transaction(s).', count($this->postFilters), count($currentCollection)));
|
||||
|
||||
/**
|
||||
@@ -985,8 +989,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
'transactions as source',
|
||||
static function (JoinClause $join): void {
|
||||
$join->on('source.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('source.amount', '<', 0)
|
||||
;
|
||||
->where('source.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
// join destination transaction
|
||||
@@ -994,8 +997,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
'transactions as destination',
|
||||
static function (JoinClause $join): void {
|
||||
$join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('destination.amount', '>', 0)
|
||||
;
|
||||
->where('destination.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
// left join transaction type.
|
||||
@@ -1010,8 +1012,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->orderBy('transaction_journals.description', 'DESC')
|
||||
->orderBy('source.amount', 'DESC')
|
||||
;
|
||||
->orderBy('source.amount', 'DESC');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1029,8 +1030,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
'transactions as source',
|
||||
static function (JoinClause $join): void {
|
||||
$join->on('source.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('source.amount', '<', 0)
|
||||
;
|
||||
->where('source.amount', '<', 0);
|
||||
}
|
||||
)
|
||||
// join destination transaction
|
||||
@@ -1038,8 +1038,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
'transactions as destination',
|
||||
static function (JoinClause $join): void {
|
||||
$join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('destination.amount', '>', 0)
|
||||
;
|
||||
->where('destination.amount', '>', 0);
|
||||
}
|
||||
)
|
||||
// left join transaction type.
|
||||
@@ -1054,7 +1053,6 @@ class GroupCollector implements GroupCollectorInterface
|
||||
->orderBy('transaction_journals.order', 'ASC')
|
||||
->orderBy('transaction_journals.id', 'DESC')
|
||||
->orderBy('transaction_journals.description', 'DESC')
|
||||
->orderBy('source.amount', 'DESC')
|
||||
;
|
||||
->orderBy('source.amount', 'DESC');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ class AvailableBudgetRepository implements AvailableBudgetRepositoryInterface
|
||||
if (null !== $start && null !== $end) {
|
||||
$query->where(
|
||||
static function (Builder $q1) use ($start, $end): void { // @phpstan-ignore-line
|
||||
$q1->where('start_date', '=', $start->format('Y-m-d'));
|
||||
$q1->where('end_date', '=', $end->format('Y-m-d'));
|
||||
$q1->where('start_date', '=', $start);
|
||||
$q1->where('end_date', '=', $end);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -216,7 +216,6 @@ class Navigation
|
||||
public function endOfPeriod(Carbon $end, string $repeatFreq): Carbon
|
||||
{
|
||||
$currentEnd = clone $end;
|
||||
Log::debug(sprintf('endOfPeriod("%s", "%s")', $currentEnd->format('Y-m-d'), $repeatFreq));
|
||||
|
||||
$functionMap = [
|
||||
'1D' => 'endOfDay',
|
||||
|
||||
Reference in New Issue
Block a user