(bug #3897) hold policies and circcontrol

This patch fix hold policies way to do, make it using circcontrol syspref to know the branch the rule must be based.
This commit is contained in:
Nahuel ANGELINETTI 2009-12-11 10:16:46 +01:00 committed by Henri-Damien LAURENT
parent a05c092e99
commit c0edb3adef
2 changed files with 6 additions and 2 deletions

View File

@ -426,7 +426,9 @@ foreach my $biblioNum (@biblionumbers) {
# If there is no loan, return and transfer, we show a checkbox.
$itemLoopIter->{notforloan} = $itemLoopIter->{notforloan} || 0;
my $branchitemrule = GetBranchItemRule( $borr->{'branchcode'}, $itemInfo->{'itype'} );
my $branch = C4::Circulation::_GetCircControlBranch($itemLoopIter, $borr);
my $branchitemrule = GetBranchItemRule( $branch, $itemInfo->{'itype'} );
my $policy_holdallowed = 1;
if ( $branchitemrule->{'holdallowed'} == 0 ||

View File

@ -397,7 +397,9 @@ foreach my $biblionumber (@biblionumbers) {
}
}
my $branchitemrule = GetBranchItemRule( $item->{'homebranch'}, $item->{'itype'} );
my $branch = C4::Circulation::_GetCircControlBranch($item, $borrowerinfo);
my $branchitemrule = GetBranchItemRule( $branch, $item->{'itype'} );
my $policy_holdallowed = 1;
$item->{'holdallowed'} = $branchitemrule->{'holdallowed'};