From c1683afbd56a0f637720f7a703fc88e54b045d6c Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Tue, 18 Feb 2025 12:24:30 +0000 Subject: [PATCH] fixup! [Bexley] Only show active GGW subs from Agile --- perllib/FixMyStreet/Cobrand/Bexley/Garden.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm index 29ab6773ff..7ecd8e55a6 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm @@ -49,7 +49,7 @@ sub lookup_subscription_for_uprn { my $results = $self->agile->CustomerSearch($uprn); - # find the first 'ACTIVATED' Customer with an 'ACTIVE' contract + # find the first 'ACTIVATED' Customer with an 'ACTIVE'/'PRECONTRACT' contract my $customers = $results->{Customers} || []; OUTER: for ( @$customers ) { next unless $_->{CustomertStatus} eq 'ACTIVATED'; # CustomertStatus (sic) options seem to be ACTIVATED/INACTIVE @@ -57,7 +57,7 @@ sub lookup_subscription_for_uprn { next unless $contracts; $customer = $_; for ( @$contracts ) { - next unless $_->{ServiceContractStatus} eq 'ACTIVE'; # Options seem to be ACTIVE/NOACTIVE + next unless $_->{ServiceContractStatus} =~ /(ACTIVE|PRECONTRACT)/; # Options seem to be ACTIVE/NOACTIVE/PRECONTRACT $contract = $_; # use the first matching customer/contract last OUTER if $customer && $contract;