mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Cleanup and expansion to accomodate repeated expenses.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
use LaravelBook\Ardent\Ardent as Ardent;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use LaravelBook\Ardent\Ardent;
|
||||
use LaravelBook\Ardent\Builder;
|
||||
|
||||
/**
|
||||
* PiggybankRepetition
|
||||
@@ -63,5 +64,12 @@ class PiggybankRepetition extends Ardent
|
||||
return $this->belongsTo('Piggybank');
|
||||
}
|
||||
|
||||
public function scopeStarts(Builder $query, Carbon $date) {
|
||||
$query->where('startdate',$date->format('Y-m-d'));
|
||||
}
|
||||
public function scopeTargets(Builder $query, Carbon $date) {
|
||||
$query->where('targetdate',$date->format('Y-m-d'));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user