Fixed bugs!

This commit is contained in:
James Cole 2014-12-15 18:16:48 +01:00
parent f9ab49911d
commit 16678aa5e1
4 changed files with 12 additions and 5 deletions

View File

@ -184,8 +184,10 @@ class RecurringController extends BaseController
public function update(RecurringTransaction $recurringTransaction)
{
/** @var \FireflyIII\Database\RecurringTransaction\RecurringTransaction $repos */
$repos = App::make('FireflyIII\Database\RecurringTransaction\RecurringTransaction');
$data = Input::except('_token');
$repos = App::make('FireflyIII\Database\RecurringTransaction\RecurringTransaction');
$data = Input::except('_token');
$data['active'] = isset($data['active']) ? 1 : 0;
$data['automatch'] = isset($data['automatch']) ? 1 : 0;
switch (Input::get('post_submit_action')) {
default:

View File

@ -214,10 +214,12 @@ class TransactionController extends BaseController
$what = strtolower($journal->transactiontype->type);
// get asset accounts with names and id's.
$accounts = FFForm::makeSelectList($accountRepository->getAssetAccounts());
$budgets = FFForm::makeSelectList($budgetRepository->get(), true);
$accounts = FFForm::makeSelectList($accountRepository->getAssetAccounts());
$piggies = FFForm::makeSelectList($piggyRepository->get(), true);
/*
* Data to properly display the edit form.
*/

View File

@ -21,7 +21,7 @@ class Form
*
* @return mixed
*/
public function makeSelectList(Collection $set, $titleField = null, $addEmpty = false)
public function makeSelectList(Collection $set, $addEmpty = false)
{
$selectList = [];
if ($addEmpty) {
@ -32,7 +32,7 @@ class Form
foreach ($set as $entry) {
/** @noinspection PhpUndefinedFieldInspection */
$id = intval($entry->id);
$title = $titleField;
$title = null;
foreach ($fields as $field) {
if (is_null($title) && isset($entry->$field)) {

View File

@ -70,6 +70,9 @@ class RecurringTransaction extends Eloquent
* The date Firefly tries to find. If this stays null, it's "unknown".
*/
$finalDate = null;
if ($this->active == 0) {
return $finalDate;
}
/*
* $today is the start of the next period, to make sure FF3 won't miss anything