mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-06-12 11:12:11 +00:00
117 lines
7.9 KiB
PHP
117 lines
7.9 KiB
PHP
|
|
|
|
|
|
|
|
@if(\FireflyIII\Enums\TransactionTypeEnum::DEPOSIT->value === $transaction['transaction_type_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['amount'],'-1'), $transaction['currency_symbol'], $transaction['currency_decimal_places']) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['foreign_amount'], '-1'), $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['pc_amount'], '-1'), $primaryCurrency->symbol, $primaryCurrency->decimal_places) !!})
|
|
@endif
|
|
@endif
|
|
|
|
@if(\FireflyIII\Enums\TransactionTypeEnum::WITHDRAWAL->value === $transaction['transaction_type_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['amount'], $transaction['currency_symbol'], $transaction['currency_decimal_places']) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['foreign_amount'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places']) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['pc_amount'], $primaryCurrency->symbol, $primaryCurrency->decimal_places) !!})
|
|
@endif
|
|
@endif
|
|
|
|
@if(\FireflyIII\Enums\TransactionTypeEnum::TRANSFER->value === $transaction['transaction_type_type'])
|
|
<span class="text-info money-transfer">
|
|
{{-- transfer away --}}
|
|
@if(isset($account) && $transaction['source_account_id'] === $account->id)
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['amount'],'-1'), $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['foreign_amount'],'-1'), $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['pc_amount'], '-1'), $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
|
|
{{-- transfer in (default) --}}
|
|
@if(!isset($account) || $transaction['source_account_id'] !== $account->id)
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['amount'], $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['foreign_amount'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['pc_amount'], $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
</span>
|
|
@endif
|
|
|
|
|
|
@if(\FireflyIII\Enums\TransactionTypeEnum::OPENING_BALANCE->value === $transaction['transaction_type_type'])
|
|
{{-- Opening balance is deposited on this account (render as positive amount) --}}
|
|
@if(\FireflyIII\Enums\AccountTypeEnum::INITIAL_BALANCE->value === $transaction['source_account_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['amount'],'-1'), $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['foreign_amount'],'-1'), $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['pc_amount'], '-1'), $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
|
|
{{-- Opening balance is removed from this account (render as negative amount) --}}
|
|
@if(\FireflyIII\Enums\AccountTypeEnum::INITIAL_BALANCE->value === $transaction['destination_account_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['amount'], $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['foreign_amount'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['pc_amount'], $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
@endif
|
|
|
|
@if(\FireflyIII\Enums\TransactionTypeEnum::RECONCILIATION->value === $transaction['transaction_type_type'])
|
|
{{-- Reconciliation correction is deposited on this account (render as positive amount) --}}
|
|
@if(\FireflyIII\Enums\AccountTypeEnum::RECONCILIATION->value === $transaction['source_account_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['amount'],'-1'), $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['foreign_amount'],'-1'), $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol(bcmul($transaction['pc_amount'], '-1'), $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
|
|
{{-- Reconciliation correction is removed from this account (render as negative amount) --}}
|
|
@if(\FireflyIII\Enums\AccountTypeEnum::RECONCILIATION->value === $transaction['destination_account_type'])
|
|
{!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['amount'], $transaction['currency_symbol'], $transaction['currency_decimal_places'], false) !!}
|
|
@if(null !== $transaction['foreign_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['foreign_amount'], $transaction['foreign_currency_symbol'], $transaction['foreign_currency_decimal_places'], false) !!})
|
|
@endif
|
|
@if($convertToPrimary && null !== $transaction['pc_amount'])
|
|
({!! \FireflyIII\Support\Facades\Steam::formatAmountBySymbol($transaction['pc_amount'], $primaryCurrency->symbol, $primaryCurrency->decimal_places, false) !!})
|
|
@endif
|
|
@endif
|
|
@endif
|
|
|
|
|
|
{{--
|
|
<span class="pull-right small">
|
|
|
|
|
|
{% elseif transaction.transaction_type_type == 'Reconciliation' %}
|
|
{% 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 %}
|
|
{% if convertToPrimary and null != transaction.pc_amount %}
|
|
({{ formatAmountBySymbol(transaction.pc_amount, primaryCurrency.symbol, foreign_currency_.decimal_places) }})
|
|
{% endif %}
|
|
{% endif %}
|
|
</span>
|
|
--}}
|