Skip to content

Commit

Permalink
Don't generate packing reports unnecessarily when displaying the repo…
Browse files Browse the repository at this point in the history
…rt form
  • Loading branch information
Matt-Yorkley committed Mar 23, 2024
1 parent 26f3b56 commit 5800886
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/reporting/reports/packing/customer.rb
Expand Up @@ -5,10 +5,10 @@ module Reports
module Packing
class Customer < Base
def columns
# Reorder default columns
super.slice(:hub, :customer_code, :first_name, :last_name, :phone,
:supplier, :product, :variant, :weight, :height, :width, :depth, :quantity,
:price, :temp_controlled)
Struct.new(:keys).new(
[:hub, :customer_code, :first_name, :last_name, :phone,:supplier, :product,
:variant, :weight, :height, :width, :depth, :quantity, :price, :temp_controlled]
)
end

def rules
Expand Down
8 changes: 4 additions & 4 deletions lib/reporting/reports/packing/product.rb
Expand Up @@ -5,10 +5,10 @@ module Reports
module Packing
class Product < Base
def columns
# Reorder default columns
super.slice(:hub, :supplier, :product, :variant,
:customer_code, :first_name, :last_name, :phone,
:quantity, :price, :temp_controlled)
Struct.new(:keys).new(
[:hub, :supplier, :product, :variant, :customer_code, :first_name,
:last_name, :phone, :quantity, :price, :temp_controlled]
)
end

def rules
Expand Down
7 changes: 4 additions & 3 deletions lib/reporting/reports/packing/supplier.rb
Expand Up @@ -5,9 +5,10 @@ module Reports
module Packing
class Supplier < Base
def columns
# Reorder default columns
super.slice(:hub, :supplier, :customer_code, :first_name, :last_name, :phone,
:product, :variant, :quantity, :price, :temp_controlled)
Struct.new(:keys).new(
[:hub, :supplier, :customer_code, :first_name, :last_name, :phone,
:product, :variant, :quantity, :price, :temp_controlled]
)
end

def rules
Expand Down

0 comments on commit 5800886

Please sign in to comment.