From 2ccbb87adcb3174bb5a64b57b6fc9dd4ab2b3f02 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 11 Oct 2018 17:03:19 +0100 Subject: [PATCH] Fix payment decorator bug Payment line items must come from the order, payment does not have inventory_units --- app/models/spree/payment_decorator.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/models/spree/payment_decorator.rb b/app/models/spree/payment_decorator.rb index 8aab22a7bb..cd78e2b155 100644 --- a/app/models/spree/payment_decorator.rb +++ b/app/models/spree/payment_decorator.rb @@ -32,11 +32,7 @@ module Spree # This is called by the calculator of a payment method def line_items - if order.complete? && Spree::Config[:track_inventory_levels] - order.line_items.select { |li| inventory_units.pluck(:variant_id).include?(li.variant_id) } - else - order.line_items - end + order.line_items end # Pin payments lacks void and credit methods, but it does have refund