Hide stock order button in stock orders

This commit is contained in:
Patrick Gansterer 2021-02-08 01:04:46 +01:00
parent 8e12b15c88
commit 979439f967

View file

@ -69,10 +69,11 @@
- if @order.open? - if @order.open?
= link_to t('.action_end'), finish_order_path(@order), method: :post, class: 'btn btn-success', = link_to t('.action_end'), finish_order_path(@order), method: :post, class: 'btn btn-success',
data: {confirm: t('.confirm_end', order: @order.name)} data: {confirm: t('.confirm_end', order: @order.name)}
- if @order.stock_group_order - if @order.supplier
= link_to t('.stock_order'), edit_group_order_path(@order.stock_group_order, :order_id => @order.id), class: 'btn' - if @order.stock_group_order
- else = link_to t('.stock_order'), edit_group_order_path(@order.stock_group_order, order_id: @order.id), class: 'btn'
= link_to t('.stock_order'), new_group_order_path(:order_id => @order.id, :stock_order => true), class: 'btn' - else
= link_to t('.stock_order'), new_group_order_path(order_id: @order.id, stock_order: true), class: 'btn'
= link_to t('ui.edit'), edit_order_path(@order), class: 'btn' = link_to t('ui.edit'), edit_order_path(@order), class: 'btn'
- elsif not @order.closed? and not @order.stockit? - elsif not @order.closed? and not @order.stockit?
= link_to t('.send_to_supplier'), send_result_to_supplier_order_path(@order), method: :post, = link_to t('.send_to_supplier'), send_result_to_supplier_order_path(@order), method: :post,