enable actions for multi (group) orders and ordergroup invoices

This commit is contained in:
viehlieb 2025-05-19 16:37:05 +02:00
parent f676497e43
commit e902aa0d5a
44 changed files with 550 additions and 324 deletions

View file

@ -5,10 +5,10 @@
%td=h format_time(order.ends) unless order.ends.nil?
%td= order.closed? ? t('finance.balancing.orders.cleared', amount: number_to_currency(order.foodcoop_result)) : t('finance.balancing.orders.ended')
%td= show_user(order.updated_by)
%td{id: "group-order-invoices-for-order-#{order.id}", class: 'expand-trigger'}
%td{id: "group-order-invoices-for-order-#{order.id}"}
- if order.closed?
-if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present?
= link_to I18n.t('activerecord.attributes.group_order_invoice.open_details_modal'), "#", remote: true, class: 'btn btn-small'
= link_to I18n.t('activerecord.attributes.group_order_invoice.open_details_modal'), "#", remote: true, class: 'btn btn-small expand-trigger'
-else
= I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')
- else
@ -21,6 +21,6 @@
- else
= link_to t('orders.index.action_receive'), '#', class: 'btn btn-small disabled'
= link_to t('finance.balancing.orders.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-small btn-primary'
%tr{:class => 'expanded-row', :id => "expanded-row-#{order.id}", :style => 'display: none;'}
%tr{:class => 'expanded-row hidden', :id => "expanded-row-#{order.id}"}
%td{:colspan => '7'}
= render partial: 'group_order_invoices/modal', locals: { order: order }