Remove stock_changes_helper.rb
This commit is contained in:
parent
730dc7cf2a
commit
12506e54b8
2 changed files with 10 additions and 13 deletions
|
@ -1,13 +0,0 @@
|
||||||
module StockChangesHelper
|
|
||||||
|
|
||||||
def link_to_stock_change_reason(stock_change)
|
|
||||||
if stock_change.delivery_id
|
|
||||||
link_to t('.delivery'), supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
|
|
||||||
elsif stock_change.order_id
|
|
||||||
link_to t('.order'), order_path(stock_change.order)
|
|
||||||
elsif stock_change.stock_taking_id
|
|
||||||
link_to t('.stock_taking'), stock_taking_path(stock_change.stock_taking)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -4,4 +4,14 @@ module StockitHelper
|
||||||
class_names << "unavailable" if article.quantity_available <= 0
|
class_names << "unavailable" if article.quantity_available <= 0
|
||||||
class_names.join(" ")
|
class_names.join(" ")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def link_to_stock_change_reason(stock_change)
|
||||||
|
if stock_change.delivery_id
|
||||||
|
link_to t('.delivery'), supplier_delivery_path(stock_change.delivery.supplier, stock_change.delivery)
|
||||||
|
elsif stock_change.order_id
|
||||||
|
link_to t('.order'), order_path(stock_change.order)
|
||||||
|
elsif stock_change.stock_taking_id
|
||||||
|
link_to t('.stock_taking'), stock_taking_path(stock_change.stock_taking)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue