From 68182a6aae73fdc39287d20111dca24e8ad16158 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 --- admin/smart-rules.pl | 2 ++ .../intranet-tmpl/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 6bea920dd9..66c946a25d 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -262,6 +262,7 @@ elsif ($op eq 'add') { my $maxissueqty = strip_non_numeric($input->param('maxissueqty')); my $maxonsiteissueqty = strip_non_numeric($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 e0f50bf619..3c1ba83658 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 @@ -105,6 +105,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 @@ -143,6 +146,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 %] @@ -156,7 +160,7 @@ [% SET article_requests = all_rules.$c.$i.article_requests %] [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] - [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] + [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] [% IF show_rule %] [% SET row_count = row_count + 1 %] @@ -239,6 +243,9 @@ [% maxsuspensiondays | html %] [% suspension_chargeperiod | html %] [% renewalsallowed | html %] + [% IF Koha.Preference('UnseenRenewals') %] + [% unseenrenewalsallowed | html %] + [% END %] [% renewalperiod | html %] [% norenewalbefore | html %] @@ -365,6 +372,7 @@ + @@ -431,6 +439,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.11.0