Improve account CRUD and tests.

This commit is contained in:
James Cole
2019-06-22 10:25:34 +02:00
parent 150818e673
commit 0f70cc5780
18 changed files with 480 additions and 255 deletions

View File

@@ -111,8 +111,7 @@ class AccountFormRequest extends Request
'interest_period' => 'in:daily,monthly,yearly',
];
// TODO verify if this will work.
if ('liabilities' === $this->get('what')) {
if ('liabilities' === $this->get('objectType')) {
$rules['opening_balance'] = ['numeric', 'required'];
$rules['opening_balance_date'] = 'date|required';
}