Fix copy operation for stock orders
Stock orders have the supplier_id set to zero, which will be ignored in the url-method by rails. Only use the order_id to fix this.
This commit is contained in:
parent
3a4519757e
commit
d73c206e29
3 changed files with 11 additions and 4 deletions
|
|
@ -17,5 +17,5 @@
|
|||
%td= format_time(order.ends)
|
||||
%td= t(order.state, scope: 'orders.state')
|
||||
%td
|
||||
= link_to t('ui.copy'), new_order_path(order_id: order, supplier_id: order.supplier), class: 'btn btn-small'
|
||||
= link_to t('ui.copy'), new_order_path(order_id: order), class: 'btn btn-small'
|
||||
= link_to t('ui.show'), order, class: 'btn btn-small'
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
= receive_button order, class: 'btn-small'
|
||||
|
||||
%td
|
||||
= link_to t('ui.copy'), new_order_path(order_id: order, supplier_id: order.supplier), class: 'btn btn-small'
|
||||
= link_to t('ui.copy'), new_order_path(order_id: order), class: 'btn btn-small'
|
||||
= link_to t('ui.show'), order, class: 'btn btn-small'
|
||||
= link_to t('ui.delete'), order, data: {confirm: t('.confirm_delete')}, method: :delete,
|
||||
class: 'btn btn-small btn-danger'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue