71 lines
4.3 KiB
Text
71 lines
4.3 KiB
Text
|
|
|
|
- show_generate_with_date = true
|
|
- multi_order.multi_group_orders.each do |mgo|
|
|
- if mgo.ordergroup_invoice.present?
|
|
- show_generate_with_date = false
|
|
- if show_generate_with_date
|
|
= form_for :ordergroup_invoice, url: url_for('ordergroup_invoice#create_multiple'), remote: true do |f|
|
|
= f.label :invoice_date, I18n.t('activerecord.attributes.group_order_invoice.links.invoice_date')
|
|
= f.date_field :invoice_date, {value: Date.today, max: Date.today, required: true}
|
|
= f.hidden_field :multi_order_id, value: multi_order.id
|
|
|
|
= f.submit I18n.t('activerecord.attributes.group_order_invoice.links.generate_with_date'), class: 'btn btn'
|
|
|
|
%table.table.group-order-invoices-table
|
|
%thead
|
|
%tr
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.ordergroup')
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.paid')
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.sepa_downloaded')
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.sepa_sequence_type')
|
|
%th=I18n.t('activerecord.attributes.group_order_invoice.links.sepa_select')
|
|
%th
|
|
%tbody
|
|
- multi_order.multi_group_orders.each do |mgo|
|
|
-if mgo.ordergroup_invoice.present?
|
|
- if mgo.ordergroup_invoice
|
|
= mgo.ordergroup_invoice.invoice_number
|
|
%tr.order-row{id: "multi_group_order_#{mgo.id}"}
|
|
%td= link_to mgo.ordergroup&.name, edit_admin_ordergroup_path(mgo.ordergroup)
|
|
%td
|
|
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), ordergroup_invoice_path(mgo.ordergroup_invoice, :format => 'pdf'), class: 'btn btn-block'
|
|
-# .div{id: "paid_#{mgo.ordergroup_invoice.id}"}
|
|
-# = render :partial => "group_order_invoices/toggle_paid", locals: { group_order_invoice: go.group_order_invoice }
|
|
-# %td
|
|
-# .div{id: "sepa_downloaded_#{go.group_order_invoice.id}"}
|
|
-# = render :partial => "group_order_invoices/toggle_sepa_downloaded", locals: { group_order_invoice: go.group_order_invoice }
|
|
-# %td
|
|
-# .div{id: "select_sepa_sequence_type_#{go.group_order_invoice.id}"}
|
|
-# =render :partial => 'group_order_invoices/select_sepa_sequence_type', locals:{ group_order_invoice: go.group_order_invoice, group_order: go }
|
|
-# %td
|
|
-# = check_box_tag "group_order_ids_for_order_#{multi_order.id}", go.id, false, class: "group-order-checkbox", id: "group_order_#{go.id}_included_in_sepa", data: { order_id: go.id }
|
|
-# = link_to I18n.t('activerecord.attributes.group_order_invoice.links.delete'), go.group_order_invoice, method: :delete, class: 'btn btn-block btn-danger', remote: true, data: { confirm: I18n.t('ui.confirm_delete', name: "Bestellgruppenrechnung für #{go.ordergroup.name}" ) }
|
|
-# - else
|
|
-# %tr
|
|
-# %td
|
|
-# = go.ordergroup&.name
|
|
-# = button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: multi_order.id}, remote: true
|
|
-# %td
|
|
-# %td
|
|
-# %td
|
|
-# %td
|
|
-# %td
|
|
|
|
-# - if multi_order.group_orders.map(&:group_order_invoice).compact.present?
|
|
-# %tr.order-row
|
|
-# %td= I18n.t('activerecord.attributes.group_order_invoice.links.actions_for_all')
|
|
-# %td
|
|
-# .div{id: "toggle_all_paid_#{multi_order.id}"}
|
|
-# = render :partial => 'group_order_invoices/toggle_all_paid', locals: { order: order }
|
|
-# %td
|
|
-# .div{id: "toggle_all_sepa_downloaded_#{multi_order.id}"}
|
|
-# = render :partial => 'group_order_invoices/toggle_all_sepa_downloaded', locals: { order: order }
|
|
-# %td
|
|
-# .div{id: "select_all_sepa_sequence_type_#{multi_order.id}"}
|
|
-# = render :partial => 'group_order_invoices/select_all_sepa_sequence_type', locals: { order: multi_order }
|
|
-# %td
|
|
-# .div{id: "select_all_sepa_#{multi_order.id}"}
|
|
-# = render :partial => 'group_order_invoices/collective_direct_debit', locals: { order: multi_order }
|
|
-# %td
|
|
-# = link_to I18n.t('activerecord.attributes.group_order_invoice.links.download_all_zip'), download_all_group_order_invoices_path(multi_order), class: 'btn btn-block'
|