mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45: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->location = $this->repository->getLocation($account);
|
||||||
|
|
||||||
$account->liability_direction = $this->repository->getMetaValue($account, 'liability_direction');
|
$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:
|
// make paginator:
|
||||||
|
@ -75,8 +75,10 @@ class AccountFormRequest extends FormRequest
|
|||||||
if ('liabilities' === $data['account_type_name']) {
|
if ('liabilities' === $data['account_type_name']) {
|
||||||
$data['account_type_name'] = null;
|
$data['account_type_name'] = null;
|
||||||
$data['account_type_id'] = $this->integer('liability_type_id');
|
$data['account_type_id'] = $this->integer('liability_type_id');
|
||||||
|
if ('' !== $data['opening_balance']) {
|
||||||
$data['opening_balance'] = app('steam')->negative($data['opening_balance']);
|
$data['opening_balance'] = app('steam')->negative($data['opening_balance']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@ -110,11 +112,6 @@ class AccountFormRequest extends FormRequest
|
|||||||
];
|
];
|
||||||
$rules = Location::requestRules($rules);
|
$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 */
|
/** @var Account $account */
|
||||||
$account = $this->route()->parameter('account');
|
$account = $this->route()->parameter('account');
|
||||||
if (null !== $account) {
|
if (null !== $account) {
|
||||||
|
@ -68,7 +68,9 @@
|
|||||||
</td>
|
</td>
|
||||||
{% if objectType == 'liabilities' %}
|
{% if objectType == 'liabilities' %}
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
|
{% if '-' != account.current_debt %}
|
||||||
<span class="text-info">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
|
<span class="text-info">{{ formatAmountByAccount(account, account.current_debt, false) }}</span>
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class="hidden-sm hidden-xs">
|
<td class="hidden-sm hidden-xs">
|
||||||
|
Loading…
Reference in New Issue
Block a user