mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-20 11:48:27 -06:00
Small changes in list
This commit is contained in:
parent
a41d7378ef
commit
39925f8139
@ -172,7 +172,7 @@ class IndexController extends Controller
|
||||
$account->location = $this->repository->getLocation($account);
|
||||
|
||||
$account->liability_direction = $this->repository->getMetaValue($account, 'liability_direction');
|
||||
$account->current_debt = $this->repository->getMetaValue($account, 'current_debt');
|
||||
$account->current_debt = $this->repository->getMetaValue($account, 'current_debt') ?? '-';
|
||||
}
|
||||
);
|
||||
// make paginator:
|
||||
|
@ -75,7 +75,9 @@ 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']);
|
||||
if ('' !== $data['opening_balance']) {
|
||||
$data['opening_balance'] = app('steam')->negative($data['opening_balance']);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -110,11 +112,6 @@ class AccountFormRequest extends FormRequest
|
||||
];
|
||||
$rules = Location::requestRules($rules);
|
||||
|
||||
if ('liabilities' === $this->get('objectType')) {
|
||||
$rules['opening_balance'] = ['numeric', 'required', 'max:1000000000'];
|
||||
$rules['opening_balance_date'] = 'date|required';
|
||||
}
|
||||
|
||||
/** @var Account $account */
|
||||
$account = $this->route()->parameter('account');
|
||||
if (null !== $account) {
|
||||
|
@ -68,7 +68,9 @@
|
||||
</td>
|
||||
{% if objectType == 'liabilities' %}
|
||||
<td style="text-align: right;">
|
||||
<span class="text-info">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
|
||||
{% if '-' != account.current_debt %}
|
||||
<span class="text-info">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="hidden-sm hidden-xs">
|
||||
|
Loading…
Reference in New Issue
Block a user