Add model and views for bank accounts
This commit is contained in:
parent
4b1e9a6f53
commit
f0a55fb951
24 changed files with 351 additions and 1 deletions
12
app/views/finance/bank_accounts/import.html.haml
Normal file
12
app/views/finance/bank_accounts/import.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
- title t('.title', name: @bank_account.name)
|
||||
|
||||
= form_for :bank_accounts, :url => parse_upload_finance_bank_account_path(@bank_account),
|
||||
:html => { multipart: true, class: "form-horizontal" } do |f|
|
||||
|
||||
.control-group
|
||||
%label(for="bank_transactions_file")= t '.file_label'
|
||||
= f.file_field "file"
|
||||
|
||||
.form-actions
|
||||
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||
= link_to t('ui.or_cancel'), finance_bank_account_transactions_path(@bank_account)
|
||||
16
app/views/finance/bank_accounts/index.html.haml
Normal file
16
app/views/finance/bank_accounts/index.html.haml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
- title t('.title')
|
||||
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= heading_helper BankAccount, :name
|
||||
%th= heading_helper BankAccount, :iban
|
||||
%th= heading_helper BankAccount, :description
|
||||
%th= heading_helper BankAccount, :balance
|
||||
%tbody
|
||||
- for account in @bank_accounts
|
||||
%tr
|
||||
%td= link_to account.name, finance_bank_account_transactions_path(account)
|
||||
%td= account.iban
|
||||
%td= truncate account.description, length: 50
|
||||
%td.numeric{style: 'width:5em'}= format_currency account.balance
|
||||
Loading…
Add table
Add a link
Reference in a new issue