mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Fixed a bug in relevantOnDate
This commit is contained in:
@@ -37,13 +37,13 @@ class PiggyBankRepetition extends Model
|
|||||||
{
|
{
|
||||||
return $query->where(
|
return $query->where(
|
||||||
function($q) use ($date) {
|
function($q) use ($date) {
|
||||||
$q->where('startdate', '>=', $date->format('Y-m-d 00:00:00'));
|
$q->where('startdate', '<=', $date->format('Y-m-d 00:00:00'));
|
||||||
$q->orWhereNull('startdate');
|
$q->orWhereNull('startdate');
|
||||||
})
|
})
|
||||||
|
|
||||||
->where(function($q) use ($date) {
|
->where(function($q) use ($date) {
|
||||||
|
|
||||||
$q->where('targetdate', '<=', $date->format('Y-m-d 00:00:00'));
|
$q->where('targetdate', '>=', $date->format('Y-m-d 00:00:00'));
|
||||||
$q->orWhereNull('targetdate');
|
$q->orWhereNull('targetdate');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user