[Koha-patches] [PATCH] bug_7001: protected are only all libraries letters
Srdjan Jankovic
srdjan at catalyst.net.nz
Mon Mar 12 01:05:14 CET 2012
---
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 ce21a5d..af1ce82 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 ae47810..eb9d6a6 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;
}
--
1.6.5
More information about the Koha-patches
mailing list