Skip to content

Commit

Permalink
Fixes #42 again
Browse files Browse the repository at this point in the history
Changed decimals to 3 as requested
  • Loading branch information
lentschi committed Apr 12, 2024
1 parent a9b1b32 commit b9142ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/documents/order_fax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def articles_paragraph
subtotal = oa.units_to_order * price
total += subtotal
data << [oa.article_version.order_number,
number_with_precision(oa.units_to_order, precision: 2),
number_with_precision(oa.units_to_order, precision: 3),
format_supplier_order_unit_with_ratios(oa.price),
oa.article_version.name,
number_to_currency(price),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/order_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def data
@object.order_articles.ordered.includes(:article_version).all.map do |oa|
yield [
oa.article_version.order_number,
number_with_precision(oa.units_to_order, precision: 2),
number_with_precision(oa.units_to_order, precision: 3),
format_supplier_order_unit_with_ratios(oa.article_version),
oa.article_version.name,
number_to_currency(oa.article_version.price),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/order_txt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def to_txt
I18n.t('orders.fax.name'))
# now display all ordered articles
@order.order_articles.ordered.includes(:article_version).each do |oa|
text += format("%8s %8.2f %s\n", oa.article_version.order_number, oa.units_to_order, oa.article_version.name)
text += format("%8s %8.3f %s\n", oa.article_version.order_number, oa.units_to_order, oa.article_version.name)
end
text
end
Expand Down

0 comments on commit b9142ee

Please sign in to comment.