query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { parameters => 'parameters_remaining_permissions' },
+ flagsrequired => { parameters => 'manage_itemtypes' },
debug => 1,
}
);
my $itemtype = Koha::ItemTypes->find($itemtype_code);
my $description = $input->param('description');
my $rentalcharge = $input->param('rentalcharge');
+ my $rentalcharge_daily = $input->param('rentalcharge_daily');
+ my $rentalcharge_hourly = $input->param('rentalcharge_hourly');
+ my $defaultreplacecost = $input->param('defaultreplacecost');
+ my $processfee = $input->param('processfee');
my $image = $input->param('image') || q||;
my $notforloan = $input->param('notforloan') ? 1 : 0;
if ( $itemtype and $is_a_modif ) { # it's a modification
$itemtype->description($description);
$itemtype->rentalcharge($rentalcharge);
+ $itemtype->rentalcharge_daily($rentalcharge_daily);
+ $itemtype->rentalcharge_hourly($rentalcharge_hourly);
+ $itemtype->defaultreplacecost($defaultreplacecost);
+ $itemtype->processfee($processfee);
$itemtype->notforloan($notforloan);
$itemtype->imageurl($imageurl);
$itemtype->summary($summary);
}
} elsif ( not $itemtype and not $is_a_modif ) {
my $itemtype = Koha::ItemType->new(
- { itemtype => $itemtype_code,
- description => $description,
- rentalcharge => $rentalcharge,
- notforloan => $notforloan,
- imageurl => $imageurl,
- summary => $summary,
- checkinmsg => $checkinmsg,
- checkinmsgtype => $checkinmsgtype,
- sip_media_type => $sip_media_type,
- hideinopac => $hideinopac,
- searchcategory => $searchcategory,
+ {
+ itemtype => $itemtype_code,
+ description => $description,
+ rentalcharge => $rentalcharge,
+ rentalcharge_daily => $rentalcharge_daily,
+ rentalcharge_hourly => $rentalcharge_hourly,
+ defaultreplacecost => $defaultreplacecost,
+ processfee => $processfee,
+ notforloan => $notforloan,
+ imageurl => $imageurl,
+ summary => $summary,
+ checkinmsg => $checkinmsg,
+ checkinmsgtype => $checkinmsgtype,
+ sip_media_type => $sip_media_type,
+ hideinopac => $hideinopac,
+ searchcategory => $searchcategory,
}
);
eval { $itemtype->store; };