Skip to content

Commit

Permalink
Remove finding item by id because there are associations
Browse files Browse the repository at this point in the history
  • Loading branch information
norrismei committed Sep 22, 2024
1 parent a09facb commit 71b84d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/pdfs/picklists_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ def data_with_units(line_items)
"Differences / Comments"]]

data + line_items.map do |line_item|
item_name = Item.find(line_item.item_id).name

[item_name,
[line_item.name,
line_item.quantity,
line_item.request_unit&.capitalize&.pluralize(line_item.quantity),
"[ ]",
Expand All @@ -160,9 +158,7 @@ def data_no_units(line_items)
"Differences / Comments"]]

data + line_items.map do |line_item|
item_name = Item.find(line_item.item_id).name

[item_name,
[line_item.name,
line_item.quantity,
"[ ]",
""]
Expand Down

0 comments on commit 71b84d7

Please sign in to comment.