Add option to create a new FinancialTransaction at a FinancialLink

This commit is contained in:
Patrick Gansterer 2021-02-08 02:47:05 +01:00
parent 0e77a0e77c
commit a30d0d4453
8 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,14 @@
= simple_form_for @financial_transaction, url: create_financial_transaction_finance_link_path(@financial_link),
:validate => true do |f|
.modal-header
= close_button :modal
%h3= t('.title')
.modal-body
- if FinancialTransactionType.has_multiple_types
= f.association :financial_transaction_type, include_blank: false
= f.input :amount
= f.association :ordergroup, collection: Ordergroup.undeleted.order(:name)
= f.input :note, :as => :text
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= f.submit class: 'btn btn-primary'