From 7f3e838936c04e004d7a2eba351ae0c20c7aeb1c 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 75ed5164ca..005e26d8b9 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -264,6 +264,7 @@ elsif ($op eq 'add') { my $maxissueqty = $input->param('maxissueqty'); my $maxonsiteissueqty = $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*$/; @@ -314,6 +315,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 ed737af2cd..742bf48817 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 @@ -141,6 +144,7 @@ [% SET maxsuspensiondays = CirculationRules.Search( branchcode, c, i, 'maxsuspensiondays' ) %] [% SET suspension_chargeperiod = CirculationRules.Search( branchcode, c, i, 'suspension_chargeperiod' ) %] [% SET renewalsallowed = CirculationRules.Search( branchcode, c, i, 'renewalsallowed' ) %] + [% SET unseenrenewalsallowed = CirculationRules.Search( branchcode, c, i, 'unseen_renewals_allowed' ) %] [% SET renewalperiod = CirculationRules.Search( branchcode, c, i, 'renewalperiod' ) %] [% SET norenewalbefore = CirculationRules.Search( branchcode, c, i, 'norenewalbefore' ) %] [% SET auto_renew = CirculationRules.Search( branchcode, c, i, 'auto_renew' ) %] @@ -154,7 +158,7 @@ [% SET article_requests = CirculationRules.Search( branchcode, c, i, 'article_requests' ) %] [% SET rentaldiscount = CirculationRules.Search( branchcode, 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 %] @@ -237,6 +241,9 @@ [% maxsuspensiondays | html %] [% suspension_chargeperiod | html %] [% renewalsallowed | html %] + [% IF Koha.Preference('UnseenRenewals') %] + [% unseenrenewalsallowed | html %] + [% END %] [% renewalperiod | html %] [% norenewalbefore | html %] @@ -357,6 +364,7 @@ + @@ -423,6 +431,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