Small fix in journal handler.

This commit is contained in:
James Cole 2016-05-05 07:09:12 +02:00
parent 3344bb7263
commit 36f3eb8b2f
2 changed files with 3 additions and 2 deletions

View File

@ -464,7 +464,7 @@ class TransactionController extends Controller
Session::flash('info', $att->getMessages()->get('attachments'));
}
event(new TransactionJournalStored($journal, intval($request->get('piggy_bank_id'))));
event(new TransactionJournalStored($journal, intval($journalData['piggy_bank_id'])));
Session::flash('success', strval(trans('firefly.stored_journal', ['description' => e($journal->description)])));
Preferences::mark();

View File

@ -51,6 +51,7 @@ class JournalFormRequest extends Request
'budget_id' => intval($this->get('budget_id')),
'category' => $this->get('category') ?? '',
'tags' => explode(',', $tags),
'piggy_bank_id' => $this->get('piggy_bank_id') ? intval($this->get('piggy_bank_id')) : 0,
];
}
@ -71,7 +72,7 @@ class JournalFormRequest extends Request
'interest_date' => 'date',
'category' => 'between:1,255',
'amount_currency_id_amount' => 'required|exists:transaction_currencies,id',
'piggy_bank_id' => 'numeric',
];
switch ($what) {