From e3f2712d962630021560a3fc945cfb78868f3b83 Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Wed, 17 Jun 2020 13:33:56 +0200 Subject: Group subscriptions by billing and shipping addresses for scheduling --- lib/solidus_subscriptions/processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/solidus_subscriptions/processor.rb b/lib/solidus_subscriptions/processor.rb index ef3ec59..96717cc 100644 --- a/lib/solidus_subscriptions/processor.rb +++ b/lib/solidus_subscriptions/processor.rb @@ -58,7 +58,7 @@ module SolidusSubscriptions def build_jobs users.map do |user| installemts_by_address_and_user = installments(user).group_by do |i| - i.subscription.shipping_address_id + [i.subscription.shipping_address_id, i.subscription.billing_address_id] end installemts_by_address_and_user.values.each do |grouped_installments| -- cgit v1.2.3