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

(-)a/Koha/RefundLostItemFeeRules.pm (+17 lines)
Lines 136-141 sub _choose_branch { Link Here
136
    return $branch;
136
    return $branch;
137
}
137
}
138
138
139
=head3 Koha::RefundLostItemFeeRules->find();
140
141
Inherit from Koha::Objects->find(), but forces rule_name => 'refund'
142
my $object = Koha::Objects->find( { col1 => $val1, col2 => $val2 } );
143
my $object = Koha::Objects->find( $id );
144
my $object = Koha::Objects->find( $idpart1, $idpart2, $attrs ); # composite PK
145
146
=cut
147
148
sub find {
149
    my ( $self, @pars ) = @_;
150
151
    $pars[0]->{rule_name} = 'refund';
152
153
    return $self->SUPER::find(@pars);
154
}
155
139
=head3 _default_rule (internal)
156
=head3 _default_rule (internal)
140
157
141
This function returns the default rule defined for refunding lost
158
This function returns the default rule defined for refunding lost
(-)a/admin/smart-rules.pl (-3 / +3 lines)
Lines 526-532 elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) { Link Here
526
            );
526
            );
527
        }
527
        }
528
    } else {
528
    } else {
529
        Koha::CirculationRules->set_rules(
529
        my $rule = Koha::CirculationRules->set_rules(
530
            {
530
            {
531
                categorycode => undef,
531
                categorycode => undef,
532
                itemtype     => undef,
532
                itemtype     => undef,
Lines 539-545 elsif ( $op eq 'mod-refund-lost-item-fee-rule' ) { Link Here
539
    }
539
    }
540
}
540
}
541
541
542
my $refundLostItemFeeRule = Koha::RefundLostItemFeeRules->find({ branchcode => $branch });
542
my $refundLostItemFeeRule = Koha::RefundLostItemFeeRules->find({ branchcode => ($branch eq '*') ? undef:$branch });
543
543
$template->param(
544
$template->param(
544
    refundLostItemFeeRule => $refundLostItemFeeRule,
545
    refundLostItemFeeRule => $refundLostItemFeeRule,
545
    defaultRefundRule     => Koha::RefundLostItemFeeRules->_default_rule
546
    defaultRefundRule     => Koha::RefundLostItemFeeRules->_default_rule
546
- 

Return to bug 18930