From 377f035ea8a058641723d13565b7bbb4e64af7b0 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Wed, 21 Aug 2024 11:37:24 +1000 Subject: [PATCH] Fix bulk coop report The current spec is useless, but it has been addressed on master --- lib/reporting/reports/bulk_coop/base.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reporting/reports/bulk_coop/base.rb b/lib/reporting/reports/bulk_coop/base.rb index ce4c154e35..bd6b3d03e7 100644 --- a/lib/reporting/reports/bulk_coop/base.rb +++ b/lib/reporting/reports/bulk_coop/base.rb @@ -49,7 +49,7 @@ module Reporting def group_buy_unit_size(line_items) unit_size = line_items.first.variant.product.group_buy_unit_size || 0.0 - unit_size / (line_items.first.product.variant_unit_scale || 1) + unit_size / (line_items.first.variant.variant_unit_scale || 1) end def max_quantity_excess(line_items) @@ -64,7 +64,7 @@ module Reporting end def scaled_unit_value(variant) - (variant.unit_value || 0) / (variant.product.variant_unit_scale || 1) + (variant.unit_value || 0) / (variant.variant_unit_scale || 1) end def option_value_value(line_items) @@ -98,7 +98,7 @@ module Reporting end def scaled_final_weight_volume(line_item) - (line_item.final_weight_volume || 0) / (line_item.product.variant_unit_scale || 1) + (line_item.final_weight_volume || 0) / (line_item.variant.variant_unit_scale || 1) end def total_available(line_items)