Fixed transfers

This commit is contained in:
James Cole 2015-03-25 17:44:06 +01:00
parent 340de53825
commit ab851b1be4
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,9 @@ class ConnectJournalToPiggyBank
/** @var TransactionJournal $journal */
$journal = $event->journal;
$piggyBankId = $event->piggyBankId;
if(intval($piggyBankId) < 1) {
return;
}
Log::debug('JournalCreated event: ' . $journal->id . ', ' . $piggyBankId);

View File

@ -59,7 +59,6 @@ class JournalFormRequest extends Request
case 'transfer':
$rules['account_from_id'] = 'required|exists:accounts,id|belongsToUser:accounts|different:account_to_id';
$rules['account_to_id'] = 'required|exists:accounts,id|belongsToUser:accounts|different:account_from_id';
$rules['piggy_bank_id'] = 'exists:piggy_banks,id';
$rules['category'] = 'between:1,255';
break;
default: