Lines 30-36
use Koha::DateUtils;
Link Here
|
30 |
use Koha::Patrons; |
30 |
use Koha::Patrons; |
31 |
use Koha::Patron::Categories; |
31 |
use Koha::Patron::Categories; |
32 |
use Koha::ItemTypes; |
32 |
use Koha::ItemTypes; |
33 |
use Koha::IssuingRules; |
|
|
34 |
|
33 |
|
35 |
#Setting variables |
34 |
#Setting variables |
36 |
my $input = new CGI; |
35 |
my $input = new CGI; |
Lines 251-265
if ( $step == 5 ) {
Link Here
|
251 |
branchcode => $branchcode, |
250 |
branchcode => $branchcode, |
252 |
categorycode => $categorycode, |
251 |
categorycode => $categorycode, |
253 |
itemtype => $itemtype, |
252 |
itemtype => $itemtype, |
254 |
renewalsallowed => $renewalsallowed, |
253 |
rules => { |
255 |
renewalperiod => $renewalperiod, |
254 |
renewalsallowed => $renewalsallowed, |
256 |
issuelength => $issuelength, |
255 |
renewalperiod => $renewalperiod, |
257 |
lengthunit => $lengthunit, |
256 |
issuelength => $issuelength, |
258 |
onshelfholds => $onshelfholds, |
257 |
lengthunit => $lengthunit, |
|
|
258 |
onshelfholds => $onshelfholds, |
259 |
} |
259 |
}; |
260 |
}; |
260 |
|
261 |
|
261 |
my $issuingrule = Koha::IssuingRule->new($params); |
262 |
eval { Koha::CirculationRules->set_rules( $params ) }; |
262 |
eval { $issuingrule->store; }; |
|
|
263 |
|
263 |
|
264 |
if ($@) { |
264 |
if ($@) { |
265 |
push @messages, { code => 'error_on_insert_circ_rule' }; |
265 |
push @messages, { code => 'error_on_insert_circ_rule' }; |
Lines 287-293
if ( $step == 5 ) {
Link Here
|
287 |
} |
287 |
} |
288 |
} |
288 |
} |
289 |
|
289 |
|
290 |
$step++ if Koha::IssuingRules->count; |
290 |
$step++ if Koha::CirculationRules->count; |
291 |
} |
291 |
} |
292 |
|
292 |
|
293 |
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); |
293 |
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); |