mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed a bug in relevantOnDate
This commit is contained in:
parent
fa3f18b60f
commit
6bbaf1523c
@ -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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user