Lines 451-474
sub set_cancelled {
Link Here
|
451 |
|
451 |
|
452 |
# send notice to recaller to pick up item |
452 |
# send notice to recaller to pick up item |
453 |
my $letter = C4::Letters::GetPreparedLetter( |
453 |
my $letter = C4::Letters::GetPreparedLetter( |
454 |
module => 'circulation', |
454 |
module => 'circulation', |
455 |
letter_code => 'RECALL_MANUAL_CANCEL', |
455 |
letter_code => 'RECALL_MANUAL_CANCEL', |
456 |
branchcode => $self->pickup_library_id, |
456 |
branchcode => $self->pickup_library_id, |
457 |
lang => $self->patron->lang, |
457 |
lang => $self->patron->lang, |
458 |
tables => { |
458 |
tables => { |
459 |
biblio => $self->biblio_id, |
459 |
biblio => $self->biblio_id, |
460 |
borrowers => $self->patron_id, |
460 |
borrowers => $self->patron_id, |
461 |
branches => $self->pickup_library_id, |
461 |
branches => $self->pickup_library_id, |
462 |
}, |
462 |
}, |
463 |
); |
463 |
); |
464 |
|
464 |
|
465 |
my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $self->patron_id, message_name => 'Recall_Cancelled' }); |
465 |
my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences( |
|
|
466 |
{ borrowernumber => $self->patron_id, message_name => 'Recall_Cancelled' } ); |
466 |
while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { |
467 |
while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { |
467 |
if ( $transport eq 'email' ){ |
468 |
if ( $transport eq 'email' ) { |
468 |
C4::Message->enqueue($letter, $self->patron->unblessed, 'email'); |
469 |
C4::Message->enqueue( $letter, $self->patron, 'email' ); |
469 |
} |
470 |
} |
470 |
if ( $transport eq 'sms' ){ |
471 |
if ( $transport eq 'sms' ) { |
471 |
C4::Message->enqueue($letter, $self->patron->unblessed, 'sms'); |
472 |
C4::Message->enqueue( $letter, $self->patron, 'sms' ); |
472 |
} |
473 |
} |
473 |
} |
474 |
} |
474 |
|
475 |
|