]> git.koha-community.org Git - koha.git/commit
Bug 30901: Add Renewals method to CirculationRules template plugin
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 3 Jun 2022 17:14:06 +0000 (13:14 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 16 Aug 2022 13:43:10 +0000 (10:43 -0300)
commit32475570c4b98ba5d0fd0e51634013eb4ffdf835
tree13f1e11cefd718ce02bc26a4db959413981f34aa
parentbd70e8989fc02040a751f13c7d291d40e2dd91d7
Bug 30901: Add Renewals method to CirculationRules template plugin

It would be useful to be able to report renewals used/remaining in some notices and slips.

Test Plan:
1) Apply this patch
2) Add the following to the RENEWAL notices:
--
[% USE CirculationRules %]
[% SET renewals = CirculationRules.Renewals( borrower.id, item.id ) %]
You have used [% renewals.count %] of [% renewals.allowed %], you have [% renewals.remaining %] renewals left.
--
3) Trigger a renewal notice
4) Verify the text is correct!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Template/Plugin/CirculationRules.pm