add final_weight_volume column to the hidden by default column of OCCT report

This commit is contained in:
Mohamed ABDELLANI
2022-11-28 12:06:24 +01:00
parent fd74473bdd
commit e3914ed306
2 changed files with 10 additions and 0 deletions

View File

@@ -2866,6 +2866,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_delivery_postcode: Delivery Postcode
report_header_bulk_unit_size: Bulk Unit Size
report_header_weight: Weight
report_header_final_weight_volume: Final (Weight/Volume)
report_header_height: Height
report_header_width: Width
report_header_depth: Depth

View File

@@ -64,6 +64,7 @@ module Reporting
order_number: proc { |line_items| line_items.first.order.number },
date: proc { |line_items| line_items.first.order.completed_at.strftime("%F %T") },
final_weight_volume: proc { |line_items| line_items.sum(&:final_weight_volume) },
}
end
# rubocop:enable Metrics/AbcSize
@@ -101,6 +102,14 @@ module Reporting
}.values
end
def default_params
super.merge(
{
fields_to_hide: [:final_weight_volume]
}
)
end
private
def row_header(row)