mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-16 11:28:50 +00:00
Validate title, fix running balance display
This commit is contained in:
@@ -339,6 +339,9 @@ class UpdateRequest extends FormRequest
|
||||
// if more than one, verify that there are journal ID's present.
|
||||
$this->validateJournalIds($validator, $transactionGroup);
|
||||
|
||||
// if more than one split, needs group title
|
||||
$this->validateGroupDescription($validator);
|
||||
|
||||
// all transaction types must be equal:
|
||||
$this->validateTransactionTypesForUpdate($validator);
|
||||
|
||||
|
||||
@@ -277,26 +277,30 @@
|
||||
{% endif %}
|
||||
|
||||
{% elseif transaction.transaction_type_type == 'Withdrawal' %}
|
||||
|
||||
{# withdrawal into a liability #}
|
||||
{% if 'Loan' == transaction.destination_account_type or 'Mortgage' == transaction.destination_account_type or 'Debt' == transaction.destination_account_type %}
|
||||
{% if currency.id == transaction.currency_id %}
|
||||
{% if account.id == transaction.source_account_id %}
|
||||
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
{% if account.id == transaction.destination_account_id %}
|
||||
{% elseif account.id == transaction.destination_account_id %}
|
||||
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if currency.id == transaction.foreign_currency_id and null != transaction.destination_balance_after and null != transaction.destination_balance_after %}
|
||||
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.foreign_currency_symbol ?? transaction.currency_symbol, transaction.foreign_currency_decimal_places ?? transaction.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
{# withdrawal into an expense account #}
|
||||
{% else %}
|
||||
{% if account.id == transaction.source_account_id %}
|
||||
{{ formatAmountBySymbol(transaction.source_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% endif %}
|
||||
{% if account.id == transaction.destination_account_id %}
|
||||
{% elseif account.id == transaction.destination_account_id %}
|
||||
{{ formatAmountBySymbol(transaction.destination_balance_after, transaction.currency_symbol, transaction.currency_decimal_places) }}
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% elseif transaction.transaction_type_type == 'Opening balance' %}
|
||||
{% if transaction.source_account_type == 'Initial balance account' %}
|
||||
|
||||
Reference in New Issue
Block a user