First attempt at job to create transactions for recurring transactions.

This commit is contained in:
James Cole
2018-06-22 18:42:23 +02:00
parent 636cd84f4f
commit db1c27d833
16 changed files with 646 additions and 133 deletions

View File

@@ -27,6 +27,7 @@ use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceRepetition;
use FireflyIII\Models\RecurrenceTransaction;
use FireflyIII\User;
use Illuminate\Support\Collection;
@@ -43,7 +44,31 @@ interface RecurringRepositoryInterface
*
* @return Collection
*/
public function getActive(): Collection;
public function get(): Collection;
/**
* Get ALL recurring transactions.
* @return Collection
*/
public function getAll(): Collection;
/**
* Get the category from a recurring transaction transaction.
*
* @param RecurrenceTransaction $recurrenceTransaction
*
* @return null|string
*/
public function getCategory(RecurrenceTransaction $recurrenceTransaction): ?string;
/**
* Get the budget ID from a recurring transaction transaction.
*
* @param RecurrenceTransaction $recurrenceTransaction
*
* @return null|int
*/
public function getBudget(RecurrenceTransaction $recurrenceTransaction): ?int;
/**
* Get the notes.
@@ -67,6 +92,15 @@ interface RecurringRepositoryInterface
*/
public function getOccurrencesInRange(RecurrenceRepetition $repetition, Carbon $start, Carbon $end): array;
/**
* Get the tags from the recurring transaction.
*
* @param Recurrence $recurrence
*
* @return array
*/
public function getTags(Recurrence $recurrence): array;
/**
* Calculate the next X iterations starting on the date given in $date.
* Returns an array of Carbon objects.
@@ -98,6 +132,7 @@ interface RecurringRepositoryInterface
/**
* Store a new recurring transaction.
*\
*
* @param array $data
*