From 71b84d7c505130ff7f67eaf4de9aff8f0c5c49d0 Mon Sep 17 00:00:00 2001 From: Norris Mei Date: Sun, 22 Sep 2024 10:41:02 -0700 Subject: [PATCH] Remove finding item by id because there are associations --- app/pdfs/picklists_pdf.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/pdfs/picklists_pdf.rb b/app/pdfs/picklists_pdf.rb index 605f781b39..20022c2dc0 100644 --- a/app/pdfs/picklists_pdf.rb +++ b/app/pdfs/picklists_pdf.rb @@ -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), "[ ]", @@ -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, "[ ]", ""]