Skip to content

Commit

Permalink
Fixes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed May 20, 2024
1 parent 58ecae5 commit 26ae28f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/helpers/orders_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ def units_history_line(order_article, options = {})
%i[units_to_order units_billed units_received].map do |unit|
next unless n = order_article.send(unit)

converted_quantity = price.convert_quantity(n, price.supplier_order_unit,
price.billing_unit.presence || price.supplier_order_unit)
converted_quantity = price.convert_quantity(n, price.supplier_order_unit, options[:unit].presence || price.supplier_order_unit)
line = converted_quantity.round(3).to_s + ' '
line += pkg_helper(price, options) + ' ' unless n == 0
line += OrderArticle.human_attribute_name("#{unit}_short", count: n)
line += OrderArticle.human_attribute_name("#{unit}_short", count: converted_quantity)
units_info << line
end
units_info.join(', ').html_safe
Expand Down

0 comments on commit 26ae28f

Please sign in to comment.