View | Details | Raw Unified | Return to bug 22847
Collapse All | Expand All

(-)a/Koha/Template/Plugin/CirculationRules.pm (-6 / +6 lines)
Lines 26-34 use Koha::CirculationRules; Link Here
26
sub Get {
26
sub Get {
27
    my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
27
    my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
28
28
29
    $branchcode   = undef if $branchcode eq q{};
29
    $branchcode   = undef if $branchcode eq q{}   or $branchcode eq q{*};
30
    $categorycode = undef if $categorycode eq q{};
30
    $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*};
31
    $itemtype     = undef if $itemtype eq q{};
31
    $itemtype     = undef if $itemtype eq q{}     or $branchcode eq q{*};
32
32
33
    my $rule = Koha::CirculationRules->get_effective_rule(
33
    my $rule = Koha::CirculationRules->get_effective_rule(
34
        {
34
        {
Lines 45-53 sub Get { Link Here
45
sub Search {
45
sub Search {
46
    my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
46
    my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
47
47
48
    $branchcode   = undef if $branchcode eq q{};
48
    $branchcode   = undef if $branchcode eq q{}   or $branchcode eq q{*};
49
    $categorycode = undef if $categorycode eq q{};
49
    $categorycode = undef if $categorycode eq q{} or $branchcode eq q{*};
50
    $itemtype     = undef if $itemtype eq q{};
50
    $itemtype     = undef if $itemtype eq q{}     or $branchcode eq q{*};
51
51
52
    my $rule = Koha::CirculationRules->search(
52
    my $rule = Koha::CirculationRules->search(
53
        {
53
        {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-4 / +3 lines)
Lines 411-425 Link Here
411
                <tr>
411
                <tr>
412
                    <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
412
                    <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
413
                    <td>
413
                    <td>
414
                        [% SET patron_maxissueqty = CirculationRules.Get( branchcode, undef, undef, 'patron_maxissueqty' ) %]
414
                        [% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxissueqty' ) %]
415
                        <input type="text" name="patron_maxissueqty" size="3" value="[% patron_maxissueqty | html %]"/>
415
                        <input type="text" name="patron_maxissueqty" size="3" value="[% patron_maxissueqty | html %]"/>
416
                    </td>
416
                    </td>
417
                    <td>
417
                    <td>
418
                        [% SET patron_maxonsiteissueqty = CirculationRules.Get( branchcode, undef, undef, 'patron_maxonsiteissueqty' ) %]
418
                        [% SET patron_maxonsiteissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxonsiteissueqty' ) %]
419
                        <input type="text" name="patron_maxonsiteissueqty" size="3" value="[% patron_maxonsiteissueqty | html %]"/>
419
                        <input type="text" name="patron_maxonsiteissueqty" size="3" value="[% patron_maxonsiteissueqty | html %]"/>
420
                    </td>
420
                    </td>
421
                    <td>
421
                    <td>
422
                        [% SET rule_value = CirculationRules.Get( current_branch, '*', undef, 'max_holds' ) %]
422
                        [% SET rule_value = CirculationRules.Search( current_branch, undef , undef, 'max_holds' ) %]
423
                        <input name="max_holds" size="3" value="[% rule_value | html %]" />
423
                        <input name="max_holds" size="3" value="[% rule_value | html %]" />
424
                    </td>
424
                    </td>
425
                    <td>
425
                    <td>
426
- 

Return to bug 22847