Commit 3391ccd9 authored by bensinober's avatar bensinober
Browse files

DEICH-5447 reserve questionnaire: fetch patron before anonymization of reserve...

DEICH-5447 reserve questionnaire: fetch patron before anonymization of reserve so questionnaire can be sent
parent e3447d84
......@@ -38,6 +38,7 @@ sub Run {
}
try {
$self->{reserve} = $res;
my $p = Deichman::Patron->new()->Get($self->{reserve}->{borrowernumber});
$self->{writer}->write("Cancelling expired res " .$self->{reserve}->{reserve_id}. " on biblio " .$self->{reserve}->{biblionumber}. " with expirationdate ". $self->{reserve}->{expirationdate} . "\n");
$self->{args}->{test} or $self->Deichman::Patron::Reserve::Cancel(0, 1); # KeepIll=0, expired=1
$processed++;
......@@ -45,8 +46,6 @@ sub Run {
# DEICH-5447 -->
# Send email to patron with questionnaire why they failed to collect material
next unless ($self->{args}->{questionnaire} or $questionnaire);
my $p = Deichman::Patron->new()->Get($self->{reserve}->{borrowernumber});
next unless $p->{patron}->{alertemail}; #ignore those without email
# Check that we haven't allready sent questionnaire mail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment