diff --git a/scripts/rt-bulk-prep-pay.plx b/scripts/rt-bulk-prep-pay.plx index 84eeb88..fcb77b6 100755 --- a/scripts/rt-bulk-prep-pay.plx +++ b/scripts/rt-bulk-prep-pay.plx @@ -33,7 +33,7 @@ sub FindMostRecentPaymentMethodForTicket ($) { while (my $showLine = <$rtShowFH>) { print STDERR "rt show line for $ticketSpec: $showLine" if ($VERBOSE >= 10); $paymentMethod = $1 - if ($showLine =~ /\s+PAYMENT\s+METHOD\s*:\s*(.*?)\s*$/); + if ($showLine =~ /^\s*PAYMENT\s+METHOD\s*:\s*(.*?)\s*$/); # don't 'last' when found as we want the last one. } close $rtShowFH;