wip multi orders
This commit is contained in:
parent
fd769509af
commit
f676497e43
29 changed files with 939 additions and 107 deletions
26
app/views/finance/balancing/_order_row.html.haml
Normal file
26
app/views/finance/balancing/_order_row.html.haml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
%tr{:class => cycle("even","odd", :name => "order"), 'data-order_id' => order.id}
|
||||
%td
|
||||
= check_box_tag "order_ids_for_multi_order[]", order.id, false, class: "order-checkbox", id: "order_#{order.id}_combine", data: { order_id: order.id }
|
||||
%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('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'}
|
||||
- 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'
|
||||
-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('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;'}
|
||||
%td{:colspan => '7'}
|
||||
= render partial: 'group_order_invoices/modal', locals: { order: order }
|
||||
Loading…
Add table
Add a link
Reference in a new issue