Bug 24776: Remove Borrowers.HasOverdues call
authorFridolin Somers <fridolin.somers@biblibre.com>
Mon, 2 Mar 2020 14:18:34 +0000 (17:18 +0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 16 Mar 2020 14:52:07 +0000 (14:52 +0000)
Borrowers Template Toolkit plugin contains method HasOverdues that can be directly called from Koha::Patron object.

Test plan :
1) Go to circulation page of a patron with overdues
2) Click on print button
3) You see "Print overdues"
4) Go to circulation page of a patron without overdues
5) Click on print button
6) You don't see "Print overdues"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc

index 90fbd0d..8af8e5e 100644 (file)
@@ -1,6 +1,5 @@
 [% INCLUDE 'blocking_errors.inc' %]
 [% USE Koha %]
-[% USE Borrowers %]
 [% USE Branches %]
 [% USE Categories %]
 [% USE AuthorisedValues %]
@@ -25,7 +24,7 @@
                 <li><a id="printsummary" href="#">Print summary</a></li>
                 <li><a id="printslip" href="#">Print slip</a></li>
                 <li><a id="printquickslip" href="#">Print quick slip</a></li>
-                [% IF Borrowers.HasOverdues( patron.borrowernumber ) %]
+                [% IF patron.has_overdues %]
                     <li><a id="print_overdues" href="#">Print overdues</a></li>
                 [% END %]
             </ul>