This patch fix hold policies way to do, make it using circcontrol syspref to
know the branch the rule must be based.
---
opac/opac-reserve.pl | 5 ++++-
reserve/request.pl | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 194a28e..846a59e 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -331,7 +331,10 @@ foreach my $biblioitemnumber (@biblioitemnumbers) {
# If there is no loan, return and transfer, we show a checkbox.
$item->{notforloan} = $item->{notforloan} || 0;
- my $branchitemrule = GetBranchItemRule( $borr->{'branchcode'},
$item->{'itemtype'} );
+ my $branch = C4::Circulation::_GetCircControlBranch($item, $borr);
+
+ my $branchitemrule = GetBranchItemRule( $branch, $item->{'itemtype'} );
+
my $policy_holdallowed = 1;
if ( $branchitemrule->{'holdallowed'} == 0 ||
diff --git a/reserve/request.pl b/reserve/request.pl
index 67ef180..63b735d 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -344,8 +344,9 @@ foreach my $biblioitemnumber (@biblioitemnumbers) {
}
}
+ my $branch = C4::Circulation::_GetCircControlBranch($item, $borr);
- my $branchitemrule = GetBranchItemRule( $item->{'homebranch'},
$item->{'itype'} );
+ my $branchitemrule = GetBranchItemRule( $branch, $item->{'itype'} );
my $policy_holdallowed = 1;
$item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
--
1.6.3.3
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches