mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Merge pull request #9575 from apricot12/9487-Dimensions-Packing-Reports
Added HEIGHT, WEIGHT, WIDTH, DEPTH columns to packing reports by customer.
This commit is contained in:
@@ -38,7 +38,7 @@ module Reporting
|
||||
|
||||
private
|
||||
|
||||
def select_fields
|
||||
def select_fields # rubocop:disable Metrics/AbcSize
|
||||
lambda do
|
||||
{
|
||||
hub: distributor_alias[:name],
|
||||
@@ -49,6 +49,10 @@ module Reporting
|
||||
supplier: supplier_alias[:name],
|
||||
product: product_table[:name],
|
||||
variant: variant_full_name,
|
||||
weight: line_item_table[:weight],
|
||||
height: line_item_table[:height],
|
||||
width: line_item_table[:width],
|
||||
depth: line_item_table[:depth],
|
||||
quantity: line_item_table[:quantity],
|
||||
price: (line_item_table[:quantity] * line_item_table[:price]),
|
||||
temp_controlled: shipping_category_table[:temperature_controlled],
|
||||
|
||||
@@ -7,7 +7,8 @@ module Reporting
|
||||
def columns
|
||||
# Reorder default columns
|
||||
super.slice(:hub, :customer_code, :first_name, :last_name, :phone,
|
||||
:supplier, :product, :variant, :quantity, :price, :temp_controlled)
|
||||
:supplier, :product, :variant, :weight, :height, :width, :depth, :quantity,
|
||||
:price, :temp_controlled)
|
||||
end
|
||||
|
||||
def rules
|
||||
|
||||
Reference in New Issue
Block a user