app/views/payments/_form.html.haml
= form_for [@invoice, @payment] do |f|
= render 'shared/error_messages', object: f.object
.row
.small-12.medium-12.large-3.columns
= f.label :received_on, '*Received on (yyyy-mm-dd)'
= f.text_field :received_on, id: "datePicker#{f.object.invoice.id}", class: 'datePicker', placeholder: 'Date'
.small-6.medium-6.large-2.columns
= f.label :transaction_type, 'Type'
= f.select :transaction_type, 'Check' => :check, 'Debit' => :debit, 'Credit' => :credit, 'Cash' => :cash
.small-6.medium-6.large-2.columns
= f.label :memo
= f.text_field :memo, placeholder: 'Check#'
.small-12.medium-12.large-2.columns
= f.label :amount
.input-group
%span.input-group-label $
= f.number_field :amount, step: 0.01, placeholder: '0.00',
value: amount_or_balance_due(f.object), class: 'input-group-field'
.small-12.medium-12.large-3.columns
= f.submit class: 'tiny button radius expanded tiny_button_down'