foodsoft/app/views/finance/bank_transactions/show.html.haml
twothreenine 401c8f50a8
better readable IBAN (#824)
display IBANs in groups of 4 digits with whitespaces in between
2021-02-20 12:16:21 +01:00

41 lines
1.5 KiB
Text

%p
%b= heading_helper(BankTransaction, :external_id) + ':'
= @bank_transaction.external_id
%p
%b= heading_helper(BankTransaction, :date) + ':'
= @bank_transaction.date
%p
%b= heading_helper(BankTransaction, :amount) + ':'
= number_to_currency(@bank_transaction.amount)
- if @bank_transaction.iban?
%p
%b= heading_helper(BankTransaction, :iban) + ':'
= format_iban @bank_transaction.iban
- if user = @bank_transaction.user
= t('.belongs_to_user')
= user.display
- if user.ordergroup
= t('.in_ordergroup')
= link_to user.ordergroup.name, finance_ordergroup_transactions_path(user.ordergroup)
- elsif supplier = @bank_transaction.supplier
= t('.belongs_to_supplier')
= link_to supplier.name, supplier_path(supplier)
%p
%b= heading_helper(BankTransaction, :reference) + ':'
= @bank_transaction.reference
%p
%b= heading_helper(BankTransaction, :text) + ':'
= h(@bank_transaction.text).gsub("\n", "<br>").html_safe
%p
%b= heading_helper(BankTransaction, :financial_link) + ':'
- if @bank_transaction.financial_link
= link_to t('ui.show'), finance_link_path(@bank_transaction.financial_link)
- else
= link_to t('.add_financial_link'), finance_links_path(bank_transaction: @bank_transaction.id), method: :post
- unless @bank_transaction.receipt.blank?
%pre= preserve @bank_transaction.receipt
- if @bank_transaction.image
%p= image_tag @bank_transaction.image_url
= link_to t('ui.or_cancel'), finance_bank_account_transactions_path(@bank_transaction.bank_account)