Link delivery/stock_taking/order in stock_changes index
This commit is contained in:
parent
ffcb9490c9
commit
7c27017306
1 changed files with 3 additions and 3 deletions
|
@ -2,11 +2,11 @@ module StockChangesHelper
|
|||
|
||||
def link_to_stock_change_reason(stock_change)
|
||||
if stock_change.delivery_id
|
||||
t '.delivery'
|
||||
link_to t('.delivery'), supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
|
||||
elsif stock_change.order_id
|
||||
t '.order'
|
||||
link_to t('.order'), order_path(stock_change.order)
|
||||
elsif stock_change.stock_taking_id
|
||||
t '.stock_taking'
|
||||
link_to t('.stock_taking'), stock_taking_path(stock_change.stock_taking)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue