sub SendAlerts {
my ( $type, $externalid, $letter_code ) = @_;
my $dbh = C4::Context->dbh;
my $strsth;
if ( $type eq 'issue' ) {
# prepare the letter...
# search the biblionumber
$strsth = $type eq 'claimacquisition'
my $strsth = $type eq 'claimacquisition'
? qq{
SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.*
FROM aqorders
my $loop_data = [];
my $protected_letters = protected_letters();
foreach my $row (@{$results}) {
$row->{protected} = $protected_letters->{ $row->{code}};
$row->{protected} = !$row->{branchcode} && $protected_letters->{ $row->{code} };
push @{$loop_data}, $row;
}
-