From 854d00e42a2c14bb263cbed707948e96639466fd Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Wed, 18 Dec 2024 09:55:56 -0500 Subject: [PATCH] Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit To test: 1. Apply patch 2. reset_all (or start your testing environment in the first place) 3. Set system preferences finesMode to Calculate and charge 4. Edit default circulation rule so that fines will be calculated: Unit - Days Fine amount - 0.50 Fine charging interval - 1 When to charge - Start of interval 5. Check 2 items out to a patron with a custom due date of a few days in the past 6. On the patron's account page, click Print > Print overdues --> Look at the print preview of the slip, and confirm that the item information is displayed and formatted correctly 7. In another tab, edit the 2 items to add a call number (if they don't already have one) 8. Print overdues again --> Confirm the slip still looks good 9. Run the fines cronjob to generate some overdue fines ktd --shell misc/cronjobs/fines.pl -v -c 10. Print overdues again --> Confirm the fines are included and slip still looks good 11. Check in one of the overdue items 12. Print overdues again --> Confirm slip now says "item is" instead of "items are" --- .../data/mysql/en/mandatory/sample_notices.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index e054a5a0fa..ccd95451c0 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -910,10 +910,20 @@ tables: message_transport_type: print lang: default content: - - "The following item(s) is/are currently overdue:" - - "" - - "\"<>\" by <>, <>, Barcode: <> Fine: <>" - - "" + - "[%- USE Price -%]" + - "The following [% IF overdues > 1 %]items are[% ELSE %]item is[% END %] currently overdue:" + - "" + - "[% FOREACH odue IN overdues %]" + - "[% odue.item.biblio.title %]" + - "by [% odue.item.biblio.author %]" + - "[%- IF odue.item.itemcallnumber %]" + - "[% odue.item.itemcallnumber %]" + - "[%- END %]" + - "Barcode: [% odue.item.barcode %]" + - "[%- IF odue.overdue_fines.total_outstanding > 0 %]" + - "Fine: [% odue.overdue_fines.total_outstanding | $Price %]" + - "[%- END %]" + - "[% END %]" - module: circulation code: PREDUE -- 2.34.1