Some cleaning up in the whole piggy bank section. More narrow events and stricter code. Still not catching some events, so it'll eventually all break down. [skip ci]

This commit is contained in:
James Cole
2014-08-19 06:57:11 +02:00
parent 87bddce1d3
commit f5330728d4
6 changed files with 475 additions and 177 deletions

View File

@@ -34,6 +34,7 @@ class Transaction extends Ardent
public static $rules
= [
'account_id' => 'numeric|required|exists:accounts,id',
'piggybank_id' => 'numeric|exists:piggybanks,id',
'transaction_journal_id' => 'numeric|required|exists:transaction_journals,id',
'description' => 'between:1,255',
'amount' => 'required|between:-65536,65536|not_in:0,0.00',
@@ -42,9 +43,11 @@ class Transaction extends Ardent
public static $factory
= [
'account_id' => 'factory|Account',
'piggybank_id' => null,
'transaction_journal_id' => 'factory|TransactionJournal',
'description' => 'string',
'amount' => 'integer:5'
'amount' => 'integer:5',
];
/**