foodsoft/app/views/finance/balancing/_multi_order_row.html.haml
2025-05-08 11:59:35 +02:00

22 lines
No EOL
1.4 KiB
Text

%tr{:class => cycle("even","odd", :name => "multi_order"), 'data-multi_order_id' => multi_order.id}
%td
= check_box_tag "multi_order_ids_for_multi_multi_order[]", multi_order.id, false, class: "multi_order-checkbox", id: "multi_order_#{multi_order.id}_combine", data: { multi_order_id: multi_order.id }
%td
= "*Multi*"
-multi_order.orders.each do |order|
= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
=", " if order != multi_order.orders.last
%td=h format_time(multi_order.ends) unless multi_order.ends.nil?
%td= multi_order.closed? ? t('finance.balancing.orders.cleared', amount: number_to_currency(multi_order.foodcoop_result)) : t('finance.balancing.orders.ended')
%td= show_user(multi_order.updated_by)
%td{id: "group-multi_order-invoices-for-multi-order-#{multi_order.id}", class: 'expand-trigger'}
- if multi_order.closed?
-if FoodsoftConfig[:contact][:tax_number] && multi_order.group_orders.present?
= link_to I18n.t('activerecord.attributes.group_order_invoice.open_details_modal'), "#", remote: true, class: 'btn btn-small'
-else
= I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')
- else
= t('orders.index.not_closed')
%tr{:class => 'expanded-row', :id => "expanded-row-#{multi_order.id}", :style => 'display: none;'}
%td{:colspan => '6'}
= render partial: 'ordergroup_invoices/modal', locals: { multi_order: multi_order }