mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 02:57:45 +00:00
Make sure the user can create liabilities in the "credit" direction with the right transactions.
This commit is contained in:
@@ -62,6 +62,7 @@ class AccountFormRequest extends FormRequest
|
||||
'interest' => $this->string('interest'),
|
||||
'interest_period' => $this->string('interest_period'),
|
||||
'include_net_worth' => '1',
|
||||
'liability_direction' => $this->string('liability_direction'),
|
||||
];
|
||||
|
||||
$data = $this->appendLocationData($data, 'location');
|
||||
@@ -74,6 +75,7 @@ class AccountFormRequest extends FormRequest
|
||||
if ('liabilities' === $data['account_type_name']) {
|
||||
$data['account_type_name'] = null;
|
||||
$data['account_type_id'] = $this->integer('liability_type_id');
|
||||
$data['opening_balance'] = app('steam')->negative($data['opening_balance']);
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
Reference in New Issue
Block a user