Fix so with independent branches a staff member cant see who has items out if the borrower is from another library/branch
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
7934f95494
commit
24ba695b2b
2 changed files with 19 additions and 10 deletions
|
@ -745,7 +745,7 @@ sub GetItemsInfo {
|
|||
my ( $date_due, $count_reserves );
|
||||
|
||||
my $isth = $dbh->prepare(
|
||||
"SELECT issues.*,borrowers.cardnumber,borrowers.surname,borrowers.firstname
|
||||
"SELECT issues.*,borrowers.cardnumber,borrowers.surname,borrowers.firstname,borrowers.branchcode as bcode
|
||||
FROM issues LEFT JOIN borrowers ON issues.borrowernumber=borrowers.borrowernumber
|
||||
WHERE itemnumber = ?
|
||||
AND returndate IS NULL"
|
||||
|
@ -759,13 +759,18 @@ sub GetItemsInfo {
|
|||
$data->{surname} = $idata->{surname};
|
||||
$data->{firstname} = $idata->{firstname};
|
||||
$datedue = format_date( $idata->{'date_due'} );
|
||||
if (C4::Context->preference("IndependantBranches")){
|
||||
my $userenv = C4::Context->userenv;
|
||||
if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
|
||||
$data->{'NOTSAMEBRANCH'} = 1 if ($idata->{'bcode'} ne $userenv->{branch});
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( $datedue eq '' ) {
|
||||
#$datedue="Available";
|
||||
my ( $restype, $reserves ) =
|
||||
C4::Reserves::CheckReserves( $data->{'itemnumber'} );
|
||||
if ($restype) {
|
||||
|
||||
#$datedue=$restype;
|
||||
$count_reserves = $restype;
|
||||
}
|
||||
|
|
|
@ -152,7 +152,11 @@
|
|||
<td><!-- TMPL_VAR NAME="description" --></td>
|
||||
<td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_VAR name="location" --> <!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_IF name="datedue" -->
|
||||
On issue to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
|
||||
<!-- TMPL_IF NAME="NOTSAMEBRANCH" -->
|
||||
On issue to a borrower from another branch
|
||||
<!-- TMPL_ELSE -->
|
||||
On issue to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF name="bi_notforloan" -->
|
||||
Not For loan (itemtype)
|
||||
|
@ -164,13 +168,13 @@
|
|||
Item lost
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="wthdrawn" -->Item Cancelled
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="count_reserves" -->
|
||||
<!-- TMPL_VAR NAME="count_reserves" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
Available
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="count_reserves" -->
|
||||
<!-- TMPL_VAR NAME="count_reserves" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
Available
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_IF -->
|
||||
|
|
Loading…
Reference in a new issue