From 5f57e2ec5c09050649acf5086798e4546859d1c8 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 --- 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 4a4727e5c2..ec6afc4e09 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*$/; @@ -306,6 +307,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 b34d02e2fa..d60c758119 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 @@ -112,6 +112,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 @@ -151,6 +154,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 %] @@ -164,7 +168,7 @@ [% SET article_requests = all_rules.$c.$i.article_requests %] [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] - [% 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 %] + [% 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 %] [% IF show_rule %] [% SET row_count = row_count + 1 %] @@ -258,6 +262,9 @@ [% maxsuspensiondays | html %] [% suspension_chargeperiod | html %] [% renewalsallowed | html %] + [% IF Koha.Preference('UnseenRenewals') %] + [% unseenrenewalsallowed | html %] + [% END %] [% renewalperiod | html %] [% norenewalbefore | html %] @@ -406,6 +413,7 @@ + @@ -475,6 +483,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.20.1