From d67b2b5d46cef3dc221c05431a5ce5f7d2563cf1 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Thu, 21 Nov 2019 14:37:05 +0000 Subject: [PATCH] Bug 24083: Add circ rules management This patch adds the ability to set the "Unseen renewals allowed" value in the circulation rules Signed-off-by: Sally Healey Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- admin/smart-rules.pl | 2 ++ .../prog/en/modules/admin/smart-rules.tt | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 6ed3dac54d..d9595e5e60 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -260,6 +260,7 @@ elsif ($op eq 'add') { my $maxissueqty = strip_non_numeric( scalar $input->param('maxissueqty') ); my $maxonsiteissueqty = strip_non_numeric( scalar $input->param('maxonsiteissueqty') ); my $renewalsallowed = $input->param('renewalsallowed'); + my $unseen_renewals_allowed = $input->param('unseen_renewals_allowed'); my $renewalperiod = $input->param('renewalperiod'); my $norenewalbefore = $input->param('norenewalbefore'); $norenewalbefore = '' if $norenewalbefore =~ /^\s*$/; @@ -307,6 +308,7 @@ elsif ($op eq 'add') { hardduedate => $hardduedate, hardduedatecompare => $hardduedatecompare, renewalsallowed => $renewalsallowed, + unseen_renewals_allowed => $unseen_renewals_allowed, renewalperiod => $renewalperiod, norenewalbefore => $norenewalbefore, auto_renew => $auto_renew, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 94e48270b0..08b0a2bce5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -113,6 +113,9 @@ Max. suspension duration (day) Suspension charging interval Renewals allowed (count) + [% IF Koha.Preference('UnseenRenewals') %] + Unseen renewals allowed (count) + [% END %] Renewal period No renewal before Automatic renewal @@ -152,6 +155,7 @@ [% SET maxsuspensiondays = all_rules.$c.$i.maxsuspensiondays %] [% SET suspension_chargeperiod = all_rules.$c.$i.suspension_chargeperiod %] [% SET renewalsallowed = all_rules.$c.$i.renewalsallowed %] + [% SET unseenrenewalsallowed = all_rules.$c.$i.unseen_renewals_allowed %] [% SET renewalperiod = all_rules.$c.$i.renewalperiod %] [% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] [% SET auto_renew = all_rules.$c.$i.auto_renew %] @@ -166,7 +170,7 @@ [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] [% SET decreaseloanholds = all_rules.$c.$i.decreaseloanholds %] - [% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds %] + [% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds %] [% IF show_rule %] [% SET row_count = row_count + 1 %] @@ -261,6 +265,9 @@ [% maxsuspensiondays | html %] [% suspension_chargeperiod | html %] [% renewalsallowed | html %] + [% IF Koha.Preference('UnseenRenewals') %] + [% unseenrenewalsallowed | html %] + [% END %] [% renewalperiod | html %] [% norenewalbefore | html %] @@ -410,6 +417,7 @@ + @@ -480,6 +488,9 @@ Max. suspension duration (day) Suspension charging interval Renewals allowed (count) + [% IF Koha.Preference('UnseenRenewals') %] + Unseen renewals allowed (count) + [% END %] Renewal period No renewal before Automatic renewal -- 2.39.5