foodsoft/app/views/finance/bank_transactions/show.html.haml

42 lines
1.5 KiB
Text
Raw Permalink Normal View History

2018-09-14 19:33:27 +02:00
%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)
2018-09-14 19:33:27 +02:00
%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
2018-09-14 19:33:27 +02:00
- 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)