Lines 476-482
sub CanItemBeReserved{
Link Here
|
476 |
my $borrower = C4::Members::GetMember('borrowernumber'=>$borrowernumber); |
476 |
my $borrower = C4::Members::GetMember('borrowernumber'=>$borrowernumber); |
477 |
|
477 |
|
478 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
478 |
my $controlbranch = C4::Context->preference('ReservesControlBranch'); |
479 |
my $itemtypefield = C4::Context->preference('item-level_itypes') ? "itype" : "itemtype"; |
|
|
480 |
|
479 |
|
481 |
# we retrieve user rights on this itemtype and branchcode |
480 |
# we retrieve user rights on this itemtype and branchcode |
482 |
my $sth = $dbh->prepare("SELECT categorycode, itemtype, branchcode, reservesallowed |
481 |
my $sth = $dbh->prepare("SELECT categorycode, itemtype, branchcode, reservesallowed |
Lines 524-530
sub CanItemBeReserved{
Link Here
|
524 |
|
523 |
|
525 |
$querycount .= "AND $branchfield = ?"; |
524 |
$querycount .= "AND $branchfield = ?"; |
526 |
|
525 |
|
527 |
$querycount .= " AND $itemtypefield = ?" if ($ruleitemtype ne "*"); |
526 |
$querycount .= " AND COALESCE( itype, itemtype ) = ?" if ($ruleitemtype ne "*"); |
528 |
my $sthcount = $dbh->prepare($querycount); |
527 |
my $sthcount = $dbh->prepare($querycount); |
529 |
|
528 |
|
530 |
if($ruleitemtype eq "*"){ |
529 |
if($ruleitemtype eq "*"){ |
531 |
- |
|
|