@@ -, +, @@ and maxissue* --- Koha/Template/Plugin/CirculationRules.pm | 12 ++++++------ .../prog/en/modules/admin/smart-rules.tt | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) --- a/Koha/Template/Plugin/CirculationRules.pm +++ a/Koha/Template/Plugin/CirculationRules.pm @@ -26,9 +26,9 @@ use Koha::CirculationRules; sub Get { my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; - $branchcode = undef if $branchcode eq q{}; - $categorycode = undef if $categorycode eq q{}; - $itemtype = undef if $itemtype eq q{}; + $branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; + $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; + $itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; my $rule = Koha::CirculationRules->get_effective_rule( { @@ -45,9 +45,9 @@ sub Get { sub Search { my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; - $branchcode = undef if $branchcode eq q{}; - $categorycode = undef if $categorycode eq q{}; - $itemtype = undef if $itemtype eq q{}; + $branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; + $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; + $itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; my $rule = Koha::CirculationRules->search( { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -411,15 +411,15 @@ Defaults[% UNLESS ( default_rules ) %] (not set)[% END %] - [% SET patron_maxissueqty = CirculationRules.Get( branchcode, undef, undef, 'patron_maxissueqty' ) %] + [% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxissueqty' ) %] - [% SET patron_maxonsiteissueqty = CirculationRules.Get( branchcode, undef, undef, 'patron_maxonsiteissueqty' ) %] + [% SET patron_maxonsiteissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxonsiteissueqty' ) %] - [% SET rule_value = CirculationRules.Get( current_branch, '*', undef, 'max_holds' ) %] + [% SET rule_value = CirculationRules.Search( current_branch, undef , undef, 'max_holds' ) %] --