|
Lines 30-37
use Koha::DateUtils;
Link Here
|
| 30 |
use Koha::Patron::Categories; |
30 |
use Koha::Patron::Categories; |
| 31 |
use Koha::Patron::Category; |
31 |
use Koha::Patron::Category; |
| 32 |
use Koha::ItemTypes; |
32 |
use Koha::ItemTypes; |
| 33 |
use Koha::IssuingRule; |
|
|
| 34 |
use Koha::IssuingRules; |
| 35 |
|
33 |
|
| 36 |
#Setting variables |
34 |
#Setting variables |
| 37 |
my $input = new CGI; |
35 |
my $input = new CGI; |
|
Lines 250-265
if ( $step == 5 ) {
Link Here
|
| 250 |
branchcode => $branchcode, |
248 |
branchcode => $branchcode, |
| 251 |
categorycode => $categorycode, |
249 |
categorycode => $categorycode, |
| 252 |
itemtype => $itemtype, |
250 |
itemtype => $itemtype, |
| 253 |
maxissueqty => $maxissueqty, |
251 |
rules => { |
| 254 |
renewalsallowed => $renewalsallowed, |
252 |
maxissueqty => $maxissueqty, |
| 255 |
renewalperiod => $renewalperiod, |
253 |
renewalsallowed => $renewalsallowed, |
| 256 |
issuelength => $issuelength, |
254 |
renewalperiod => $renewalperiod, |
| 257 |
lengthunit => $lengthunit, |
255 |
issuelength => $issuelength, |
| 258 |
onshelfholds => $onshelfholds, |
256 |
lengthunit => $lengthunit, |
|
|
257 |
onshelfholds => $onshelfholds, |
| 258 |
} |
| 259 |
}; |
259 |
}; |
| 260 |
|
260 |
|
| 261 |
my $issuingrule = Koha::IssuingRule->new($params); |
261 |
eval { Koha::CirculationRules->set_rules( $params ) }; |
| 262 |
eval { $issuingrule->store; }; |
|
|
| 263 |
|
262 |
|
| 264 |
unless ($@) { |
263 |
unless ($@) { |
| 265 |
push @messages, { code => 'success_on_insert_circ_rule' }; |
264 |
push @messages, { code => 'success_on_insert_circ_rule' }; |
|
Lines 269-275
if ( $step == 5 ) {
Link Here
|
| 269 |
} |
268 |
} |
| 270 |
} |
269 |
} |
| 271 |
|
270 |
|
| 272 |
$step++ if Koha::IssuingRules->count; |
271 |
$step++ if Koha::CirculationRules->count; |
| 273 |
} |
272 |
} |
| 274 |
|
273 |
|
| 275 |
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); |
274 |
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, ); |