This commit is contained in:
James Cole 2019-12-31 06:17:32 +01:00
parent a331b2d661
commit 2c9bc10e51
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E

View File

@ -64,10 +64,10 @@
{# ONE: WITHDRAWAL TO DEPOSIT #}
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Deposit' %}
{# NEW DESTINATION = Asset, SOURCE MUST BE [Revenue, Cash, Loan, Debt, Mortgage] #}
{% if
transaction.source_type == 'Asset account' %}
{% if transaction.source_type == 'Asset account' %}
{{ Form.select('source_id['~transaction.transaction_journal_id~']', validDepositSources, null, {class: 'form-control'}) }}
{% endif %}
{# NEW DESTINATION = [Loan, Debt, Mortgage], SOURCE MUST BE [Revenue] #}
{% if
transaction.source_type == 'Loan' or
@ -260,25 +260,6 @@
</tr>
{% endfor %}
</table>
{# in case of withdrawal #}
{% if sourceType.type == "Withdrawal" %}
{{ ExpandedForm.staticText('source_account_asset', '<a href="'~route('accounts.show',[sourceAccount.id])~'">'~sourceAccount.name|escape~'</a>') }}
{# if destination is cash, show (cash) #}
{% if destinationAccount.accountType.type == "Cash account" %}
{{ ExpandedForm.staticText('destination_account_expense', '<span class="text-success">(cash)</a>') }}
{% else %}
{{ ExpandedForm.staticText('destination_account_expense', '<a href="'~route('accounts.show',[destinationAccount.id])~'">'~destinationAccount.name|escape~'</a>') }}
{% endif %}
{% endif %}
{# in case of transfer #}
{% if sourceType.type == "Transfer" %}
{{ ExpandedForm.staticText('source_account_asset', '<a href="'~route('accounts.show',[sourceAccount.id])~'">'~sourceAccount.name|escape~'</a>') }}
{{ ExpandedForm.staticText('destination_account_asset', '<a href="'~route('accounts.show',[destinationAccount.id])~'">'~destinationAccount.name|escape~'</a>') }}
{% endif %}
</div>
<div class="box-footer">
<a href="{{ route('transactions.show', group.id) }}" class="btn btn-danger">{{ 'cancel'|_ }}</a>