From 38e5e15153c20c76a17121a57c52e728d0bd980d Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Mon, 12 Mar 2012 13:00:34 +1300 Subject: [PATCH] bug_7001: protected are only all libraries letters Signed-off-by: Paul Poulain solves my comment 89: when you have a "mandatory" notice defined for a given library, it's not possible to delete it (and switch back to the "default" notification). isn't this a (small) bug ? was it intended ? thanks! --- C4/Letters.pm | 3 +-- tools/letter.pl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index ce21a5dd95..af1ce82560 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -255,7 +255,6 @@ sub findrelatedto ($$) { sub SendAlerts { my ( $type, $externalid, $letter_code ) = @_; my $dbh = C4::Context->dbh; - my $strsth; if ( $type eq 'issue' ) { # prepare the letter... @@ -306,7 +305,7 @@ sub SendAlerts { # prepare the letter... # search the biblionumber - $strsth = $type eq 'claimacquisition' + my $strsth = $type eq 'claimacquisition' ? qq{ SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.*,aqbooksellers.* FROM aqorders diff --git a/tools/letter.pl b/tools/letter.pl index ae47810f27..eb9d6a6312 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -325,7 +325,7 @@ sub default_display { 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; } -- 2.39.5