From 5733da78f3e32f37739e941c2300292d14970b1e Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Tue, 18 Feb 2025 13:34:28 +0000 Subject: [PATCH] [Bexley][WW] Allow modification of subscriptions --- perllib/FixMyStreet/Cobrand/Bexley.pm | 5 +++++ perllib/FixMyStreet/Cobrand/Bexley/Garden.pm | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index 0a03c63fac..f1660c313d 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -248,6 +248,11 @@ sub open311_extra_data_include { { name => 'description', description => 'Detail', value => $row->detail }; } + if ($contact->email =~ /^Agile/) { + push @$open311_only, + { name => 'title', description => 'Title', + value => $row->title }, + } # Add private comments field push @$open311_only, diff --git a/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm index 7ecd8e55a6..8d0429868a 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley/Garden.pm @@ -161,9 +161,11 @@ sub waste_garden_sub_params { my $c = $self->{c}; - if ( $data->{category} eq 'Cancel Garden Subscription' ) { - my $srv = $self->garden_current_subscription; + if (my $srv = $self->garden_current_subscription) { + $c->set_param( 'customer_external_ref', $srv->{customer_external_ref} ); + } + if ( $data->{category} eq 'Cancel Garden Subscription' ) { my $parser = DateTime::Format::Strptime->new( pattern => '%d/%m/%Y' ); my $due_date_str = $parser->format_datetime( DateTime->now->add(days => 1) ); @@ -171,7 +173,6 @@ sub waste_garden_sub_params { $reason .= ': ' . $data->{reason_further_details} if $data->{reason_further_details}; - $c->set_param( 'customer_external_ref', $srv->{customer_external_ref} ); $c->set_param( 'due_date', $due_date_str ); $c->set_param( 'reason', $reason ); } @@ -198,4 +199,13 @@ sub waste_cc_payment_line_item_ref { return $p->id; } +=item * Anyone can modify garden subs XXX Is that right? + +XXX TODO can't modify in renewal period + +=cut + +sub waste_show_garden_modify { 1 } + + 1;