Hide IBAN of BankTransactions when empty

This commit is contained in:
Patrick Gansterer 2021-02-08 01:04:57 +01:00
parent 979439f967
commit 373d137f9f

View file

@ -7,18 +7,19 @@
%p %p
%b= heading_helper(BankTransaction, :amount) + ':' %b= heading_helper(BankTransaction, :amount) + ':'
= number_to_currency(@bank_transaction.amount) = number_to_currency(@bank_transaction.amount)
%p - if @bank_transaction.iban?
%b= heading_helper(BankTransaction, :iban) + ':' %p
= @bank_transaction.iban %b= heading_helper(BankTransaction, :iban) + ':'
- if user = @bank_transaction.user = @bank_transaction.iban
= t('.belongs_to_user') - if user = @bank_transaction.user
= user.display = t('.belongs_to_user')
- if user.ordergroup = user.display
= t('.in_ordergroup') - if user.ordergroup
= link_to user.ordergroup.name, finance_ordergroup_transactions_path(user.ordergroup) = t('.in_ordergroup')
- elsif supplier = @bank_transaction.supplier = link_to user.ordergroup.name, finance_ordergroup_transactions_path(user.ordergroup)
= t('.belongs_to_supplier') - elsif supplier = @bank_transaction.supplier
= link_to supplier.name, supplier_path(supplier) = t('.belongs_to_supplier')
= link_to supplier.name, supplier_path(supplier)
%p %p
%b= heading_helper(BankTransaction, :reference) + ':' %b= heading_helper(BankTransaction, :reference) + ':'
= @bank_transaction.reference = @bank_transaction.reference