fix ordergroup create & ordergroup deleted for real destroy finances view
This commit is contained in:
parent
fc46281de8
commit
caa5adbfe2
3 changed files with 48 additions and 46 deletions
|
@ -22,7 +22,7 @@ RUN buildDeps='libmagic-dev' && \
|
|||
apt-get update && \
|
||||
apt-get install --no-install-recommends -y $buildDeps && \
|
||||
echo 'gem: --no-document' >> ~/.gemrc && \
|
||||
gem install bundler && \
|
||||
gem install bundler -v 2.4.22 && \
|
||||
bundle config build.nokogiri "--use-system-libraries" && \
|
||||
bundle install --deployment --without development test -j 4 && \
|
||||
apt-get purge -y --auto-remove $buildDeps && \
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
= f.input :contact_person
|
||||
= f.input :contact_phone
|
||||
= f.input :contact_address
|
||||
= render 'sepa_account_holder', f: f
|
||||
- unless @ordergroup.new_record?
|
||||
= render 'sepa_account_holder', f: f
|
||||
= render 'shared/custom_form_fields', f: f, type: :ordergroup
|
||||
.fold-line
|
||||
= f.input :break_start, as: :date_picker, label: Ordergroup.human_attribute_name('break')
|
||||
|
|
|
@ -23,48 +23,49 @@
|
|||
%th
|
||||
%tbody
|
||||
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
||||
- if go.group_order_invoice
|
||||
%tr.order-row{id: "group_order_#{go.id}"}
|
||||
%td= link_to go.ordergroup.name, edit_admin_ordergroup_path(go.ordergroup)
|
||||
%td
|
||||
.div{id: "paid_#{go.group_order_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_#{order.id}", go.id, false, class: "group-order-checkbox", id: "group_order_#{go.id}_included_in_sepa", data: { order_id: go.id }
|
||||
%td
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-block'
|
||||
= 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: order.id}, remote: true
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
-if go.ordergroup.present?
|
||||
- if go.group_order_invoice
|
||||
%tr.order-row{id: "group_order_#{go.id}"}
|
||||
%td= link_to go.ordergroup&.name, edit_admin_ordergroup_path(go.ordergroup)
|
||||
%td
|
||||
.div{id: "paid_#{go.group_order_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_#{order.id}", go.id, false, class: "group-order-checkbox", id: "group_order_#{go.id}_included_in_sepa", data: { order_id: go.id }
|
||||
%td
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-block'
|
||||
= 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: order.id}, remote: true
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
|
||||
- if 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_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/toggle_all_paid', locals: { order: order }
|
||||
%td
|
||||
.div{id: "toggle_all_sepa_downloaded_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/toggle_all_sepa_downloaded', locals: { order: order }
|
||||
%td
|
||||
.div{id: "select_all_sepa_sequence_type_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/select_all_sepa_sequence_type', locals: { order: order }
|
||||
%td
|
||||
.div{id: "select_all_sepa_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/collective_direct_debit', locals: { order: order }
|
||||
%td
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download_all_zip'), download_all_group_order_invoices_path(order), class: 'btn btn-block'
|
||||
- if 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_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/toggle_all_paid', locals: { order: order }
|
||||
%td
|
||||
.div{id: "toggle_all_sepa_downloaded_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/toggle_all_sepa_downloaded', locals: { order: order }
|
||||
%td
|
||||
.div{id: "select_all_sepa_sequence_type_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/select_all_sepa_sequence_type', locals: { order: order }
|
||||
%td
|
||||
.div{id: "select_all_sepa_#{order.id}"}
|
||||
= render :partial => 'group_order_invoices/collective_direct_debit', locals: { order: order }
|
||||
%td
|
||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download_all_zip'), download_all_group_order_invoices_path(order), class: 'btn btn-block'
|
||||
|
|
Loading…
Reference in a new issue