Sha256: 808ede32d194f8b040895b9ab0bcc86bf808545a40da3574fc3e47d2beff8535

Contents?: true

Size: 1.48 KB

Versions: 23

Compression:

Stored size: 1.48 KB

Contents

- invoice = @new_invoice
- url = invoice.persisted? ? invoice_path( invoice.id ) : create_invoice_stripe_path


.invoices-new.max-width

  .row
    .col.s12.col.m6.col-md-offset-3
      %h5 New Stripe Invoice for `#{link_to @leadset&.name, leadset_path(@leadset)}`:

      = form_for invoice, :as => :invoice, :url => url do |f|
        = hidden_field_tag 'invoice[leadset_id]', @leadset.id

        .input-field
          %label Email
          = @leadset.email
          -# - if @leadset.email
          -#   = f.text_field :email, value: @leadset.email
          -# - elsif @leadset.employees.length == 1
          -#   = f.text_field :email, value: @leadset.employees[0].email
          -# - else
          -#   = f.select :email, options_for_select([[nil,nil]] + @leadset.employees.map { |i| [ i.email, i.email ] } )

        .input-row
          %label item (product)
          = select_tag 'invoice[items][][product_id]', options_for_select( @products_list ), class: 'products select2'

          %label price
          = select_tag 'invoice[items][][price_id]'

          %label quantity
          = number_field_tag 'invoice[items][][quantity]'

        -# .input-field
        -#   %label number
        -#   = f.number_field :number

        -# .input-field
        -#   %label Description
        -#   = f.text_area :description

        .input-field
          %label Send now?
          = check_box_tag :do_send

        .actions

          = f.submit 'Create', data: { confirm: 'Are you sure?' }

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
wco_models-3.1.0.50 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.49 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.48 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.47 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.46 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.45 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.44 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.43 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.42 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.41 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.40 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.39 app/views/wco/invoices/new_stripe.haml
wco_models-3.1.0.38 app/views/wco/invoices/new_stripe.haml
ish_manager-0.1.8.513 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.512 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.511 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.510 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.509 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.508 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.507 app/views/ish_manager/invoices/new_stripe.haml