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

(-)a/C4/Circulation.pm (-35 / +8 lines)
Lines 3301-3340 sub GetIssuingCharges { Link Here
3301
sub _get_discount_from_rule {
3301
sub _get_discount_from_rule {
3302
    my ($categorycode, $branchcode, $itemtype) = @_;
3302
    my ($categorycode, $branchcode, $itemtype) = @_;
3303
3303
3304
    # Set search precedences
3304
    my $rule = Koha::CirculationRules->get_effective_rule( {
3305
    my @params = (
3305
        branchcode   => $branchcode,
3306
        {
3306
        itemtype     => $itemtype,
3307
            branchcode   => $branchcode,
3307
        categorycode => $categorycode,
3308
            itemtype     => $itemtype,
3308
        rule_name    => 'rentaldiscount',
3309
            categorycode => $categorycode,
3309
    } );
3310
        },
3310
3311
        {
3311
    return $rule->rule_value if $rule;
3312
            branchcode   => undef,
3313
            categorycode => $categorycode,
3314
            itemtype     => $itemtype,
3315
        },
3316
        {
3317
            branchcode   => $branchcode,
3318
            categorycode => $categorycode,
3319
            itemtype     => undef,
3320
        },
3321
        {
3322
            branchcode   => undef,
3323
            categorycode => $categorycode,
3324
            itemtype     => undef,
3325
        },
3326
    );
3327
3328
    foreach my $params (@params) {
3329
        my $rule = Koha::CirculationRules->search(
3330
            {
3331
                rule_name => 'rentaldiscount',
3332
                %$params,
3333
            }
3334
        )->next();
3335
3336
        return $rule->rule_value if $rule;
3337
    }
3338
3312
3339
    # none of the above
3313
    # none of the above
3340
    return 0;
3314
    return 0;
3341
- 

Return to bug 25115