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 update && \
|
||||||
apt-get install --no-install-recommends -y $buildDeps && \
|
apt-get install --no-install-recommends -y $buildDeps && \
|
||||||
echo 'gem: --no-document' >> ~/.gemrc && \
|
echo 'gem: --no-document' >> ~/.gemrc && \
|
||||||
gem install bundler && \
|
gem install bundler -v 2.4.22 && \
|
||||||
bundle config build.nokogiri "--use-system-libraries" && \
|
bundle config build.nokogiri "--use-system-libraries" && \
|
||||||
bundle install --deployment --without development test -j 4 && \
|
bundle install --deployment --without development test -j 4 && \
|
||||||
apt-get purge -y --auto-remove $buildDeps && \
|
apt-get purge -y --auto-remove $buildDeps && \
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
= f.input :contact_person
|
= f.input :contact_person
|
||||||
= f.input :contact_phone
|
= f.input :contact_phone
|
||||||
= f.input :contact_address
|
= 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
|
= render 'shared/custom_form_fields', f: f, type: :ordergroup
|
||||||
.fold-line
|
.fold-line
|
||||||
= f.input :break_start, as: :date_picker, label: Ordergroup.human_attribute_name('break')
|
= f.input :break_start, as: :date_picker, label: Ordergroup.human_attribute_name('break')
|
||||||
|
|
|
@ -23,48 +23,49 @@
|
||||||
%th
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
||||||
- if go.group_order_invoice
|
-if go.ordergroup.present?
|
||||||
%tr.order-row{id: "group_order_#{go.id}"}
|
- if go.group_order_invoice
|
||||||
%td= link_to go.ordergroup.name, edit_admin_ordergroup_path(go.ordergroup)
|
%tr.order-row{id: "group_order_#{go.id}"}
|
||||||
%td
|
%td= link_to go.ordergroup&.name, edit_admin_ordergroup_path(go.ordergroup)
|
||||||
.div{id: "paid_#{go.group_order_invoice.id}"}
|
%td
|
||||||
= render :partial => "group_order_invoices/toggle_paid", locals: { group_order_invoice: go.group_order_invoice }
|
.div{id: "paid_#{go.group_order_invoice.id}"}
|
||||||
%td
|
= render :partial => "group_order_invoices/toggle_paid", locals: { group_order_invoice: go.group_order_invoice }
|
||||||
.div{id: "sepa_downloaded_#{go.group_order_invoice.id}"}
|
%td
|
||||||
= render :partial => "group_order_invoices/toggle_sepa_downloaded", locals: { group_order_invoice: go.group_order_invoice }
|
.div{id: "sepa_downloaded_#{go.group_order_invoice.id}"}
|
||||||
%td
|
= render :partial => "group_order_invoices/toggle_sepa_downloaded", locals: { group_order_invoice: go.group_order_invoice }
|
||||||
.div{id: "select_sepa_sequence_type_#{go.group_order_invoice.id}"}
|
%td
|
||||||
=render :partial => 'group_order_invoices/select_sepa_sequence_type', locals:{ group_order_invoice: go.group_order_invoice, group_order: go }
|
.div{id: "select_sepa_sequence_type_#{go.group_order_invoice.id}"}
|
||||||
%td
|
=render :partial => 'group_order_invoices/select_sepa_sequence_type', locals:{ group_order_invoice: go.group_order_invoice, group_order: go }
|
||||||
= 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
|
||||||
%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 }
|
||||||
= 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'
|
%td
|
||||||
= 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}" ) }
|
= 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'
|
||||||
- else
|
= 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}" ) }
|
||||||
%tr
|
- else
|
||||||
%td
|
%tr
|
||||||
= go.ordergroup.name
|
%td
|
||||||
= 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
|
= go.ordergroup&.name
|
||||||
%td
|
= 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
|
%td
|
||||||
%td
|
%td
|
||||||
|
%td
|
||||||
|
|
||||||
- if order.group_orders.map(&:group_order_invoice).compact.present?
|
- if order.group_orders.map(&:group_order_invoice).compact.present?
|
||||||
%tr.order-row
|
%tr.order-row
|
||||||
%td= I18n.t('activerecord.attributes.group_order_invoice.links.actions_for_all')
|
%td= I18n.t('activerecord.attributes.group_order_invoice.links.actions_for_all')
|
||||||
%td
|
%td
|
||||||
.div{id: "toggle_all_paid_#{order.id}"}
|
.div{id: "toggle_all_paid_#{order.id}"}
|
||||||
= render :partial => 'group_order_invoices/toggle_all_paid', locals: { order: order }
|
= render :partial => 'group_order_invoices/toggle_all_paid', locals: { order: order }
|
||||||
%td
|
%td
|
||||||
.div{id: "toggle_all_sepa_downloaded_#{order.id}"}
|
.div{id: "toggle_all_sepa_downloaded_#{order.id}"}
|
||||||
= render :partial => 'group_order_invoices/toggle_all_sepa_downloaded', locals: { order: order }
|
= render :partial => 'group_order_invoices/toggle_all_sepa_downloaded', locals: { order: order }
|
||||||
%td
|
%td
|
||||||
.div{id: "select_all_sepa_sequence_type_#{order.id}"}
|
.div{id: "select_all_sepa_sequence_type_#{order.id}"}
|
||||||
= render :partial => 'group_order_invoices/select_all_sepa_sequence_type', locals: { order: order }
|
= render :partial => 'group_order_invoices/select_all_sepa_sequence_type', locals: { order: order }
|
||||||
%td
|
%td
|
||||||
.div{id: "select_all_sepa_#{order.id}"}
|
.div{id: "select_all_sepa_#{order.id}"}
|
||||||
= render :partial => 'group_order_invoices/collective_direct_debit', locals: { order: order }
|
= render :partial => 'group_order_invoices/collective_direct_debit', locals: { order: order }
|
||||||
%td
|
%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'
|
= 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