| #{{ transaction.transaction_journal_id }} |
{{ transaction.description }} |
{# 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' %}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', validDepositSources).class('form-control') }}
{% endif %}
{# NEW DESTINATION = [Loan, Debt, Mortgage], SOURCE MUST BE [Revenue] #}
{% if
transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
transaction.source_type == 'Mortgage' %}
{% endif %}
{% endif %}
{# TWO: WITHDRAWAL TO TRANSFER #}
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Transfer' %}
{{ transaction.source_name }}
{# hide source in hidden input #}
{% endif %}
{# THREE: DEPOSIT TO WITHDRAWAL #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Withdrawal' %}
{{ transaction.destination_name }}
{# hide new source in hidden input #}
{% endif %}
{# FOUR: DEPOSIT TO TRANSFER #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
{# if new destination is asset, then asset #}
{% if transaction.destination_type == 'Asset account' %}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', assets).class('form-control') }}
{% endif %}
{% if transaction.destination_type == 'Loan' or
transaction.destination_type == 'Debt' or
transaction.destination_type == 'Mortgage' %}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', liabilities).class('form-control') }}
{% endif %}
{# if new destination liability, then liability. #}
{% endif %}
{# FIVE: TRANSFER TO WITHDRAWAL #}
{% if sourceType.type == 'Transfer' and destinationType.type == 'Withdrawal' %}
{{ transaction.source_name }}
{# hide source in hidden input #}
{% endif %}
{# SIX: TRANSFER TO DEPOSIT #}
{% if sourceType.type == 'Transfer' and destinationType.type == 'Deposit' %}
{# NEW DESTINATION = Asset, SOURCE MUST BE [Revenue, Cash, Loan, Debt, Mortgage] #}
{% if
transaction.source_type == 'Asset account' %}
{{ Html.select('source_id['~transaction.transaction_journal_id~']', validDepositSources).class('form-control') }}
{% endif %}
{# NEW DESTINATION = [Debt, Mortgage, Load], SOURCE MUST BE [Revenue] #}
{% if
transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
transaction.source_type == 'Mortgage' %}
{% endif %}
{% endif %}
|
{# ONE: WITHDRAWAL TO DEPOSIT #}
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Deposit' %}
{{ transaction.source_name }}
{# hide destination in hidden input #}
{% endif %}
{# TWO: WITHDRAWAL TO TRANSFER #}
{% if sourceType.type == 'Withdrawal' and destinationType.type == 'Transfer' %}
{# if the source is a liability, destination must also be a liability. #}
{% if
transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
transaction.source_type == 'Mortgage' %}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', liabilities).class('form-control') }}
{% endif %}
{# if the source is an asset, destination can only be an asset. #}
{% if transaction.source_type == 'Asset account' %}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', assets).class('form-control') }}
{% endif %}
{% endif %}
{# THREE: DEPOSIT TO WITHDRAWAL #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Withdrawal' %}
{# if new source is Asset, destination must be [Expense, Loan, Debt or Mortgage] #}
{% if transaction.destination_type == 'Asset account' %}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests).class('form-control') }}
{% endif %}
{% if transaction.destination_type == 'Loan' or
transaction.destination_type == 'Debt' or
transaction.destination_type == 'Mortgage' %}
{# if new source is Liability, destination must be expense account. #}
{% endif %}
{% endif %}
{# FOUR: DEPOSIT TO TRANSFER #}
{% if sourceType.type == 'Deposit' and destinationType.type == 'Transfer' %}
{{ transaction.destination_name }}
{# hide destination in hidden input #}
{% endif %}
{# FIVE: TRANSFER TO WITHDRAWAL #}
{% if sourceType.type == 'Transfer' and destinationType.type == 'Withdrawal' %}
{% if transaction.source_type == 'Asset account' %}
{{ Html.select('destination_id['~transaction.transaction_journal_id~']', validWithdrawalDests).class('form-control') }}
{% endif %}
{% if transaction.source_type == 'Loan' or
transaction.source_type == 'Debt' or
transaction.source_type == 'Mortgage' %}
{% endif %}
{% endif %}
{# SIX: TRANSFER TO DEPOSIT #}
{% if sourceType.type == 'Transfer' and destinationType.type == 'Deposit' %}
{{ transaction.destination_name }}
{# hide destination in hidden input #}
{% endif %}
|
{% if transaction.transaction_type_type == 'Deposit' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% elseif transaction.transaction_type_type == 'Transfer' %}
{{ formatAmountBySymbol(transaction.amount*-1, transaction.currency_symbol, transaction.currency_decimal_places, false) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount*-1, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places, false) }})
{% endif %}
{% else %}
{{ formatAmountBySymbol(transaction.amount, transaction.currency_symbol, transaction.currency_decimal_places) }}
{% if null != transaction.foreign_amount %}
({{ formatAmountBySymbol(transaction.foreign_amount, transaction.foreign_currency_symbol, transaction.foreign_currency_decimal_places) }})
{% endif %}
{% endif %}
|
{% endfor %}