Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -12,12 +12,12 @@ module GroupOrdersHelper
|
|||
def link_to_ordering(order, options = {}, &block)
|
||||
group_order = order.group_order(current_user.ordergroup)
|
||||
path = if options[:show] && group_order
|
||||
group_order_path(group_order)
|
||||
elsif group_order
|
||||
edit_group_order_path(group_order, :order_id => order.id)
|
||||
else
|
||||
new_group_order_path(:order_id => order.id)
|
||||
end
|
||||
group_order_path(group_order)
|
||||
elsif group_order
|
||||
edit_group_order_path(group_order, :order_id => order.id)
|
||||
else
|
||||
new_group_order_path(:order_id => order.id)
|
||||
end
|
||||
options.delete(:show)
|
||||
name = block_given? ? capture(&block) : order.name
|
||||
path ? link_to(name, path, options) : name
|
||||
|
|
@ -36,18 +36,18 @@ module GroupOrdersHelper
|
|||
def get_order_results(order_article, group_order_id)
|
||||
goa = order_article.group_order_articles.detect { |goa| goa.group_order_id == group_order_id }
|
||||
quantity, tolerance, result, sub_total = if goa.present?
|
||||
[goa.quantity, goa.tolerance, goa.result, goa.total_price(order_article)]
|
||||
else
|
||||
[0, 0, 0, 0]
|
||||
end
|
||||
[goa.quantity, goa.tolerance, goa.result, goa.total_price(order_article)]
|
||||
else
|
||||
[0, 0, 0, 0]
|
||||
end
|
||||
|
||||
{group_order_article: goa, quantity: quantity, tolerance: tolerance, result: result, sub_total: sub_total}
|
||||
{ group_order_article: goa, quantity: quantity, tolerance: tolerance, result: result, sub_total: sub_total }
|
||||
end
|
||||
|
||||
def get_missing_units_css_class(quantity_missing)
|
||||
if ( quantity_missing == 1 )
|
||||
if (quantity_missing == 1)
|
||||
return 'missing-few';
|
||||
elsif ( quantity_missing == 0 )
|
||||
elsif (quantity_missing == 0)
|
||||
return ''
|
||||
else
|
||||
return 'missing-many'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue