Small bug fix.

This commit is contained in:
James Cole 2014-12-15 07:24:01 +01:00
parent 9a8a3e94d6
commit 3fabe2e9fb
5 changed files with 15 additions and 5 deletions

View File

@ -449,7 +449,7 @@ class GoogleChartController extends BaseController
/** @var \FireflyIII\Database\RecurringTransaction\RecurringTransaction $rcr */
$rcr = App::make('FireflyIII\Database\RecurringTransaction\RecurringTransaction');
$recurring = $rcr->get();
$recurring = $rcr->getActive();
/** @var \RecurringTransaction $entry */
foreach ($recurring as $entry) {

View File

@ -16,7 +16,7 @@ use Illuminate\Support\MessageBag;
*
* @package FireflyIII\Database
*/
class PiggyBank implements CUD, CommonDatabaseCalls, PiggybankInterface
class PiggyBank implements CUD, CommonDatabaseCalls, PiggyBankInterface
{
use SwitchUser;

View File

@ -3,11 +3,11 @@
namespace FireflyIII\Database\PiggyBank;
/**
* Interface PiggybankInterface
* Interface PiggyBankInterface
*
* @package FireflyIII\Database\Ifaces
*/
interface PiggybankInterface
interface PiggyBankInterface
{
/**

View File

@ -18,7 +18,7 @@ use Illuminate\Support\MessageBag;
*
* @package FireflyIII\Database
*/
class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggybankInterface
class RepeatedExpense implements CUD, CommonDatabaseCalls, PiggyBankInterface
{
use SwitchUser;

View File

@ -211,6 +211,16 @@ class RecurringTransaction implements CUD, CommonDatabaseCalls, RecurringTransac
throw new NotImplementedException;
}
/**
* Returns all objects.
*
* @return Collection
*/
public function getActive()
{
return $this->getUser()->recurringtransactions()->where('active', 1)->get();
}
/**
* @param \RecurringTransaction $recurring
* @param Carbon $start