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

(-)a/admin/smart-rules.pl (-8 / +19 lines)
Lines 30-35 use Koha::CirculationRules; Link Here
30
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
31
use Koha::Caches;
31
use Koha::Caches;
32
use Koha::Patrons;
32
use Koha::Patrons;
33
use Koha::Plugins;
33
34
34
my $input = CGI->new;
35
my $input = CGI->new;
35
my $dbh   = C4::Context->dbh;
36
my $dbh   = C4::Context->dbh;
Lines 791-807 while ( my $r = $all_rules->next ) { Link Here
791
    $rules->{ $r->{categorycode} // q{} }->{ $r->{itemtype} // q{} }->{ $r->{rule_name} } = $r->{rule_value};
792
    $rules->{ $r->{categorycode} // q{} }->{ $r->{itemtype} // q{} }->{ $r->{rule_name} } = $r->{rule_value};
792
}
793
}
793
794
795
my @overwrite_calc_fine_plugins = ();
796
if ( C4::Context->config("enable_plugins") ) {
797
    @overwrite_calc_fine_plugins = Koha::Plugins->new->GetPlugins(
798
        {
799
            method => 'overwrite_calc_fine',
800
        }
801
    );
802
}
803
794
$template->param( show_branch_cat_rule_form => 1 );
804
$template->param( show_branch_cat_rule_form => 1 );
795
805
796
$template->param(
806
$template->param(
797
    used_categorycodes => \@used_categorycodes,
807
    used_categorycodes          => \@used_categorycodes,
798
    used_itemtypes     => \@used_itemtypes,
808
    used_itemtypes              => \@used_itemtypes,
799
    patron_categories  => $patron_categories,
809
    patron_categories           => $patron_categories,
800
    itemtypeloop       => $itemtypes,
810
    itemtypeloop                => $itemtypes,
801
    humanbranch        => $humanbranch,
811
    humanbranch                 => $humanbranch,
802
    current_branch     => $branch,
812
    current_branch              => $branch,
803
    definedbranch      => $definedbranch,
813
    definedbranch               => $definedbranch,
804
    all_rules          => $rules,
814
    all_rules                   => $rules,
815
    overwrite_calc_fine_plugins => \@overwrite_calc_fine_plugins,
805
);
816
);
806
output_html_with_http_headers $input, $cookie, $template->output;
817
output_html_with_http_headers $input, $cookie, $template->output;
807
818
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-1 / +10 lines)
Lines 50-55 Link Here
50
        [% END %]
50
        [% END %]
51
    </h1>
51
    </h1>
52
52
53
    [% IF overwrite_calc_fine_plugins.size %]
54
        <div class="alert alert-warning">
55
            The standard fine calculation is overwritten by the following plugin(s):
56
            [% FOREACH plugin IN overwrite_calc_fine_plugins %]
57
                [%- ", " IF !loop.first -%]
58
                [%- plugin.get_metadata.name -%]
59
            [%- END -%]
60
        </div>
61
    [% END %]
62
53
    <div class="page-section bg-info">
63
    <div class="page-section bg-info">
54
        <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
64
        <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
55
        <ul>
65
        <ul>
56
- 

Return to bug 39540