foodsoft/app/views/finance/balancing/_orders.html.haml
Philipp Rothmann 93143c28f2 merge automatic group order invoice generation
see https://github.com/foodcoops/foodsoft/pull/907 for reference
and original work by viehlieb

Co-authored-by: viehlieb <pf@pragma-shift.net>

fix PDF Pdf

make explicit deposit in invoices work

add ordergroupname to invoice file name

mark bold sum for vat exempt foodcoops

download multiple group order invoice as zip
2023-10-05 10:21:35 +02:00

39 lines
1.7 KiB
Text

- unless @orders.empty?
- if Order.finished.count > 20
= items_per_page
= pagination_links_remote @orders
%table.table.table-striped
%thead
%tr
%th= t('.name')
%th= t('.end')
%th= t('.state')
%th= heading_helper Order, :updated_by
%th= heading_helper GroupOrderInvoice, :name
%th
%th
%tbody
- @orders.each do |order|
%tr{:class => cycle("even","odd", :name => "order")}
%td= link_to truncate(order.name), new_finance_order_path(order_id: order.id)
%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')
%td
- unless order.closed?
- if current_user.role_orders?
- unless order.stockit?
= link_to t('orders.index.action_receive'), receive_order_path(order), class: 'btn btn-small'
- 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')