|
Lines 18-23
package Koha::CirculationRules;
Link Here
|
| 18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
18 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
|
|
21 |
use Carp qw(croak); |
| 21 |
|
22 |
|
| 22 |
use Koha::Exceptions; |
23 |
use Koha::Exceptions; |
| 23 |
use Koha::CirculationRule; |
24 |
use Koha::CirculationRule; |
|
Lines 239-248
sub get_effective_rules {
Link Here
|
| 239 |
sub set_rule { |
240 |
sub set_rule { |
| 240 |
my ( $self, $params ) = @_; |
241 |
my ( $self, $params ) = @_; |
| 241 |
|
242 |
|
| 242 |
for my $mandatory_parameter (qw( branchcode categorycode itemtype rule_name rule_value ) ){ |
243 |
for my $mandatory_parameter (qw( branchcode categorycode itemtype rule_name rule_value ) ) { |
| 243 |
Koha::Exceptions::MissingParameter->throw( |
244 |
Koha::Exceptions::MissingParameter->throw( |
| 244 |
"Required parameter 'branchcode' missing") |
245 |
"Required parameter 'branchcode' missing") |
| 245 |
unless exists $params->{$mandatory_parameter}; |
246 |
unless exists $params->{$mandatory_parameter}; |
|
|
247 |
} |
| 246 |
|
248 |
|
| 247 |
my $kind_info = $RULE_KINDS->{ $params->{rule_name} }; |
249 |
my $kind_info = $RULE_KINDS->{ $params->{rule_name} }; |
| 248 |
croak "set_rule given unknown rule '$params->{rule_name}'!" |
250 |
croak "set_rule given unknown rule '$params->{rule_name}'!" |
| 249 |
- |
|
|