From 61bb1bdcdcb5ad5ed9dd3253db0df005894ce717 Mon Sep 17 00:00:00 2001 From: ricchen Date: Thu, 8 Apr 2021 20:53:20 -0400 Subject: [PATCH] fix incorrect last name sorting for packing report --- lib/open_food_network/packing_report.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/open_food_network/packing_report.rb b/lib/open_food_network/packing_report.rb index 34c1e0e730..8fcc1eb904 100644 --- a/lib/open_food_network/packing_report.rb +++ b/lib/open_food_network/packing_report.rb @@ -53,7 +53,7 @@ module OpenFoodNetwork { group_by: proc { |line_item| line_item.order.distributor }, sort_by: proc { |distributor| distributor.name } }, { group_by: proc { |line_item| line_item.order }, - sort_by: proc { |order| order.bill_address.lastname }, + sort_by: proc { |order| order.bill_address.lastname.downcase }, summary_columns: [proc { |_line_items| "" }, proc { |_line_items| "" }, proc { |_line_items| "" }, @@ -89,7 +89,7 @@ module OpenFoodNetwork { group_by: proc { |line_item| line_item.full_name }, sort_by: proc { |full_name| full_name } }, { group_by: proc { |line_item| line_item.order }, - sort_by: proc { |order| order.bill_address.lastname } }] + sort_by: proc { |order| order.bill_address.lastname.downcase } }] end end