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:
Filipe
2022-11-10 09:55:26 +00:00
committed by GitHub
8 changed files with 62 additions and 7 deletions

View File

@@ -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],

View File

@@ -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