Lines 250-256
sub get_effective_rules {
Link Here
|
250 |
|
250 |
|
251 |
sub set_rule { |
251 |
sub set_rule { |
252 |
my ( $self, $params ) = @_; |
252 |
my ( $self, $params ) = @_; |
253 |
|
253 |
warn Data::Dumper::Dumper( $params ); |
254 |
for my $mandatory_parameter (qw( rule_name rule_value ) ) { |
254 |
for my $mandatory_parameter (qw( rule_name rule_value ) ) { |
255 |
Koha::Exceptions::MissingParameter->throw( |
255 |
Koha::Exceptions::MissingParameter->throw( |
256 |
"Required parameter '$mandatory_parameter' missing") |
256 |
"Required parameter '$mandatory_parameter' missing") |
Lines 302-307
sub set_rule {
Link Here
|
302 |
} |
302 |
} |
303 |
else { |
303 |
else { |
304 |
if ( defined $rule_value ) { |
304 |
if ( defined $rule_value ) { |
|
|
305 |
warn "presumably here"; |
305 |
$rule = Koha::CirculationRule->new( |
306 |
$rule = Koha::CirculationRule->new( |
306 |
{ |
307 |
{ |
307 |
branchcode => $branchcode, |
308 |
branchcode => $branchcode, |
Lines 333-338
sub set_rules {
Link Here
|
333 |
|
334 |
|
334 |
my $rule_objects = []; |
335 |
my $rule_objects = []; |
335 |
while ( my ( $rule_name, $rule_value ) = each %$rules ) { |
336 |
while ( my ( $rule_name, $rule_value ) = each %$rules ) { |
|
|
337 |
warn "name: $rule_name, value: $rule_value"; |
336 |
my $rule_object = Koha::CirculationRules->set_rule( |
338 |
my $rule_object = Koha::CirculationRules->set_rule( |
337 |
{ |
339 |
{ |
338 |
%set_params, |
340 |
%set_params, |