@@ -, +, @@ from other libraries with IndependentBranches - circulate (all) - catalogue - borrowers - delete_borrowers - edit_borrowers - reserveforothers (all) - reports (all) -- The patron from the other library appears in the list -- The patron from the other library is inaccessible --- reports/borrowers_out.pl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/reports/borrowers_out.pl +++ a/reports/borrowers_out.pl @@ -211,7 +211,14 @@ sub calculate { $strcalc .= "SELECT CONCAT( borrowers.surname , \"\\t\",borrowers.firstname, \"\\t\", borrowers.cardnumber)"; $strcalc .= " , " . $dbh->quote($colfield) if ($colfield); $strcalc .= " FROM borrowers "; - $strcalc .= "WHERE 1 "; + my $cur_lib = C4::Context->userenv->{branch}; + if(C4::Context->preference('IndependentBranches') && !C4::Context->IsSuperLibrarian()){ + $strcalc .= "WHERE branchcode = '$cur_lib' "; + } + else{ + $strcalc .= "WHERE 1 "; + } + my @query_args; if ( @$filters[0] ) { @$filters[0]=~ s/\*/%/g; --