Sha256: 3e42d1d7e7123ecfceaa5c19a30b7474ece01425668c8a4900d055cce9413bcb

Contents?: true

Size: 1.46 KB

Versions: 36

Compression:

Stored size: 1.46 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
          = select_tag 'invoice[items][][product_id]', options_for_select( @products_list ), class: 'products'

          %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

36 entries across 36 versions & 1 rubygems

Version Path
ish_manager-0.1.8.503 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.500 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.499 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.498 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.497 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.496 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.495 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.494 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.493 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.492 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.491 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.490 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.489 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.488 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.487 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.486 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.485 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.484 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.483 app/views/ish_manager/invoices/new_stripe.haml
ish_manager-0.1.8.482 app/views/ish_manager/invoices/new_stripe.haml