= semantic_form_for resource do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :customer_id, :as => :hidden
    = f.input :state, :as => :hidden
    = f.input :company, :input_html => {:class => 'combobox', 'data-autofocus' => true}
    = f.input :title
    = f.input :value_date, :as => :date_field
    = f.input :amount
    = f.input :due_date, :as => :date_field
    = f.input :remarks

  = f.buttons do
    = f.commit_button

= semantic_form_for resource do |f|
  = f.semantic_errors
  = f.inputs do
    = f.input :customer_id, :as => :hidden
    = f.input :state, :as => :hidden
    = f.input :company, :input_html => {:class => 'combobox', 'data-autofocus' => true}
    = f.input :title
    = f.input :value_date, :as => :date_field
    = f.input :amount
    = f.input :due_date, :as => :date_field
    = f.input :remarks

  = f.inputs do
    = f.semantic_fields_for :attachments do |a|
      = a.input :file, :as => :file

  = f.buttons do
    = f.commit_button

Add field for credit_invoice form.
Add field for credit_invoice form.
