wip move stuff to a plugin

This commit is contained in:
Philipp Rothmann 2023-07-24 16:17:19 +02:00
parent 9a34f174a6
commit 6e80f81c54
22 changed files with 174 additions and 812 deletions

View file

@ -9,8 +9,7 @@
%th= t('.end')
%th= t('.state')
%th= heading_helper Order, :updated_by
%th= heading_helper GroupOrderInvoice, :name
%th
%th
%tbody
- @orders.each do |order|
@ -19,14 +18,8 @@
%td=h format_time(order.ends) unless order.ends.nil?
%td= order.closed? ? t('.cleared', amount: number_to_currency(order.foodcoop_result)) : t('.ended')
%td= show_user(order.updated_by)
%td{id: "generate-invoice#{order.id}"}
- if order.closed?
-if FoodsoftConfig[:contact][:tax_number] && order.ordergroups.present?
= render :partial => 'group_order_invoices/links', locals:{order: order}
-else
= I18n.t('activerecord.attributes.group_order_invoice.tax_number_not_set')
- else
= t('orders.index.not_closed')
/ placeholder deface to add content using erb[silent]:contains()
- '<orders_body_mark>'
%td
- unless order.closed?
- if current_user.role_orders?
@ -35,5 +28,6 @@
- else
= link_to t('orders.index.action_receive'), '#', class: 'btn btn-small disabled'
= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-small btn-primary'
- else
%i= t('.no_closed_orders')