+ my $opacitemholds = $input->param('opacitemholds') || 0;
+ my $overduefinescap = $input->param('overduefinescap') || undef;
+ $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty";
+
+ my $schema = Koha::Database->new()->schema();
+ my $rs = $schema->resultset('Issuingrule');
+
+ my $params = {
+ branchcode => $br,
+ categorycode => $bor,
+ itemtype => $itemtype,
+ fine => $fine,
+ finedays => $finedays,
+ maxsuspensiondays => $maxsuspensiondays,
+ firstremind => $firstremind,
+ chargeperiod => $chargeperiod,
+ chargeperiod_charge_at => $chargeperiod_charge_at,
+ maxissueqty => $maxissueqty,
+ maxonsiteissueqty => $maxonsiteissueqty,
+ renewalsallowed => $renewalsallowed,
+ renewalperiod => $renewalperiod,
+ norenewalbefore => $norenewalbefore,
+ auto_renew => $auto_renew,
+ reservesallowed => $reservesallowed,
+ issuelength => $issuelength,
+ lengthunit => $lengthunit,
+ hardduedate => $hardduedate,
+ hardduedatecompare => $hardduedatecompare,
+ rentaldiscount => $rentaldiscount,
+ onshelfholds => $onshelfholds,
+ opacitemholds => $opacitemholds,
+ overduefinescap => $overduefinescap,
+ };