Notices and Slips Library

== Template (Do not edit) ==
==== CODE : Name : Type ====
* Developer: Your name here
* Status: [ Complete | Partial | In progress | etc. ]
* Uses template toolkit: [ True | False]
* Koha module: [ Acquisition | Catalog | Circulation | Claim Acquisition | Holds | Interlibrary loans | Order Acquisition | Patrons | Point of sale | Preservation | Serials (new issue) | Suggestions ]
* Code: foo
* Name: foo
* Type: [ Email | Phone (i-tiva) | Phone | Print | SMS ]
** HTML message: [ True | False ]
** Message subject foo
* Purpose: foo
* How to test: - Optional - 
* Notes: - Optional - 
foo
 - Optional - How it looks when rendered
----
== Default notices and slips ==
=== Koha 24.11 ===
Notices and Slips - Koha 24.11 defaults
Koha 24.11 includes:
* 107 default notice and slip templates
* 28 use Koha's bespoke template syntax
* 70 use Template Toolkit
* 9 use a combination of Koha's bespoke template syntax and Template Toolkit
* 1 notice was updated for 24.11
* 8 new notices and slips were added for 24.11
=== Koha 24.05 ===
Notices and Slips - Koha 24.05 defaults
=== Koha 23.11 ===
Notices and Slips - Koha 23.11 defaults
=== Koha 23.05 ===
Notices and Slips - Koha 23.05 defaults
=== Koha 22.11 ===
Notices and Slips - Koha 22.11 defaults
== Notices and slips using template toolkit ==
Documentation on using Template Toolkit in notices could be found on page Notices_with_Template_Toolkit
== User submitted notices and slips ==
=== Tips and tricks for any notice or slip ===
==== Manipulating Dates in Notices using Template Toolkit ====
*Developer: Kyle Hall 
*Purpose: To show how dates can be manipulated *within* notices using TT 
*Letter Code: All notices 
*Message Transport Type: All types 
*Status: Complete
For options, see https://metacpan.org/pod/distribution/Date-Manip/lib/Date/Manip/Examples.pod#PARSING-AN-AMOUNT-OF-TIME
This example takes the pickup date for a hold, subtracts one day from it, then converts it to the format MM/DD/YYYY
[%- USE date -%]
[%- manip = date.manip -%]
[%- date_prev = manip.DateCalc( hold.expirationdate, '1 day ago' ) -%]
[%- formatted_date_prev = manip.UnixDate(date_prev,"%m/%d/%Y") -%] 
Pick up hold on or before: [% formatted_date_prev %]
==== ACCOUNT_PAYMENT notice with Paypal payment and Authorized Values ====
* Developer: Barton Chittenden
* Letter Code: ACCOUNT_PAYMENT
* Message Transport Type: email
* Purpose: Illustrate how to use authorized values in template toolkit notices.
* Status: Complete
* How to test: Make a payment on the patron's 'Pay fines' tab.
[%- USE Price -%]
[%- USE AuthorisedValues -%]
A payment of $[% credit.amount * -1 | $Price %] via has been applied to your account.
This payment affected the following fees:
[%- FOREACH o IN offsets %]
Description: [% o.debit.description %]
Amount paid: $[% o.amount * -1 | $Price %]
[% IF ( o.credit.note == 'PayPal' ) %] Paid with: [% o.credit.note %] [% ELSE%] Paid with: [% AuthorisedValues.GetByCode('PAYMENT_TYPE', o.credit.payment_type) %] [% END %]
Amount remaining: $[% o.debit.amountoutstanding | $Price %]
[% END %]
How it looks
----
==== Footer for library system with different address lengths ====
* Developer: Caroline Cyr La Rose, inLibro, with the help of Jonathan Druart
* Letter Code: all
* Message Transport Type: email
* Purpose: HTML signature footer for a library system where some libraries use address line 2 and 3
* Status: Complete
* How to test: You can try using this footer in CHECKOUT and make a checkout in a library that has a long address (3 lines), and in a library that has a short address (only address line 1)
<<branches.branchname>>
<<branches.branchaddress1>>
[% IF branch.branchaddress2 %] [% branch.branchaddress2 %] [% END %]
[% IF branch.branchaddress3 %] [% branch.branchaddress3 %] [% END %]
<<branches.branchcity>> (<<branches.branchstate>>) <<branches.branchzip>>
Phone : <<branches.branchphone>>
How it looks with 3 address lines
How it looks with one address line (no gap!)
----
=== Acquisition ===
=== Catalog ===
=== Circulation ===
==== Account payment ====
* Developer: Martin Renvoize
* Letter Code: ACCOUNT_CREDIT
* Message Transport Type: print
* Purpose: A receipt to be printed when a patron credits their library account
* Status: Complete
* Notes: Bug 26734 updated the previous notice to use modern best practice whilst also introducing the 'tendered' and 'change' variables
* How to test: Click Print next to a patron's payment on their account
[% USE Price %]
[% PROCESS 'accounts.inc' %]
[% IF ( LibraryName ) %]
 
 [% LibraryName | html %]
 
[% END %]
 
 Fee receipt
 
 
 [% Branches.GetName( credit.patron.branchcode ) | html %]
 
 
 Received with thanks from [% credit.patron.firstname | html %] [% credit.patron.surname | html %] 
 Card number: [% credit.patron.cardnumber | html %]
 
 Date
 Description of charges
 Note
 Amount
 [% credit.date | $KohaDates %]
 
 [% PROCESS account_type_description account=credit %]
 [%- IF credit.description %], [% credit.description | html %][% END %]
 
 [% credit.note | html %]
 [% credit.amount | $Price %]
[% IF ( tendered ) %]
 Amount tendered: 
 [% tendered | $Price %]
 Change given: 
 [% change | $Price %]
[% END %]
<tfoot>
 Total outstanding dues as on date: 
 [% IF ( credit.patron.account.balance >= 0 ) %][% ELSE %][% END %][% credit.patron.account.balance | $Price %]
</tfoot>
----
==== Account payment with timestamp ====
* Developer: Aleisha Amohia
* Letter Code: ACCOUNT_CREDIT
* Message Transport Type: print
* Purpose: A receipt to be printed when a patron credits their library account
* Status: Complete
* Notes: Bug 16486 adds the timestamp to this existing notice
* How to test: Click Print next to a patron's payment on their account
[% IF ( LibraryName ) %]
 
 [% LibraryName | html %]
 
[% END %]
 
 Fee receipt
 
 
 [% Branches.GetName( patron.branchcode ) | html %]
 
 
 Received with thanks from [% patron.firstname | html %] [% patron.surname | html %] 
 Card number: [% patron.cardnumber | html %]
 
 Created
 Updated
 Description of charges
 Note
 Amount
[% FOREACH account IN accounts %]
 
 [% account.date | $KohaDates %]
 [% account.timestamp | $KohaDates with_hours = 1 %]
 
 [% PROCESS account_type_description account=account %]
 [%- IF account.description %], [% account.description | html %][% END %]
 
 [% account.note | html %]
 [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | $Price %]
 
[% END %]
<tfoot>
 Total outstanding dues as on date: 
 [% IF ( totalcredit ) %][% ELSE %][% END %][% total | $Price %]
</tfoot>
----
==== Account fee ====
* Developer: Martin Renvoize
* Letter Code: ACCOUNT_DEBIT
* Message Transport Type: print
* Purpose: A receipt to be printed when a patron credits their library account
* Status: Complete
* Notes: Bug 26734 updated the previous notice to use modern best practice
* How to test: Click Print next to a patron's fee on their account
[% USE Price %]
[% PROCESS 'accounts.inc' %]
[% IF ( LibraryName ) %]
 
 
 [% LibraryName | html %]
 
 
[% END %]
 
 INVOICE
 
 
 [% Branches.GetName( debit.patron.branchcode ) | html %]
 
 
 Bill to: [% debit.patron.firstname | html %] [% debit.patron.surname | html %] 
 Card number: [% debit.patron.cardnumber | html %]
 
 Date
 Description of charges
 Note
 Amount
 Amount outstanding
 [% debit.date | $KohaDates%]
 
 [% PROCESS account_type_description account=debit %]
 [%- IF debit.description %], [% debit.description | html %][% END %]
 
 [% debit.note | html %]
 [% debit.amount | $Price %]
 [% debit.amountoutstanding | $Price %]
<tfoot>
 
 Total outstanding dues as on date: 
 [% IF ( debit.patron.account.balance <= 0 ) %][% ELSE %][% END %][% debit.patron.account.balance | $Price %]
 
</tfoot>
"
----
==== Account fee with timestamp ====
* Developer: Aleisha Amohia
* Letter Code: ACCOUNT_DEBIT
* Message Transport Type: print
* Purpose: An invoice for the patron
* Status: Complete
* Notes: Bug 16486 adds the timestamp to this existing notice
* How to test: Click Print next to a patron's invoice on their account
[% IF ( LibraryName ) %]
 
 
 [% LibraryName | html %]
 
 
[% END %]
 
 INVOICE
 
 
 [% Branches.GetName( patron.branchcode ) | html %]
 
 
 Bill to: [% patron.firstname | html %] [% patron.surname | html %] 
 Card number: [% patron.cardnumber | html %]
 
 Created
 Updated
 Description of charges
 Note
 Amount
 Amount outstanding
[% FOREACH account IN accounts %]
 
 [% account.date | $KohaDates%]
 [% account.timestamp | $KohaDates with_hours = 1 %]
 
 [% PROCESS account_type_description account=account %]
 [%- IF account.description %], [% account.description | html %][% END %]
 
 [% account.note | html %]
 [% IF ( account.amountcredit ) %][% ELSE %][% END %][% account.amount | $Price %]
 [% IF ( account.amountoutstandingcredit ) %][% ELSE %][% END %][% account.amountoutstanding | $Price %]
 
[% END %]
<tfoot>
 
 Total outstanding dues as on date: 
 [% IF ( totalcredit ) %][% ELSE %][% END %][% total | $Price %]
 
</tfoot>
----
==== Hold slip with barcode ====
* Developer: Candice Hope, Payson City Library
* Purpose: Include item barcode in Hold Slip
* Letter Code: HOLDSLIP (AKA RESERVESLIP)
* Message Transport Type: email
* Status: Complete
* Notes: See Using svc/barcode for notes on individual barcode types.
* How to test: Put a title on hold, then check the item in. Click Accept and print slip.
Date: <<today>>
Hold at <<branches.branchname>>
ITEM ON HOLD
<<biblio.title>>
<<biblio.author>>
<img src="/cgi-bin/koha/svc/barcode?barcode=*<<items.barcode>>*&type=Code39"></img>
<<items.barcode>>
<<items.itemcallnumber>>
<<items.copynumber>>
Notes:
<pre><<reserves.reservenotes>></pre>
<<borrowers.surname>>, <<borrowers.firstname>>
 <<borrowers.cardnumber>>
 <<borrowers.phone>>
How it looks
----
==== Hold slip with barcode ====
* Developer: Kyle Hall
* Purpose: Hold slip using template Toolkit.
* Letter Code: Customising_Notices_and_Slips#HOLD_SLIP (AKA HOLDSLIP or RESERVESLIP)
* Message Transport Type: email
* Status: Complete
* Notes: Uses [% USE Branches %]. See Koha/Template/Plugin/Branches.pm, as well as other modules in Koha/Template/Plugin/.
* How to test: Put a title on hold, then check the item in. Click Accept and print slip.
[% USE Branches %]
Date: <<today>>
Transfer to/Hold in <<branches.branchname>>
<<borrowers.surname>>, <<borrowers.firstname>>
 <<borrowers.cardnumber>>
 <<borrowers.phone>>
 <<borrowers.address>>
 <<borrowers.address2>>
 <<borrowers.city >> <<borrowers.zipcode>>
 
 <<borrowers.email>>
ITEM ON HOLD
<<biblio.title>>
<<biblio.unititle>>
<<biblio.author>>
<<items.barcode>>
<img src="/cgi-bin/koha/svc/barcode?barcode=*<<items.barcode>>*"></img>
<<items.itemcallnumber>>
<<reserves.waitingdate>>
</ul>
Transferred From: [% Branches.GetName('<<items.holdingbranch>>') %]
Home Library: [% Branches.GetName('<<items.homebranch>>') %] 
Notes:
<pre><<reserves.reservenotes>></pre>
----
==== Hold slip using only Template Toolkit ====
* Developer: Josef Moravec
* Letter Code: HOLD_SLIP
* Message Transport Type: email
* Purpose: Hold slip using template Toolkit
* Status: Complete
* Notes: Tested on 17.11 with TSP 143 printer
* How to test: Put a title on hold, then check the item in. Click Accept and print slip.
Printed on: [% today | $KohaDates with_hours => 1 %]
[% branch.branchname %]
[% IF ( biblio.author ) %][% biblio.author %]:[% END %][% biblio.title %]
Barcode: [% item.barcode %]
Waiting until: [% hold.expirationdate | $KohaDates%]
[% IF ( hold.reservenotes ) %]
Note:[% hold.reservenotes %]
[% END %]
[% borrower.cardnumber %]
[% borrower.surname %][% IF ( borrower.firstname ) %], [% borrower.firstname %][% END %]
----
==== Hold Slip ====
* Developer: Lisette Scheer
* Letter code: HOLD_SLIP
* Message transport type: email
* Purpose: Hold slip that will print a hold transfer slip if it is going to another library or will print a hold slip with the expiration date for holds where the patron has an email or SMS number or a space to stamp/write the expiration date after calling the patron. 
* Status: Complete
* How to test: Print a hold slip for a transfer, a patron with an email and/or SMS number, and a patron with no e-mail/SMS number
[%- USE Branches -%]
[%- USE KohaDates -%]
[% IF hold.branchcode != Branches.GetLoggedInBranchcode() %]
 [% hold.branchcode %] - Hold
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[% ELSIF hold.branchcode == Branches.GetLoggedInBranchcode() && borrower.smsalertnumber || borrower.email %]
Hold till: [% hold.expirationdate | $KohaDates dateformat => 'us' | truncate (6, ' ') %]
 [% borrower.surname %], [% borrower.firstname %] 
 
 
 ITEM ON HOLD 
 [% biblio.title %] [% IF biblio.author %] // [% biblio.author %] [% END %] // [% item.itemcallnumber %] 
[% item.barcode %]
Available Since: [% hold.waitingdate | $KohaDates dateformat => 'us' %]
[% IF hold.reservenotes %]
 Notes:: 
[% hold.reservenotes %]
[% END %]
[% ELSIF hold.branchcode == Branches.GetLoggedInBranchcode() %]
Hold till: _________
 [% borrower.surname %] [% borrower.firstname %] 
 
 
 ITEM ON HOLD 
 [% biblio.title %] [% IF biblio.author %] // [% biblio.author %] [% END %] // [% item.itemcallnumber %] 
[% item.barcode %]
Available Since: [% hold.waitingdate | $KohaDates dateformat => 'us' %]
[% IF hold.reservenotes %]
 Notes:: 
[% hold.reservenotes %]
[% END %] 
 Phone Call Checklist 
 [% borrower.firstname %] [% IF borrower.othernames %] ( [% borrower.othernames %] ) [% END %] 
[% borrower.phone %]
 Circle one:
 Spoke directly with the patron.
 Left message with person who answered the phone.
 Left message on answering machine / voice mail.
 Please send a postcard to the patron if you cannot
 contact them by other means within 24 hours of the
 requested item's arrival.
[% END %]
----
==== Hold Slip - Extended Options ====
* Developer: Lisette Scheer
* Letter code: HOLD_SLIP
* Message transport type: email
* Purpose: Hold slip that will print a hold transfer slip if it is going to another library or will print a hold slip with the expiration date for holds where the patron has an email or SMS number or a space to stamp/write the expiration date after calling the patron. This also has some custom sections for specific patrons such as technichal services holds, holds for library staff, and truncation of patron information for self-serve holds *Branchcode* etc should be replaced with the branchcode you want to use. 
* Status: Complete
* How to test: Print a hold slip for a transfer, a patron with an email and/or SMS number, and a patron with no e-mail/SMS number
[%- USE Branches -%]
[%- USE KohaDates -%]
[% IF hold.branchcode != "*Branchcode*" %]
 [% hold.branchcode %] - Hold
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[% ELSIF hold.branchcode == "*Branchcode*" && borrower.borrowernumber == "*Borrowernumber*" %] 
 MENDING 
Cancel this hold, change status to "Mending" then initial below:
INITIALS: ______
Sent to mending on: [% hold.waitingdate | $KohaDates dateformat => 'us' %] 
 Notes: 
[% hold.reservenotes %]
></li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[% ELSIF hold.branchcode == "*Branchcode*" && borrower.borrowernumber == "*Borrowernumber*" %]
 Send to Access Services Manager
INITIALS:______
Sent on: [% hold.waitingdate | $KohaDates dateformat => 'us' %] 
 Notes: 
[% hold.reservenotes %]
 
 
 
 
 
 
 
 
 
 
 
 
[% ELSIF hold.branchcode == "*Branchcode*" && borrower.categorycode == "*categorycode*" %]
STAFF HOLD
Hold till: [% hold.expirationdate | $KohaDates dateformat => 'us' | truncate (6, ' ') %]
 [% borrower.firstname %]
 
 
 ITEM ON HOLD 
 [% biblio.title %] [% IF biblio.author %] // [% biblio.author %] [% END %] // [% item.itemcallnumber %] 
[% item.barcode %]
Available Since: [% hold.waitingdate | $KohaDates dateformat => 'us' %]
[% IF hold.reservenotes %]
 Notes:: 
[% hold.reservenotes %]
[% END %]
[% ELSIF hold.branchcode == "*Branchcode*" && borrower.categorycode != "*Categorycode*" && borrower.smsalertnumber || borrower.email %]
Hold till: [% hold.expirationdate | $KohaDates dateformat => 'us' | truncate (6, ' ') %]
 [% borrower.surname | truncate (3, ',') %] [% borrower.firstname | truncate (3, ' ') %] [% borrower.cardnumber | remove('2185390') %]
 
 
 ITEM ON HOLD 
 [% biblio.title %] [% IF biblio.author %] // [% biblio.author %] [% END %] // [% item.itemcallnumber %] 
[% item.barcode %]
Available Since: [% hold.waitingdate | $KohaDates dateformat => 'us' %]
[% IF hold.reservenotes %]
 Notes:: 
[% hold.reservenotes %]
[% END %]
[% ELSIF hold.branchcode == "*branchcode*" %]
Hold till: _________
 [% borrower.surname | truncate (3, ',') %] [% borrower.firstname | truncate (3, ' ') %] [% borrower.cardnumber | remove('2185390') %]
 
 
 ITEM ON HOLD 
 [% biblio.title %] [% IF biblio.author %] // [% biblio.author %] [% END %] // [% item.itemcallnumber %] 
[% item.barcode %]
Available Since: [% hold.waitingdate | $KohaDates dateformat => 'us' %]
[% IF hold.reservenotes %]
 Notes:: 
[% hold.reservenotes %]
[% END %] 
 Phone Call Checklist 
 [% borrower.firstname %] [% IF borrower.othernames %] ( [% borrower.othernames %] ) [% END %] 
[% borrower.phone %]
 Circle one:
 Spoke directly with the patron.
 Left message with person who answered the phone.
 Left message on answering machine / voice mail.
 Please send a postcard to the patron if you cannot
 contact them by other means within 24 hours of the
 requested item's arrival.
[% END %]
----
==== Hold Slip - Print patron "code" ====
* Developer: Caroline Cyr La Rose, inLibro
* Letter code: HOLD_SLIP
* Message transport type: email
* Purpose: A library wanted to print a client "code" composed of the 3 first letters of the last name in capital letters, followed by the cardnumber. I just put the first line here, which replaces the borrowers.surname, borrowers.firstname line on the original hold_slip
* Status: Partial
* How to test: Print a hold slip
[% borrower.surname.substr(0,3) FILTER upper %][% borrower.cardnumber %]
----
==== Hold slip - Print partial email only ====
* Developer: Caroline Cyr La Rose, inLibro
* Letter code: HOLD_SLIP
* Message transport type: email
* Purpose: Partially hiding the email address of a patron, when the slip is used in public in a self serve shelf for example
* Status: Partial, remplace the <<borrowers.email>> or [% borrower.email %] with one of the lines below
* How to test: Print a hold slip
This will print 5 asterisks followed by the ̊@ and domain, so foobar@something.com will become *****@something.com
[% borrower.email.replace('.*@','*****@') %]
This will print the first two letters of the email address, followed by 5 asterisks, followed by the @ and domain, so foobar@something.com will become fo*****@something.com
[% borrower.email.substr(0,2) %][% borrower.email.replace('.*@','*****@') %]
----
==== Hold Slip - Print patron messaging preference ====
* Developer: Caroline Cyr La Rose, inLibro
* Letter code: HOLD_SLIP
* Message transport type: email
* Purpose: 
**Bug 30076 added the possibility to print the patron's messaging preference on slips, this prints which message transport type the patron has chosen for the "Hold filled" message on the hold slip. 
**I just put the relevant lines here, you can add it anywhere in HOLD_SLIP. 
**This works with email and SMS and will print 
***"Patron's messaging preference: Email" if at least email is checked (just email or email AND SMS)
***"Patron's messaging preference: SMS" if SMS is checked
***"Patron's messaging preference: Patron is not notified" if neither email nor SMS is checked
* Status: Partial
* How to test: Print a hold slip
Patron messaging preference: 
[% IF ((borrower.has_messaging_preference({ message_name => 'Hold_filled', message_transport_type => 'email' }))) == 1 %] Email
[% ELSIF ((borrower.has_messaging_preference({ message_name => 'Hold_filled', message_transport_type => 'sms' }))) == 1 %] SMS
[% ELSE %]Patron is not notified [% END %]
----
==== Checkouts slip using only Template Toolkit (ISSUESLIP) ====
* Developer: Josef Moravec
* Letter Code: ISSUESLIP
* Message Transport Type: email
* Purpose: Checkouts slip using Template Toolkit
* Status: Complete
* Notes: Tested on 17.11 with TSP 143 printer
* How to test: Go to circulation and print checkouts slip.
[% USE ItemTypes %]
[% BLOCK detail %]
[% IF checkout.item.biblio.author %][% checkout.item.biblio.author | $Remove_MARC_punctuation) %]:[% END %]
[% checkout.item.biblio.title | $Remove_MARC_punctuation %]
[%- IF checkout.item.enumchron %], [% checkout.item.enumchron %][% END %]
([% ItemTypes.GetDescription(checkout.item.effective_itemtype) %])
Checked out on: [% checkout.issuedate | $KohaDates %]
Due date: [% checkout.date_due | $KohaDates as_due_date=1 %]
[% branch.branchname %]
[% IF checkout.item.biblio.holds.count %]Reserved, this checkout cannot be renewed[% END %]
[% END # Block %]
Printed on: [% today | $KohaDates with_hours=1 %]
<img src="https://path.to.logo" style="width: 6cm" />
[% branch.branchemail %]
[% branch.branchphone %]
Patron: [% IF ( borrower.firstname ) %][% borrower.firstname %] [% END %][% borrower.surname %] ([% borrower.cardnumber %]) 
Checkouts count: [% checkouts.count %]
[% FOREACH checkout IN checkouts %]
[% PROCESS detail checkout = checkout %]
[% END %]
[% IF overdues.count %]
[% FOREACH overdue IN overdues %]
[% PROCESS detail checkout = overdue %]
[% END %]
[% END # if overdues %]
----
==== ISSUESLIP : Checkouts slip using Template Toolkit : Email ====
* Developer: Michael Kuhn
* Letter Code: ISSUESLIP
* Message Transport Type: email
* Purpose: Checkouts slip using Template Toolkit
* Status: Complete
* Notes: This is another example on how to print the checkouts part of the slip with translated itemtype descriptions. Example text is in German. 
* How to test: Go to circulation, check something out and wait for the email.
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% biblio.title %] [% item.barcode %]
[% SWITCH item.itype %]
[% CASE '01' %] Kinder-/Jugendbuch
[% CASE '02' %] Sachbuch
[% CASE '03' %] Schöne Literatur
[% CASE '05' %] Cassetten
[% CASE '06' %] CD
[% CASE '07' %] Zeitschriften
[% CASE '08' %] Präsenzmedien
[% END %]
Fällig am: [% checkout.date_due %]
[% END %]
----
==== Remove hours on the due dates on the issue slip ====
* Developer: Caroline Cyr La Rose, inLibro, modified from Michael Kuhn's ISSUESLIP above and with the help of Katrin Fischer and Lucas Gass
* Letter code: ISSUESLIP
* Message transport type: email
* Purpose: Slight modification from the default ISSUESLIP to hide the 23:59:00 in the due dates
* Status: Complete
* How to test: Print the issue slip from a user file who has checkouts
[%- USE KohaDates -%]
<<branches.branchname>>
Checked out by <<borrowers.firstname>> <<borrowers.surname>> 
(<<borrowers.cardnumber>>) 
<<today>>
Borrowed today
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% checkout.date_due | $KohaDates %]
[% END %]
[% IF overdues.count %]
Overdues
[% FOREACH overdue IN overdues %]
[%~ SET item = overdue.item %]
[%~ SET biblio = overdue.item.biblio %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% overdue.date_due | $KohaDates %]
[% END %]
[% END %]
News
<news>
<<opac_news.title>>
<<opac_news.content>>
Published on <<opac_news.timestamp>>
</news>
----
==== Add total value of items on issue slip ====
* Developer: Caroline Cyr La Rose
* Letter code: ISSUESLIP (should work on ISSUEQSLIP too but haven't tested)
* Message transport type: email
* Purpose: Add the value of all items at the bottom of the issue slip to raise awareness of the value of the library in the community
* Status: Complete
* How to test: Print an issue slip
The base is the slip #Remove hours on the due dates on the issue slip above
The parts that were added are:
[%- USE Price -%]
[% totalValue = 0 %]
[% totalValue = item.price + totalValue %] (twice, once in Checkouts and once in Overdues)
You saved [% totalValue | $Price %] by using the library today!
[%- USE KohaDates -%]
[%- USE Price -%]
[% totalValue = 0 %]
<<branches.branchname>>
Checked out by <<borrowers.firstname>> <<borrowers.surname>> 
(<<borrowers.cardnumber>>) 
<<today>>
Borrowed today
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% totalValue = item.price + totalValue %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% checkout.date_due | $KohaDates %]
[% END %]
[% IF overdues.count %]
Overdues
[% FOREACH overdue IN overdues %]
[%~ SET item = overdue.item %]
[%~ SET biblio = overdue.item.biblio %]
[% totalValue = item.price + totalValue %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% overdue.date_due | $KohaDates %]
[% END %]
[% END %]
You saved [% totalValue | $Price %] by using the library today!
News
<news>
<<opac_news.title>>
<<opac_news.content>>
Published on <<opac_news.timestamp>>
</news>
----
==== Add total value of items borrowed to date on issue slip ====
* Developer: Martin Renvoize
* Letter code: ISSUESLIP (should work on ISSUEQSLIP too but haven't tested)
* Message transport type: email
* Purpose: Aditionally add the value of historically loaned items at the bottom of the issue slip to raise awareness of the value of the library in the community
* Status: Complete
* How to test: Print an issue slip (For user 
with loan history)
The base is the slip #Add total value of items borrowed on issue slip above
The parts that were added are:
[%- FOREACH old_checkout IN borrowers.old_checkouts -%][%- totalValue = old_checkout.item.price + totalValue -%][%- END -%]
You have saved [% totalValue | $Price %] by using the library!
[%- USE KohaDates -%]
[%- USE Price -%]
[% totalValue = 0 %]
<<branches.branchname>>
Checked out by <<borrowers.firstname>> <<borrowers.surname>> 
(<<borrowers.cardnumber>>) 
<<today>>
Borrowed today
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% totalValue = item.price + totalValue %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% checkout.date_due | $KohaDates %]
[% END %]
[% IF overdues.count %]
Overdues
[% FOREACH overdue IN overdues %]
[%~ SET item = overdue.item %]
[%~ SET biblio = overdue.item.biblio %]
[% totalValue = item.price + totalValue %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% overdue.date_due | $KohaDates %]
[% END %]
[% END %]
You saved [% totalValue | $Price %] by using the library today!
[%- FOREACH old_checkout IN borrowers.old_checkouts -%]
[% totalValue = old_checkout.item.price + totalValue %]
[%- END -%]
You have saved [% totalValue | $Price %] by using the library!
News
<news>
<<opac_news.title>>
<<opac_news.content>>
Published on <<opac_news.timestamp>>
</news>
----
==== Issue slip with special message for an itemtype ====
* Developer: Caroline Cyr La Rose, inLibro
*Letter Code: ISSUESLIP
*Message Transport Type: email, but slip is printed
*Purpose: If a patron checks out an item of a particular item type, print a special message on the issue slip.
*Status: Partial
*Notes:
** In the example, the item type is "GAME" and the message is "Games must be returned to the same library they were checked out from."
** I only put the "FOREACH checkout" loop of the ISSUESLIP with the added line. You should also add the line in the overdues section, and the quick slip if needed.
*How to test: Check out a couple of items to a patron, at least one being the special item type, print the issue slip. The message should appear under the item(s) with the special item type.
The added line is
[% IF item.itype == 'GAME' %]Games must be returned to the same library they were checked out from.[% ELSE %][% END %]
The line in the checkout loop
Borrowed today
[% FOREACH checkout IN checkouts %]
[%~ SET item = checkout.item %]
[%~ SET biblio = checkout.item.biblio %]
[% biblio.title %]
Call number: [% item.itemcallnumber %]
Due date: [% checkout.date_due | $KohaDates %]
[% IF item.itype == 'GAME' %]Games must be returned to the same library they were checked out from.[% ELSE %][% END %]
[% END %]
Category:Resources
Category:Library
----
==== ISSUEQSLIP : Issue slip with current session checkouts only : Email (but slip is printed) ====
* Developer: Christopher Brannon (Coeur d'Alene Public Library / Cooperative Information Network)
* Status: Complete
* Uses template toolkit: Uses Template Toolkit + Koha notices and slips syntax
* Koha module: Circulation
* Code: ISSUEQSLIP
* Name: Issue Quick Slip
* Type: Email (but slip is printed see bug 13498)
** HTML message: True
** Message subject Issue Quick Slip (irrelevant for slip printing)
* Purpose: Print only the items that were checked out in the last 15 minutes
Message body:
[% USE date %]
[%- USE KohaDates -%]
[% manip = date.manip %]
<head>
<style>
@page { margin: 15px; }
</style>
</head>
<<today>>
Checked out during this session
[% FOREACH checkout IN borrower.checkouts %]
[% SET timebetween = manip.DateCalc(checkout.item.checkout.issuedate , date.format(date.now())) %]
[% timebetween = timebetween.replace(':' , ) %]
[% IF timebetween < 3000 %]
Title: [% checkout.item.biblio.title %]
Barcode: [% checkout.item.barcode %]
Date due: [% checkout.date_due | $KohaDates %]
[% END %]
[% END %]
Renew items online at [YOUR CATALOG ADDRESS HERE] or call <<branches.branchname>> at <<branches.branchphone>>.
Want to receive notification of holds available and items due more quickly? Talk to library staff on your next visit about adding an email address and/or text messaging number to your account.
----
==== ISSUEQSLIP: Issue Quick Slip with current branch checkouts only : Email (but slip is printed) ====
* Developer: George Williams (Northeast Kansas Library System)
* Status: Complete
* Uses template toolkit: True
* Koha module: Circulation
* Code: ISSUEQSLIP
* Name: Issue Quick Slip
* Type: Email (but slip is printed see bug 13498)
** HTML message: True
** Message subject Issue Quick Slip (irrelevant for slip printing)
* Purpose: Print only the items that were checked out today at your currently logged in branch.
* How to test: 
# Make a backup of your current ISSUEQSLIP 
# Replace the contents of your ISSUEQSLIP with this template
# Check an item out to a borrower
# Print quick slip for that borrower
# Change your logged in library
# Print a new quick slip for that same borrower
# Second slip should not include the item checked out before changing libraries
Message body:
[% USE date %]
[% USE Branches %]
[% USE KohaDates %]
[% USE ItemTypes %]
[% date.format(date.now, "%Y/%m/%d at %I:%M %p") %]
Checked out todayat this library:
[% FOREACH checkout IN checkouts %]
 [% IF checkout.branchcode == Branches.GetLoggedInBranchcode() %]
 
 [% checkout.item.biblio.title FILTER upper %][% IF checkout.item.biblio.subtitle %] [% checkout.item.biblio.subtitle FILTER upper %][% END %]
 [% IF checkout.item.biblio.author %]Author: [% checkout.item.biblio.author %][% END %]
 Item type: [% ItemTypes.GetDescription(checkout.item.effective_itemtype) %]
 Barcode: [% checkout.item.barcode %]
 Date due: [% checkout.date_due | $KohaDates %]
 -----
 
 [% END %]
[% END %]
----
==== ODUE : Overdue notice with total due : Print or Email ====
* Developer: Caroline Cyr La Rose, inLibro
* Status: Complete
* Uses template toolkit: Uses Template Toolkit + Koha notices and slips syntax
* Koha module: Circulation
* Code: ODUE
* Name: -
* Type: tested with Print, but possibly works with Email also
** HTML message: True
** Message subject -
* Purpose: Last overdue notice where the patron is informed they will have to pay the replacement cost + administration fees
* How to test: Create an overdue more than the overdue trigger by making a checkout with a due date in the past; run overdue_notices.pl
* Notes:
** Based on "Add total value of items on issue slip" from above
** In this case, the administration fees for long overdue/lost items is 2$ by item, regardless of itemtype
** The overdue notice is formatted with tables to align the patron address with an envelope with a window, sorry if the html is confusing
** Example is in French
Since there is a lot of HTML in my example, here are the important parts
This is added at the top of the notice, it says we are using the Price and KohaDates formats and also resets the totalValue and adminFee to 0
[%- USE Price -%]
[%- USE KohaDates -%]
[% totalValue = 0 %]
[% adminFee = 0 %]
This is added in the FOR EACH overdue loop; each item in the notice adds its replacement price to the totalValue and 2 to adminFee
[% totalValue = item.replacementprice + totalValue %]
[% adminFee = adminFee + 2 %]
Total of all the replacement prices
[% totalValue | $Price %]
Total of all the administration fees
[% adminFee | $Price %]
Total of all the replacement prices + admin fees
[% totalValue + adminFee| $Price %]
Message body:
[%- USE Price -%]
[%- USE KohaDates -%]
[% totalValue = 0 %]
[% adminFee = 0 %]
<img style="max-width:250px;" src="link to image" alt="Logo">
 
 
 
 DERNIER AVIS DE RETARD
 
 
 
 
 Date :
 <<today>>
 
 
 <<borrowers.firstname>> <<borrowers.surname>>
 
 
 
 
 <<borrowers.streetnumber>> <<borrowers.address>><<borrowers.address2>>
 Numéro de carte :
 <<borrowers.cardnumber>>
 
 
 <<borrowers.city>> <<borrowers.state>>
 Téléphone :
 <<borrowers.phone>>
 
 
 <<borrowers.zipcode>>
 
 
 
 
 
 
 
 
 
Bonjour <<borrowers.surname>> <<borrowers.firstname>>,
Malgré nos avis, les documents suivants n'ont pas été rapportés à la bibliothèque. 
[% FOREACH overdue IN overdues %]
[%~ SET item = overdue.item %]
[%~ SET biblio = overdue.item.biblio %]
Titre : [% biblio.title %]
Auteur : [% biblio.author %]
Cote : [% item.itemcallnumber %]
Code-barres : [% item.barcode %]
Date d'échéance : [% overdue.date_due | $KohaDates %]
Coût de remplacement : [% item.replacementprice | $Price %] $
[% totalValue = item.replacementprice + totalValue %]
[% adminFee = adminFee + 2 %]
[% END %]
Nous sommes dans l'obligation de vous facturer le prix de remplacement du ou des documents, plus des frais de traitement de 2 $ par document.
Coût de remplacement des documents : [% totalValue | $Price %] $
Frais d'administration (2$ par document) : [% adminFee | $Price %] $
Total : [% totalValue + adminFee| $Price %] $
Toute facture non acquittée fait perdre à l'abonné le privilège d'emprunter tout document. Si vous éprouvez des difficultés, veuillez communiquer avec nous pour prendre un arrangement.
<<branches.branchname>>
<<branches.branchaddress1>>
<<branches.branchcity>> <<branches.branchstate>> <<branches.branchzip>>
Tél : <<branches.branchphone>>
Courriel : <<branches.branchemail>>
----
=== Claim acquisition ===
=== Holds ===
==== HOLDDGST : Hold available for pickup (digest) : Email ====
* Developer: George Williams (Northeast Kansas Library System)
* Status: Complete
* Uses template toolkit: Uses Template Toolkit + Koha notices and slips syntax
** (uses Koha notices and slips syntax "----" to repeat details for multiple holds )
* Koha module: Holds
* Code: HOLDDGST
* Name: Hold available for pickup (digest)
* Type: Email
** HTML message: True
** Message subject Library items available for pickup
* Purpose: Sends email to borrower when requested items are available to pick up
[% USE date %]
[% USE KohaDates %]
[% manip=date.manip %]
Requested library items available to pick up
The following requested items are available to pickup at the library indicated ([% date.format(date.now, "%Y-%m-%d") %]).These requests are for the library member with the card number ending in [% borrower.cardnumber.substr(-6) FILTER upper %].
The details are:
 ----
 
 
 [% hold.reserve_id %]
 Waiting at: [% hold.branch.branchname %]
 
 Title: [% hold.biblio.title %]
 Author: [% hold.biblio.author %]
 Item has been waiting since: [% hold.waitingdate %]
 Item will be held until: [% hold.expirationdate %]
 
 
 
 ----
Thank you,
This message was sent by:
[% branch.branchname %] [% branch.branchaddress1 %] [% branch.branchcity %], [% branch.branchstate %] [% branch.branchzip %] 
You can access your account on-line at <a href="https://nextkansas.org">https://nextkansas.org</a> 24 hours a day.
Visit our library's website at: <a href="[% branch.branchurl %]">[% branch.branchurl %]</a>
If you no longer wish to receive these e-mails or if you have any questions, please contact us by phone at [% branch.branchphone %].
This notice was generated on [% date.format(date.now, "%Y/%m/%d at %I:%M %p") %]
How it looks when rendered
----
==== HOLDDGST : Hold available for pickup (digest) : Email ====
* Developer: Juliet Heltibridle (Rapid City Public Library)
* Status: Complete
* Uses template toolkit: True
* Koha module: Holds
* Code: HOLDDGST
* Name: Hold available for pickup (digest)
* Type: Email
** HTML message: True
** Message subject Your Library Holds are Ready for Pickup
* Purpose: 
** This notice is sent to the patron when their hold is ready for pickup and they have digest mode selected for this message.
** This updates the notices to simplify the message contents and add HTML.
* Note: Notices must use the ---- syntax to repeat each hold that will be included in the notice.
[% USE KohaDates %]
Hi [% borrower.firstname %],
Your items are ready for pickup! You can collect them at the pickup location listed below. If you need to change where you pick them up, give us a call at <a href="tel:+15555555555">(555) 555-5555</a>.
----
[% hold.biblio.title | remove('/') %][% IF hold.biblio.subtitle %] [% hold.biblio.subtitle | remove('/') %][% END %][% IF hold.biblio.author %] by [% hold.biblio.author %][% END %]
Pickup Location: [% hold.branch.branchname %]
Last Day to Pick Up: [% hold.expirationdate | $KohaDates %]
----
Thanks,
[% branch.branchname %]
----
=== Interlibrary loans ===
=== Order acquisition ===
=== Patrons ===
==== MEMBERSHIP_EXPIRY : Account Expiration : Email ====
* Developer: Juliet Heltibridle (Rapid City Public Library)
* Status: Complete
* Uses template toolkit: True
* Koha module: Patrons
* Code: MEMBERSHIP_EXPIRY
* Name: Account Expiration
* Type: Email
** HTML message: False
** Message subject Time to renew your library card!
* Purpose: 
** Notice is sent to patrons to warn them that their account is expiring soon.
** This updates the notice to Template Toolkit, makes the notice more informational and adds a call to action for the patron to renew.
*Notes: Requires that you have the MembershipExpiryDaysNotice set and the related cron job set
[%- USE KohaDates -%]
Dear [% borrower.firstname %] [% borrower.surname %],
We hope you’ve enjoyed all the library has to offer! We want to let you know that your library card will expire in 30 days. To continue using library services after [% borrower.dateexpiry | $KohaDates %], please renew your library card at your earliest convenience.
Here’s how to renew your card:
Visit us in person at [% branch.branchaddress1 %].
Bring proof of your current address if it has changed (e.g., mail, utility bill, rental agreement).
Don’t forget to renew your account by [% borrower.dateexpiry | $KohaDates %] so you can continue to borrow items and access online resources! If you have questions or need help, please feel free to contact us at [% branch.branchphone %] or reply to this email.
We look forward to seeing you at the library!
Sincerely,
[% branch.branchname %]
[% branch.branchurl %]
----
=== Patron (custom_slip) ===
==== Patron Confirmation Slip ====
* Developer: Christopher Brannon (Coeur d'Alene Public Library / Cooperative Information Network)
* Status: Complete
* Uses template toolkit: True
* Koha module: Patron (custom_slip)
* Code: PATRON_CONFIRM
* Name: Patron Confirmation Slip
* Type: Print
** HTML message: True
** Message subject Patron Confirmation Slip
* Purpose: 
** This slip (which can print on receipt paper safely) will print all information that the patron filled out in self registration, which is what we primarily use it for.
** It includes information below that data that isn't included in the online registration, where we need to gather more information, plus have them sign.
** Our library requires us to keep a signed registration form, so this takes the place of the in-person form.
** We can also use it to confirm renewals, if needed.
Patron Confirmation Slip
Name
[% borrower.firstname %] [% borrower.middle_name %] [% borrower.surname %]
Mailing Address
[% borrower.address %]
[% borrowercity %], [% borrower.state %] [% borrower.zipcode %]
Physical Address
[% borrower.B_address %]
[% borrower.B_city %], [% borrower.B_state %] [% borrower.B_zipcode %]
Primary Phone
[% borrower.phone %]
Secondary Phone
[% borrower.B_phone %]
Primary Email
[% borrower.email %]
Secondary Email
[% borrower.B_email%]
       ADDITIONAL INFORMATION          Birth Date_____ / _____ / __________Parent/Guardian Name (if under 18)_______________________________________RelationshipFather / Mother / Guardian (circle one)Contact preferenceE-mail / Text (SMS) / Phone call(Circle all that apply)Do you want to receive:The monthly ADULT newsletter?Yes / NoThe monthly TEEN newsletter?Yes / NoThe monthly KID\'S newsletter?Yes / NoI, as an individual or as the parent/legal guardian of a child, shall comply with all library policies, accept responsibility for all materials borrowed from the library, and will give immediate notice of any change of address. If the card is lost or stolen, I understand I must notify the library immediately. If signing as the parent or legal guardian of a child, I understand that children have access to all materials in the library, and I accept responsibility for monitoring my child\'s access to print, media, and electronic formats, including the internet._______________________________________Signature__________Received Parent/Caregiver Guide (Initial)_________Staff Initials
----
==== Custom Curbside Slip (Simple Curbside) ====
* Developer: Christopher Brannon (Coeur d'Alene Public Library / Cooperative Information Network)
* Status: Complete
* Uses template toolkit: True
* Koha module: Patron (custom_slip)
* Code: CUSTOM_CURBSIDE
* Name: Patron Confirmation Slip
* Type: Print
** HTML message: True
** Message subject Custom Curbside Slip
* Purpose: 
** This slip produces a simple slip for the patron you are currently viewing, that prints their last name, first initial, barcode, and a place to hand write location information and notes.
** It also includes the patrons holds that are waiting for pickup at your location.
** It is designed so you can print the slip, fill out any extra info if needed, and grab the holds off the hold shelf and use the slip like their library card.
** We tend to shred this slip when the curbside service is complete.
[% USE bcode = String '/cgi-bin/koha/svc/barcode?type=Code39¬ext=1&height=50&barcode=' %]
[% USE date %]
[% manip = date.manip %]
Curbside Pickup
[% borrower.surname %], [% borrower.firstname.substr(0, 1) %][% borrower.middle_name.substr(0, 1) %]
<img src= [% bcode.copy.append(borrower.cardnumber) %] >
Location: _________________
Notes:
Holds waiting here:
[% FOREACH hold IN borrower.holds %]
 [% IF (hold.found == 'W' && hold.branchcode == branch.branchcode) %]
 [% hold.biblio.title %]
 [% hold.biblio.author %]
 [[% hold.item.itemcallnumber %]]
 [% reserve_date = manip.UnixDate(hold.reservedate, "%m/%d/%Y") %]
 [% expire_date = manip.UnixDate(hold.expirationdate , "%m/%d/%Y") %]
 Hold from [% reserve_date %] to [% expire_date %]
 [% END %]
[% END %]
----
=== Point of sale ===
=== Preservation ===
=== Serials (new issue) ===
=== Suggestions ===
==== ACCEPTED : Purchase Suggestion Accepted : Email ====
* Developer: Juliet Heltibridle (Rapid City Public Library)
* Status: Complete
* Uses template toolkit: True
* Koha module: Suggestions
* Code: ACCEPTED
* Name: Purchase Suggestion Accepted
* Type: Email
** HTML message: False
** Message subject Thank you for your suggestion.
* Purpose: 
** This notice is sent to the patron when their purchase suggestion is accepted.
** Added logic for only including author if it exists, and added a filter to remove the / at the end of the title.
Dear [% borrower.firstname %],
Thank you for your suggestion of "[% suggestion.title | remove('/') %]"[% IF suggestion.author %] by [% suggestion.author %][% END %]. The library has accepted your request.
You will receive a notification when the item is available for pickup.
If you have any questions, please contact us at [% branch.branchphone %].
Thank you!
[% branch.branchname %]
[% branch.branchurl %]
----
Category:Notices and slips