---
#
#  Copyright 2019 Koha Development Team
#
#  This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
# *************************************************************
#                       SAMPLE NOTICES
# *************************************************************

description:
  - "Sample notices"

tables:
  - letter:
      translatable: [ name, title, content ]
      multiline: [ content ]
      rows:
        - module: acquisition
          code: ACQ_NOTIF_ON_RECEIV
          branchcode: ""
          name: "Notification on receiving"
          is_html: 0
          title: "Order received"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - " The order <<aqorders.ordernumber>> (<<biblio.title>>) has been received."
            - ""
            - "Your library."

        - module: catalogue
          code: TICKET_ACKNOWLEDGE
          branchcode: ""
          name: "Concern acknowledgement"
          is_html: 1
          title: "Catalog concern acknowledgment"
          message_transport_type: email
          lang: default
          content:
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "Dear [%- INCLUDE 'patron-title.inc' patron => ticket.reporter -%],<br>"
            - "<br>"
            - "Thank you for your report concerning [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 0 -%].<br>"
            - "<br>"
            - "You reported: <br>"
            - "[%- ticket.body -%]<br>"
            - "<br>"
            - "Thank you"

        - module: catalogue
          code: TICKET_RESOLVE
          branchcode: ""
          name: "Concern resolved"
          is_html: 1
          title: "Catalog concern resolved"
          message_transport_type: email
          lang: default
          content:
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "Dear [%- INCLUDE 'patron-title.inc' patron => ticket_update.ticket.reporter -%],<br>"
            - "<br>"
            - "The library has now marked your concern with [%- INCLUDE 'biblio-title.inc' biblio=ticket_update.ticket.biblio link = 0 -%] as resolved.<br>"
            - "<br>"
            - "The following comment was left: <br>"
            - "[%- ticket_update.message -%]<br>"
            - "<br>"
            - "Thank you"

        - module: catalogue
          code: TICKET_UPDATE
          branchcode: ""
          name: "Concern updated"
          is_html: 1
          title: "Catalog concern updated"
          message_transport_type: email
          lang: default
          content:
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "Dear [%- INCLUDE 'patron-title.inc' patron => ticket_update.ticket.reporter -%],<br>"
            - "<br>"
            - "The library has added an update to the concern you reported against [%- INCLUDE 'biblio-title.inc' biblio=ticket_update.ticket.biblio link = 0 -%].<br>"
            - "<br>"
            - "The following comment was left: <br>"
            - "[%- ticket_update.message -%]<br>"
            - "<br>"
            - "Thank you"

        - module: catalogue
          code: TICKET_NOTIFY
          branchcode: ""
          name: "Concern notification"
          is_html: 1
          title: "Catalog concern reported"
          message_transport_type: email
          lang: default
          content:
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "[%- USE Koha -%]"
            - "Dear cataloger,<br>"
            - "[%- INCLUDE 'patron-title.inc' patron => ticket.reporter -%] reported the following concern with <a href='[%- Koha.Preference('staffClientBaseURL') -%]/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% ticket.biblio.biblionumber %]' >[%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 0 -%]</a><br>"
            - "<br>"
            - "[%- ticket.body -%]<br>"
            - "<br>"
            - "You can mark this concern as resolved from the <a href='[%- Koha.Preference('staffClientBaseURL') -%]/cgi-bin/koha/cataloguing/concerns.pl'>concern management page</a>."

        - module: circulation
          code: ACCOUNT_CREDIT
          branchcode: ""
          name: "Account payment"
          is_html: 1
          title: "Account payment"
          message_transport_type: print
          lang: default
          content:
            - "[%- USE AuthorisedValues -%]"
            - "[%- USE KohaDates -%]"
            - "[%- USE Price -%]"
            - "[%- PROCESS \"accounts.inc\" -%]"
            - "<table>"
            - "    [% IF ( LibraryName ) %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% LibraryName | html %]</h3>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF credit.library %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2>[% credit.library.branchname | html %]</h2>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% today | $KohaDates %]</h3>"
            - "      </th>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Transaction ID: </td>"
            - "      <td>[% credit.accountlines_id %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Operator ID: </td>"
            - "      <td>[% credit.manager_id %]</td>"
            - "    </tr>"
            - "    [% IF credit.payment_type %]"
            - "    <tr>"
            - "      <td>Payment type: </td>"
            - "      <td>[% AuthorisedValues.GetByCode('PAYMENT_TYPE', credit.payment_type) %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2><u>[%- PROCESS credit_type_description credit_type = credit.credit_type -%] receipt</u></h2>"
            - "      </th>"
            - "    </tr>"
            - "    [% IF ( credit.credit_type_code == 'PAYMENT' ) %]"
            - "    <tr>"
            - "      <th colspan=\"2\">"
            - "        Received with thanks from  [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br>"
            - "        Card number: [% credit.patron.cardnumber | html %]<br>"
            - "      </th>"
            - "    </tr>"
            - "    [% ELSIF ( credit.credit_type_code == 'CREDIT' ) %]"
            - "    <tr>"
            - "      <th colspan=\"2\">"
            - "        Credit added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br>"
            - "        Card number: [% credit.patron.cardnumber | html %]<br>"
            - "      </th>"
            - "    </tr>"
            - "    [% ELSIF ( credit.credit_type_code == 'WRITEOFF' ) %]"
            - "    <tr>"
            - "      <th colspan=\"2\">"
            - "        Writeoff added to account for [% credit.patron.firstname | html %] [% credit.patron.surname | html %] <br>"
            - "        Card number: [% credit.patron.cardnumber | html %]<br>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF credit.amountoutstanding + 0 != 0 %]"
            - "    <tr>"
            - "      <th>Description of credit</th>"
            - "      <th>Amount</th>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>[%- PROCESS credit_type_description credit_type = credit.credit_type -%]</td>"
            - "      <td>[% credit.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <th style=\"text-align:right;\">Total available:</th>"
            - "      <td>[% credit.amountoutstanding * -1 | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF credit.amount != credit.amountoutstanding %]"
            - "    <tr>"
            - "      <th>Description of charges</th>"
            - "      <th>Amount</th>"
            - "    </tr>"
            - "    [% FOREACH offset IN credit.credit_offsets %]"
            - "    <tr>"
            - "      <td>[% PROCESS account_type_description account=offset.debit %][% IF ( offset.debit.itemnumber ) %] - [% offset.debit.item.biblio.title %][% END %]</td>"
            - "      <td>[% offset.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% END %]"
            - "  <tfoot>"
            - "    <tr class=\"highlight\">"
            - "      <td>Total:</td>"
            - "      <td>[% credit.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    [% IF change.defined %]"
            - "    <tr>"
            - "      <td>Change given: </td>"
            - "      <td>[% change | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <td colspan=\"2\"></td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Account balance as on date:</td>"
            - "      <td>[% credit.patron.account.balance * -1 | $Price %]</td>"
            - "    </tr>"
            - "  </tfoot>"
            - "</table>"

        - module: circulation
          code: ACCOUNT_DEBIT
          branchcode: ""
          name: "Account fee"
          is_html: 1
          title: "Account fee"
          message_transport_type: print
          lang: default
          content:
            - "[% USE Price %]"
            - "[% USE KohaDates %]"
            - "[% PROCESS \"accounts.inc\" %]"
            - "<table>"
            - "    [% IF ( LibraryName ) %]"
            - "    <tr>"
            - "      <th colspan=\"3\" class=\"centerednames\">"
            - "        <h3>[% LibraryName | html %]</h3>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF debit.library %]"
            - "    <tr>"
            - "      <th colspan=\"3\" class=\"centerednames\">"
            - "        <h2>[% debit.library.branchname | html %]</h2>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <td colspan=\"2\" style=\"text-align:right;\">Fee ID: </td>"
            - "      <td>[% debit.accountlines_id %]</td>"
            - "    </tr>"
            - "    [% IF credit.manager_id %]"
            - "    <tr>"
            - "      <td colspan=\"2\" style=\"text-align:right;\">Operator ID: </td>"
            - "      <td>[% credit.manager_id %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <th colspan=\"3\" class=\"centerednames\">"
            - "        <h2><u>Invoice</u></h2>"
            - "      </th>"
            - "    </tr>"
            - "    <tr>"
            - "      <th colspan=\"3\" >"
            - "        Bill to: [% debit.patron.firstname | html %] [% debit.patron.surname | html %] <br>"
            - "        Card number: [% debit.patron.cardnumber | html %]<br>"
            - "      </th>"
            - "    </tr>"
            - "    [% IF debit.amountoutstanding != 0 %]"
            - "    <tr>"
            - "      <th>Date</th>"
            - "      <th>Description of charges</th>"
            - "      <th>Amount</th>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>[% debit.date | $KohaDates %]</td>"
            - "      <td>[% PROCESS account_type_description account=debit %]</td>"
            - "      <td>[% debit.amount | $Price %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td colspan=\"2\" style=\"text-align:right;\">Total owed:</td>"
            - "      <td>[% debit.amount | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF debit.amount != debit.amountoutstanding %]"
            - "    <tr>"
            - "      <th>Date</th>"
            - "      <th>Description of payments</th>"
            - "      <th>Amount</th>"
            - "    </tr>"
            - "    [% FOREACH offset IN debit.debit_offsets %]"
            - "    <tr>"
            - "      <td>[% offset.credit.date | $KohaDates %]</td>"
            - "      <td>[% PROCESS account_type_description account=offset.credit %]</td>"
            - "      <td>[% offset.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr class=\"highlight\">"
            - "      <td colspan=\"2\" style=\"text-align:right;\">Total paid:</td>"
            - "      <td>[% debit.amount - debit.amountoutstanding | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "    </tr>"
            - "      <td colspan=\"3\"></td>"
            - "    <tr>"
            - "  <tfoot>"
            - "    <tr>"
            - "      <th colspan=\"2\" style=\"text-align:right;\">Total outstanding:</th>"
            - "      <td>[% debit.amountoutstanding | $Price %]</td>"
            - "    </tr>"
            - "  </tfoot>"
            - "</table>"

        - module: circulation
          code: ACCOUNT_PAYMENT
          branchcode: ""
          name: "Account payment"
          is_html: 0
          title: "Account payment"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE Price -%]"
            - "A payment of [% credit.amount * -1 | $Price %] 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 %]"
            - "Amount remaining: [% o.debit.amountoutstanding | $Price %]"
            - "[% END %]"

        - module: circulation
          code: ACCOUNT_WRITEOFF
          branchcode: ""
          name: "Account writeoff"
          is_html: 0
          title: "Account writeoff"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE Price -%]"
            - "An account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account."
            - ""
            - "This writeoff affected the following fees:"
            - "[%- FOREACH o IN offsets %]"
            - "Description: [% o.debit.description %]"
            - "Amount paid: [% o.amount * -1 | $Price %]"
            - "Amount remaining: [% o.debit.amountoutstanding | $Price %]"
            - "[% END %]"

        - module: circulation
          code: AR_CANCELED
          branchcode: ""
          name: "Article request - canceled"
          is_html: 0
          title: "Article request canceled"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),"
            - ""
            - "Your request for an article from <<biblio.title>> (<<items.barcode>>) has been canceled for the following reason:"
            - ""
            - "<<reason>>"
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]"
            - ""
            - "Your library"

        - module: circulation
          code: AR_COMPLETED
          branchcode: ""
          name: "Article request - completed"
          is_html: 0
          title: "Article request completed"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),"
            - ""
            - "We have completed your request for an article from <<biblio.title>> (<<items.barcode>>)."
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]"
            - ""
            - "[% IF article_request.format == 'PHOTOCOPY' %]You may pick up your article at [% branch.branchname %].[% ELSIF article_request.format == 'SCAN' %]You can download the scanned materials via the following URL(s): [% article_request.urls %].[% END %]"
            - ""
            - "Thank you!"

        - module: circulation
          code: AR_PENDING
          branchcode: ""
          name: "Article request - pending"
          is_html: 0
          title: "Pending article request"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)"
            - ""
            - "Your request for an article from <<biblio.title>> (<<items.barcode>>) is now in pending state."
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - ""
            - ""
            - "Thank you!"

        - module: circulation
          code: AR_REQUESTED
          branchcode: ""
          name: "Article request - new"
          is_html: 0
          title: "Article request received"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)"
            - ""
            - "We have received your request for an article from <<biblio.title>> (<<items.barcode>>)."
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]"
            - ""
            - "Thank you!"

        - module: circulation
          code: AR_PROCESSING
          branchcode: ""
          name: "Article request - processing"
          is_html: 0
          title: "Article request processing"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),"
            - ""
            - "We are now processing your request for an article from <<biblio.title>> (<<items.barcode>>)."
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]"
            - ""
            - "Thank you!"

        - module: circulation
          code: AR_SLIP
          branchcode: ""
          name: "Article request - print slip"
          is_html: 0
          title: "Article request"
          message_transport_type: print
          lang: default
          content:
            - "Article request:"
            - ""
            - "<<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),"
            - ""
            - "Title: <<biblio.title>>"
            - "Barcode: <<items.barcode>>"
            - ""
            - "Article requested:"
            - "Title: <<article_requests.title>>"
            - "Author: <<article_requests.author>>"
            - "Volume: <<article_requests.volume>>"
            - "Issue: <<article_requests.issue>>"
            - "Date: <<article_requests.date>>"
            - "TOC: [% IF article_request.toc_request %]Yes[% ELSE %]No[% END %]"
            - "Pages: <<article_requests.pages>>"
            - "Chapters: <<article_requests.chapters>>"
            - "Notes: <<article_requests.patron_notes>>"
            - "Format: [% IF article_request.format == 'PHOTOCOPY' %]Copy[% ELSIF article_request.format == 'SCAN' %]Scan[% END %]"

        - module: circulation
          code: CHECKIN
          branchcode: ""
          name: "Item check-in (digest)"
          is_html: 0
          title: "Check-ins"
          message_transport_type: email
          lang: default
          content:
            - "The following items have been checked in:"
            - "----"
            - "[% biblio.title %]"
            - "----"
            - "Thank you."

        - module: circulation
          code: CHECKIN
          branchcode: ""
          name: "Item check-in (digest)"
          is_html: 0
          title: "Check-ins"
          message_transport_type: sms
          lang: default
          content:
            - "The following items have been checked in:"
            - "----"
            - "[% biblio.title %]"
            - "----"
            - "Thank you."

        - module: circulation
          code: CHECKOUT
          branchcode: ""
          name: "Item check-out (digest)"
          is_html: 0
          title: "Checkouts"
          message_transport_type: email
          lang: default
          content:
            - "The following items have been checked out:"
            - "----"
            - "[% biblio.title %]"
            - "----"
            - "Thank you for visiting [% branch.branchname %]."

        - module: circulation
          code: CHECKOUT
          branchcode: ""
          name: "Item check-out (digest)"
          is_html: 0
          title: "Checkouts"
          message_transport_type: sms
          lang: default
          content:
            - "The following items have been checked out:"
            - "----"
            - "[% biblio.title %]"
            - "----"
            - "Thank you for visiting [% branch.branchname %]."

        - module: circulation
          code: CHECKOUT_NOTE
          branchcode: ""
          name: "Checkout note on item set by patron"
          is_html: 0
          title: "Checkout note"
          message_transport_type: email
          lang: default
          content:
            - "<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>)."

        - module: circulation
          code: DUE
          branchcode: ""
          name: "Item due reminder"
          is_html: 0
          title: "Item due reminder"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item is now due:"
            - ""
            - "<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)"

        - module: circulation
          code: DUE
          branchcode: ""
          name: "Item due reminder"
          is_html: 0
          title: "Item due reminder"
          message_transport_type: sms
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item is now due:"
            - ""
            - "<<biblio.title>>"

        - module: circulation
          code: DUEDGST
          branchcode: ""
          name: "Item due reminder (digest)"
          is_html: 0
          title: "Item due reminder"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item(s) are now due:"
            - ""
            - "<<items.content>>"
            - ""
            - "Thank you."

        - module: circulation
          code: DUEDGST
          branchcode: ""
          name: "Item due reminder (digest)"
          is_html: 0
          title: "Item due reminder"
          message_transport_type: sms
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have <<count>> item(s) that are now due"
            - ""
            - "Thank you."

        - module: circulation
          code: HOLD_SLIP
          branchcode: ""
          name: "Hold slip"
          is_html: 1
          title: "Hold slip"
          message_transport_type: email
          lang: default
          content:
            - "<h5>Date: <<today>></h5>"
            - "<br>"
            - "<h3> Transfer to/Hold in <<branches.branchname>></h3>"
            - "<br>"
            - "<h3><<borrowers.surname>>, <<borrowers.firstname>></h3>"
            - "<br>"
            - "<ul>"
            - "    <li><<borrowers.cardnumber>></li>"
            - "    <li><<borrowers.phone>></li>"
            - "    <li> <<borrowers.address>><br>"
            - "         <<borrowers.address2>><br>"
            - "         <<borrowers.city>> <<borrowers.zipcode>>"
            - "    </li>"
            - "    <li><<borrowers.email>></li>"
            - "</ul>"
            - "<br>"
            - "<h3>ITEM ON HOLD</h3>"
            - "<h4><<biblio.title>></h4>"
            - "<h5><<biblio.author>></h5>"
            - "<ul>"
            - "   <li><<items.barcode>></li>"
            - "   <li><<items.itemcallnumber>></li>"
            - "   <li><<reserves.waitingdate>></li>"
            - "</ul>"
            - "<p>Notes:"
            - "<pre><<reserves.reservenotes>></pre>"
            - "</p>"

        - module: circulation
          code: ISSUEQSLIP
          branchcode: ""
          name: "Issue quick slip"
          is_html: 1
          title: "Issue quick slip"
          message_transport_type: email
          lang: default
          content:
            - "[%~ USE KohaDates ~%]"
            - "<h3><<branches.branchname>></h3>"
            - "Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br>"
            - "(<<borrowers.cardnumber>>) <br>"
            - "<br>"
            - "<<today>><br>"
            - "<br>"
            - "<h4>Checked out today</h4>"
            - "<checkedout>"
            - "<p>"
            - "<<biblio.title>> <br>"
            - "Barcode: <<items.barcode>><br>"
            - "Date due: <<issues.date_due>><br>"
            - "</p>"
            - "</checkedout>"

        - module: circulation
          code: ISSUESLIP
          branchcode: ""
          name: "Issue slip"
          is_html: 1
          title: "Issue slip"
          message_transport_type: email
          lang: default
          content:
            - "<h3><<branches.branchname>></h3>"
            - "Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br>"
            - "(<<borrowers.cardnumber>>) <br>"
            - "<br>"
            - "<<today>><br>"
            - "<br>"
            - "<h4>Checked out</h4>"
            - "<checkedout>"
            - "<p>"
            - "<<biblio.title>> <br>"
            - "Barcode: <<items.barcode>><br>"
            - "Date due: <<issues.date_due>><br>"
            - "</p>"
            - "</checkedout>"
            - "<br>"
            - "<h4>Overdues</h4>"
            - "<overdue>"
            - "<p>"
            - "<<biblio.title>> <br>"
            - "Barcode: <<items.barcode>><br>"
            - "Date due: <<issues.date_due>><br>"
            - "</p>"
            - "</overdue>"
            - "<br>"
            - "<hr>"
            - "<br>"
            - "[% IF additional_contents.count %]"
            - "<h4 style=\"text-align: center; font-style:italic;\">News</h4>"
            - "[% FOREACH content IN additional_contents %]"
            - "<div class=\"newsitem\">"
            - "<h5 style=\"margin-bottom: 1px; margin-top: 1px\"><b>[% content.title %]</b></h5>"
            - "<p style=\"margin-bottom: 1px; margin-top: 1px\">[% content.content %]</p>"
            - "<p class=\"newsfooter\" style=\"font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px\">Posted on [% content.published_on | $KohaDates %]</p>"
            - "<hr />"
            - "</div>"
            - "[% END %]"
            - "[% END %]"

        - module: circulation
          code: ODUE
          branchcode: ""
          name: "Overdue notice"
          is_html: 0
          title: "Item overdue"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "According to our current records, you have items that are overdue.Your library does not charge late fines, but please return or renew them at the branch below as soon as possible."
            - ""
            - "<<branches.branchname>>"
            - "<<branches.branchaddress1>>"
            - "<<branches.branchaddress2>> <<branches.branchaddress3>>"
            - "Phone: <<branches.branchphone>>"
            - "Fax: <<branches.branchfax>>"
            - "Email: <<branches.branchemail>>"
            - ""
            - "If you have registered a password with the library, and you have a renewal available, you may renew online. If an item becomes more than 30 days overdue, you will be unable to use your library card until the item is returned."
            - ""
            - "The following item(s) is/are currently overdue:"
            - ""
            - "<item>\"<<biblio.title>>\" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>"
            - ""
            - "Thank-you for your prompt attention to this matter."
            - ""
            - "<<branches.branchname>> Staff"
            - ""

        - module: circulation
          code: OVERDUES_SLIP
          branchcode: ""
          name: "Overdues slip"
          is_html: 0
          title: "Overdues slip"
          message_transport_type: print
          lang: default
          content:
            - "The following item(s) is/are currently overdue:"
            - ""
            - "<item>\"<<biblio.title>>\" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <<items.fine>></item>"
            - ""

        - module: circulation
          code: PREDUE
          branchcode: ""
          name: "Advance notice of item due"
          is_html: 0
          title: "Advance notice of item due"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item will be due soon:"
            - ""
            - "<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)"

        - module: circulation
          code: PREDUE
          branchcode: ""
          name: "Advance notice of item due"
          is_html: 0
          title: "Advance notice of item due"
          message_transport_type: sms
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item will be due soon:"
            - ""
            - "<<biblio.title>>"

        - module: circulation
          code: PREDUEDGST
          branchcode: ""
          name: "Advance notice of item due (digest)"
          is_html: 0
          title: "Advance notice of item due"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following item(s) will be due soon:"
            - ""
            - "<<items.content>>"
            - ""
            - "Thank you."

        - module: circulation
          code: PREDUEDGST
          branchcode: ""
          name: "Advance notice of item due (digest)"
          is_html: 0
          title: "Advance notice of item due"
          message_transport_type: sms
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have <<count>> item(s) that will be due soon."
            - ""
            - "Thank you."

        - module: circulation
          code: RENEWAL
          branchcode: ""
          name: "Item renewals"
          is_html: 0
          title: "Item renewals"
          message_transport_type: email
          lang: default
          content:
            - "The following items have been renewed:"
            - "----"
            - "<<biblio.title>>"
            - "----"
            - "Thank you for visiting <<branches.branchname>>."

        - module: circulation
          code: SR_SLIP
          branchcode: ""
          name: "Stock rotation slip"
          is_html: 0
          title: "Stock rotation report"
          message_transport_type: email
          lang: default
          content:
            - "Stock rotation report for [% branch.name %]:"
            - ""
            - "[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch."
            - "[% ELSE %]No items to be processed for this branch"
            - "[% END %][% FOREACH item IN branch.items %][% IF item.reason != 'in-demand' %]Title: [% item.title %]"
            - "Author: [% item.author %]"
            - "Call number: [% item.callnumber %]"
            - "Location: [% item.location %]"
            - "Barcode: [% item.barcode %]"
            - "On loan?: [% item.onloan %]"
            - "Status: [% item.reason %]"
            - "Current library: [% item.branch.branchname %] [% item.branch.branchcode %]"
            - ""
            - "[% END %][% END %]"

        - module: circulation
          code: TRANSFERSLIP
          branchcode: ""
          name: "Transfer slip"
          is_html: 1
          title: "Transfer slip"
          message_transport_type: email
          lang: default
          content:
            - "<h5>Date: <<today>></h5>"
            - "<br>"
            - "<h3>Transfer to <<branches.branchname>></h3>"
            - "<br>"
            - "<h3>ITEM</h3>"
            - "<h4><<biblio.title>></h4>"
            - "<h5><<biblio.author>></h5>"
            - "<ul>"
            - "   <li><<items.barcode>></li>"
            - "   <li><<items.itemcallnumber>></li>"
            - "</ul>"

        - module: claimacquisition
          code: ACQCLAIM
          branchcode: ""
          name: "Acquisition claim"
          is_html: 0
          title: "Item not received"
          message_transport_type: email
          lang: default
          content:
            - "<<aqbooksellers.name>>"
            - "<<aqbooksellers.address1>>"
            - "<<aqbooksellers.address2>>"
            - "<<aqbooksellers.address3>>"
            - "<<aqbooksellers.address4>>"
            - "<<aqbooksellers.phone>>"
            - ""
            - "<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (<<aqorders.quantity>> ordered) ($<<aqorders.listprice>> each) has not been received.</order>"

        - module: ill
          code: ILL_PICKUP_READY
          branchcode: ""
          name: "ILL request ready for pickup"
          is_html: 0
          title: "Interlibrary loan request ready for pickup"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for:"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "is ready for pick up from [% branch.branchname %]."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_UNAVAIL
          branchcode: ""
          name: "ILL request unavailable"
          is_html: 0
          title: "Interlibrary loan request unavailable"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "is unfortunately unavailable."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_CANCEL
          branchcode: ""
          name: "ILL request cancelled"
          is_html: 0
          title: "Interlibrary loan request cancelled"
          message_transport_type: email
          lang: default
          content:
            - "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:"
            - ""
            - "[% ill_full_metadata %]"

        - module: ill
          code: ILL_REQUEST_MODIFIED
          branchcode: ""
          name: "ILL request modified"
          is_html: 0
          title: "Interlibrary loan request modified"
          message_transport_type: email
          lang: default
          content:
            - "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:"
            - ""
            - "[% ill_full_metadata %]"

        - module: ill
          code: ILL_PARTNER_REQ
          branchcode: ""
          name: "ILL request to partners"
          is_html: 0
          title: "Interlibrary loan request to partners"
          message_transport_type: email
          lang: default
          content:
            - "Dear Sir/Madam,"
            - ""
            - "We would like to request an interlibrary loan for a title matching the following description:"
            - ""
            - "[% ill_full_metadata %]"
            - ""
            - "Please let us know if you are able to supply this to us."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_UPDATE
          branchcode: ""
          name: "ILL request update"
          is_html: 0
          title: "Interlibrary loan request update"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "has been updated."
            - ""
            - "Details of the update are below:"
            - ""
            - "[% additional_text %]"
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_PICKUP_READY
          branchcode: ""
          name: "ILL request ready for pickup"
          is_html: 0
          title: "Interlibrary loan request ready for pickup"
          message_transport_type: sms
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for:"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "is ready for pick up from [% branch.branchname %]."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_UNAVAIL
          branchcode: ""
          name: "ILL request unavailable"
          is_html: 0
          title: "Interlibrary loan request unavailable"
          message_transport_type: sms
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "is unfortunately unavailable."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_CANCEL
          branchcode: ""
          name: "ILL request cancelled"
          is_html: 0
          title: "Interlibrary loan request cancelled"
          message_transport_type: sms
          lang: default
          content:
            - "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has requested cancellation of this ILL request:"
            - ""
            - "[% ill_full_metadata %]"

        - module: ill
          code: ILL_REQUEST_MODIFIED
          branchcode: ""
          name: "ILL request modified"
          is_html: 0
          title: "Interlibrary loan request modified"
          message_transport_type: sms
          lang: default
          content:
            - "The patron for interlibrary loans request [% illrequest.illrequest_id %], with the following details, has modified this ILL request:"
            - ""
            - "[% ill_full_metadata %]"

        - module: ill
          code: ILL_PARTNER_REQ
          branchcode: ""
          name: "ILL request to partners"
          is_html: 0
          title: "Interlibrary loan request to partners"
          message_transport_type: sms
          lang: default
          content:
            - "Dear Sir/Madam,"
            - ""
            - "We would like to request an interlibrary loan for a title matching the following description:"
            - ""
            - "[% ill_full_metadata %]"
            - ""
            - "Please let us know if you are able to supply this to us."
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: ill
          code: ILL_REQUEST_UPDATE
          branchcode: ""
          name: "ILL request update"
          is_html: 0
          title: "Interlibrary loan request update"
          message_transport_type: sms
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "The Interlibrary loans request number [% illrequest.illrequest_id %] you placed for"
            - ""
            - "- [% ill_bib_title %] - [% ill_bib_author %]"
            - ""
            - "has been updated."
            - ""
            - "Details of the update are below:"
            - ""
            - "[% additional_text %]"
            - ""
            - "Kind regards"
            - ""
            - "[% branch.branchname %]"
            - "[% branch.branchaddress1 %]"
            - "[% branch.branchaddress2 %]"
            - "[% branch.branchaddress3 %]"
            - "[% branch.branchcity %]"
            - "[% branch.branchstate %]"
            - "[% branch.branchzip %]"
            - "[% branch.branchphone %]"
            - "[% branch.branchillemail %]"
            - "[% branch.branchemail %]"

        - module: members
          code: DISCHARGE
          branchcode: ""
          name: "Discharge confirmation"
          is_html: 1
          title: "Discharge for <<borrowers.firstname>> <<borrowers.surname>>"
          message_transport_type: email
          lang: default
          content:
            - ""
            - "<<today>>"
            - "<h1>Discharge confirmation</h1>"
            - "<p><<branches.branchname>> certifies that the following borrower:<br>"
            - "<<borrowers.firstname>> <<borrowers.surname>> (cardnumber: <<borrowers.cardnumber>>)<br>"
            - "has returned all items.</p>"

        - module: members
          code: MEMBERSHIP_EXPIRY
          branchcode: ""
          name: "Account expiration"
          is_html: 0
          title: "Account expiration"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "Your library card will expire soon, on:"
            - ""
            - "<<borrowers.dateexpiry>>"
            - ""
            - "Thank you,"
            - ""
            - "Librarian"
            - ""
            - "<<branches.branchname>>"

        - module: members
          code: MEMBERSHIP_RENEWED
          branchcode: ""
          name: "Account renewal"
          is_html: 0
          title: "Account renewal"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE Price -%]"
            - "Dear [% borrower.title %] [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "Your library account has been renewed. The new expiry date is: [% borrower.dateexpiry %]."
            - "[% IF borrower.category.enrolmentfee > 0 %]\nAn enrollment fee of [% borrower.category.enrolmentfee | $Price with_symbol => 1 %] has been applied.\n[% END %]"
            - "Thank you,"
            - ""
            - "Your library,"
            - ""
            - "[% branch.branchname %]"

        - module: members
          code: OPAC_REG_VERIFY
          branchcode: ""
          name: "OPAC self-registration verification email"
          is_html: 0
          title: "Verify your account"
          message_transport_type: email
          lang: default
          content:
            - "Hello!"
            - ""
            - "Your library account has been created. Please verify your email address by clicking this link to complete the signup process:"
            - ""
            - "<<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>"
            - ""
            - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly."

        - module: members
          code: PASSWORD_CHANGE
          branchcode: ""
          name: "Notification of password change"
          is_html: 0
          title: "Library account password change notification"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "We want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff."
            - ""
            - "Your library."

        - module: members
          code: PASSWORD_RESET
          branchcode: ""
          name: "Online password reset"
          is_html: 1
          title: "Koha password recovery"
          message_transport_type: email
          lang: default
          content:
            - "<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>."
            - "</p>"
            - "<p>"
            - "You can now create your new password using the following link:"
            - "<br><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>"
            - "</p>"
            - "<p>This link will be valid for 2 days from this email's reception, then you must reapply if you do not change your password.</p>"
            - "<p>Thank you.</p>"

        - module: members
          code: STAFF_PASSWORD_RESET
          branchcode: ""
          name: "Online password reset"
          is_html: 1
          title: "Koha password reset"
          message_transport_type: email
          lang: default
          content:
            - "<p>A librarian has reset the password for the account <strong><<user>></strong>."
            - "</p>"
            - "<p>"
            - "Please create your new password using the following link:"
            - "<br><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>"
            - "</p>"
            - "<p>This link will be valid for 5 days from this email's reception, then you must reapply if you do not change your password.</p>"
            - "<p>Thank you.</p>"

        - module: members
          code: SHARE_ACCEPT
          branchcode: ""
          name: "Notification about an accepted share"
          is_html: 0
          title: "Share on list <<listname>> accepted"
          message_transport_type: email
          lang: default
          content:
            - "Dear patron,"
            - ""
            - "We want to inform you that <<borrowers.firstname>> <<borrowers.surname>> accepted your invitation to share your list <<listname>> in our library catalog."
            - ""
            - "Thank you."
            - ""
            - "Your library."

        - module: members
          code: SHARE_INVITE
          branchcode: ""
          name: "Invitation for sharing a list"
          is_html: 0
          title: "Share list <<listname>>"
          message_transport_type: email
          lang: default
          content:
            - "Dear patron,"
            - ""
            - "One of our patrons, <<borrowers.firstname>> <<borrowers.surname>>, invites you to share a list <<listname>> in our library catalog."
            - ""
            - "To access this shared list, please click on the following URL or copy-and-paste it into your browser address bar."
            - ""
            - "<<shareurl>>"
            - ""
            - "In case you are not a patron in our library or do not want to accept this invitation, please ignore this mail. Note also that this invitation expires within two weeks."
            - ""
            - "Thank you."
            - ""
            - "Your library."

        - module: members
          code: WELCOME
          branchcode: ""
          name: "Welcome notice "
          is_html: 1
          title: "[% USE Koha %][% IF Koha.Preference('LibraryName') %]Welcome to [% Koha.Preference('LibraryName') %][% ELSE %]Welcome to the library[% END %]"
          message_transport_type: email
          lang: default
          content:
            - "[% USE Koha %]"
            - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].<br>"
            - "<br>"
            - "Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]<br>"
            - "<br>"
            - "You can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>.<br>"
            - "<br>"
            - "Your library card number is [% borrower.cardnumber %]<br>"
            - "<br>"
            - "If you have any problems or questions regarding your account, please contact the library."

        - module: members
          code: 2FA_OTP_TOKEN
          branchcode: ""
          name: "two-authentication step token"
          is_html: 0
          title: "Two-authentication token"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])"
            - ""
            - "Your authentication token is [% otp_token %]."
            - "It is valid one minute."

        - module: members
          code: ACCOUNTS_SUMMARY
          branchcode: ""
          name: "Account balance slip"
          is_html: 1
          title: "Account summary for [% borrower.firstname %] [% borrower.surname %]"
          message_transport_type: print
          lang: default
          content:
            - "[% USE Branches %]"
            - "[% USE Koha %]"
            - "[% USE KohaDates %]"
            - "[% USE Price %]"
            - "[% PROCESS 'accounts.inc' %]"
            - "<table>"
            - "  [% IF ( Koha.Preference('LibraryName') ) %]"
            - "    <tr>"
            - "      <th colspan='4' class='centerednames'>"
            - "        <h1>[% Koha.Preference('LibraryName') | html %]</h1>"
            - "      </th>"
            - "    </tr>"
            - "  [% END %]"
            - ""
            - "  <tr>"
            - "    <th colspan='4' class='centerednames'>"
            - "      <h2>[% Branches.GetName( borrower.branchcode ) | html %]</h2>"
            - "    </th>"
            - "  </tr>"
            - ""
            - "  <tr>"
            - "    <th colspan='4' class='centerednames'>"
            - "      <h3>Outstanding accounts</h3>"
            - "    </th>"
            - "  </tr>"
            - ""
            - "  <tr>"
            - "    <th colspan='4' class='centerednames'>"
            - "      <h4>Debts</h4>"
            - "    </th>"
            - "  </tr>"
            - "  [% IF borrower.account.outstanding_debits.total_outstanding %]"
            - "  <tr>"
            - "    <th>Date</th>"
            - "    <th>Charge</th>"
            - "    <th>Amount</th>"
            - "    <th>Outstanding</th>"
            - "  </tr>"
            - "  [% FOREACH debit IN borrower.account.outstanding_debits %]"
            - "  <tr>"
            - "    <td>[% debit.date | $KohaDates %]</td>"
            - "    <td>"
            - "      [% PROCESS account_type_description account=debit %]"
            - "      [%- IF debit.description %], [% debit.description | html %][% END %]"
            - "    </td>"
            - "    <td class='debit'>[% debit.amount | $Price %]</td>"
            - "    <td class='debit'>[% debit.amountoutstanding | $Price %]</td>"
            - "  </tr>"
            - "  [% END %]"
            - "  [% ELSE %]"
            - "  <tr>"
            - "    <td colspan='4'>There are no outstanding debts on your account</td>"
            - "  </tr>"
            - "  [% END %]"
            - ""
            - "  <tr>"
            - "    <th colspan='4' class='centerednames'>"
            - "      <h4>Credits</h4>"
            - "    </th>"
            - "  </tr>"
            - "  [% IF borrower.account.outstanding_credits.total_outstanding %]"
            - "  <tr>"
            - "    <th>Date</th>"
            - "    <th>Credit</th>"
            - "    <th>Amount</th>"
            - "    <th>Outstanding</th>"
            - "  </tr>"
            - "  [% FOREACH credit IN borrower.account.outstanding_credits %]"
            - "  <tr>"
            - "    <td>[% credit.date | $KohaDates%]</td>"
            - "    <td>"
            - "      [% PROCESS account_type_description account=credit %]"
            - "      [%- IF credit.description %], [% credit.description | html %][% END %]"
            - "    </td>"
            - "    <td class='credit'>[% credit.amount *-1 | $Price %]</td>"
            - "    <td class='credit'>[% credit.amountoutstanding *-1 | $Price %]</td>"
            - "  </tr>"
            - "  [% END %]"
            - "  [% ELSE %]"
            - "  <tr>"
            - "    <td colspan='4'>There are no outstanding credits on your account</td>"
            - "  </tr>"
            - "  [% END %]"
            - ""
            - "  <tfoot>"
            - "    <td colspan='3'>"
            - "      [% IF borrower.account.balance < 0 %]"
            - "        Total credit as of [% today | $KohaDates %]:"
            - "      [% ELSE %]"
            - "        Total outstanding dues as of [% today | $KohaDates %]:"
            - "      [% END %]"
            - "    </td>"
            - "    [% IF ( borrower.account.balance <= 0 ) %]<td class='credit'>[% borrower.account.balance * -1 | $Price %]</td>"
            - "    [% ELSE %]<td class='debit'>[% borrower.account.balance | $Price %]</td>[% END %]"
            - "  </tfoot>"
            - "</table>"

        - module: orderacquisition
          code: ACQORDER
          branchcode: ""
          name: "Acquisition order"
          is_html: 0
          title: "Order"
          message_transport_type: email
          lang: default
          content:
            - "<<aqbooksellers.name>>"
            - "<<aqbooksellers.address1>>"
            - "<<aqbooksellers.address2>>"
            - "<<aqbooksellers.address3>>"
            - "<<aqbooksellers.address4>>"
            - "<<aqbooksellers.phone>>"
            - ""
            - "Please order for the library:"
            - ""
            - "<order>Ordernumber <<aqorders.ordernumber>> (<<biblio.title>>) (quantity: <<aqorders.quantity>>) ($<<aqorders.listprice>> each).</order>"
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: pos
          code: RECEIPT
          branchcode: ""
          name: "Point of sale receipt"
          is_html: 1
          title: "Receipt"
          message_transport_type: print
          lang: default
          content:
            - "[% USE KohaDates %]"
            - "[% USE Branches %]"
            - "[% USE Price %]"
            - "[% PROCESS \"accounts.inc\" %]"
            - "<table>"
            - "[% IF ( LibraryName ) %]"
            - " <tr>"
            - "    <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% LibraryName | html %]</h3>"
            - "    </th>"
            - " </tr>"
            - "[% END %]"
            - " <tr>"
            - "    <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>"
            - "    </th>"
            - " </tr>"
            - "<tr>"
            - "    <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% credit.date | $KohaDates %]</h3>"
            - "</tr>"
            - "<tr>"
            - "  <td>Transaction ID: </td>"
            - "  <td>[% credit.accountlines_id %]</td>"
            - "</tr>"
            - "<tr>"
            - "  <td>Operator ID: </td>"
            - "  <td>[% credit.manager_id %]</td>"
            - "</tr>"
            - "<tr>"
            - "  <td>Payment type: </td>"
            - "  <td>[% credit.payment_type %]</td>"
            - "</tr>"
            - " <tr></tr>"
            - " <tr>"
            - "    <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2><u>Fee receipt</u></h2>"
            - "    </th>"
            - " </tr>"
            - " <tr></tr>"
            - " <tr>"
            - "    <th>Description of charges</th>"
            - "    <th>Amount</th>"
            - "  </tr>"
            - ""
            - "  [% FOREACH debit IN credit.debits %]"
            - "    <tr>"
            - "        <td>[% PROCESS account_type_description account=debit %]</td>"
            - "        <td>[% debit.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "  [% END %]"
            - ""
            - "<tfoot>"
            - "  <tr class=\"highlight\">"
            - "    <td>Total: </td>"
            - "    <td>[% credit.amount * -1| $Price %]</td>"
            - "  </tr>"
            - "  <tr>"
            - "    <td>Tendered: </td>"
            - "    <td>[% collected | $Price %]</td>"
            - "  </tr>"
            - "  <tr>"
            - "    <td>Change: </td>"
            - "    <td>[% change | $Price %]</td>"
            - "    </tr>"
            - "</tfoot>"
            - "</table>"

        - module: pos
          code: RECEIPT
          branchcode: ""
          name: "Point of sale receipt"
          is_html: 1
          title: "Receipt"
          message_transport_type: email
          lang: default
          content:
            - "[% USE KohaDates %]"
            - "[% USE Branches %]"
            - "[% USE Price %]"
            - "[% PROCESS \"accounts.inc\" %]"
            - "<table>"
            - "    [% IF ( LibraryName ) %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% LibraryName | html %]</h3>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    [% IF credit.library %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2>[% payment.library.branchname | html %]</h2>"
            - "      </th>"
            - "    </tr>"
            - "    [% END %]"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h3>[% payment.date | $KohaDates %]</h3>"
            - "      </th>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Transaction ID: </td>"
            - "      <td>[% payment.accountlines_id %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Operator ID: </td>"
            - "      <td>[% payment.manager_id %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Payment type: </td>"
            - "      <td>[% payment.payment_type %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <th colspan=\"2\" class=\"centerednames\">"
            - "        <h2><u>Payment receipt</u></h2>"
            - "      </th>"
            - "    </tr>"
            - "    <tr>"
            - "      <th>Description of charges</th>"
            - "      <th>Amount</th>"
            - "    </tr>"
            - "    [% FOREACH offset IN payment.credit_offsets %]"
            - "    <tr>"
            - "        <td>[% PROCESS account_type_description account=debit %]</td>"
            - "        <td>[% debit.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    [% END %]"
            - "  <tfoot>"
            - "    <tr class=\"highlight\">"
            - "      <td>Total:</td>"
            - "      <td>[% payment.amount * -1 | $Price %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Tendered: </td>"
            - "      <td>[% collected | $Price %]</td>"
            - "    </tr>"
            - "    <tr>"
            - "      <td>Change given:</td>"
            - "      <td>[% change | $Price %]</td>"
            - "    </tr>"
            - "  </tfoot>"
            - "</table>"

        - module: reserves
          code: CANCEL_HOLD_ON_LOST
          branchcode: ""
          name: "Hold has been cancelled"
          is_html: 0
          title: "Hold has been cancelled"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "We regret to inform you, that the following item can not be provided due to it being missing. Your hold was cancelled."
            - ""
            - "Title: [% biblio.title %]"
            - "Author: [% biblio.author %]"
            - "Copy: [% item.copynumber %]"
            - "Location: [% branch.branchname %]"

        - module: reserves
          code: HOLD
          branchcode: ""
          name: "Hold available for pickup"
          is_html: 0
          title: "Hold available for pickup at <<branches.branchname>>"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have a hold available for pickup as of <<reserves.waitingdate>>:"
            - ""
            - "Title: <<biblio.title>>"
            - "Author: <<biblio.author>>"
            - "Copy: <<items.copynumber>>"
            - "Location: <<branches.branchname>>"
            - "<<branches.branchaddress1>>"
            - "<<branches.branchaddress2>>"
            - "<<branches.branchaddress3>>"
            - "<<branches.branchcity>> <<branches.branchzip>>"

        - module: reserves
          code: HOLDDGST
          branchcode: ""
          name: "Hold(s) available for pickup"
          is_html: 0
          title: "Hold(s) available for pickup"
          message_transport_type: email
          lang: default
          content:
            - "You have one or more holds available for pickup:"
            - "----"
            - "Title: [% hold.biblio.title %]"
            - "Author: [% hold.biblio.author %]"
            - "Copy: [% hold.item.copynumber %]"
            - "Waiting since: [% hold.waitingdate %]"
            - "Waiting at: [% hold.branch.branchname %]"
            - "[% hold.branch.branchaddress1 %]"
            - "[% hold.branch.branchaddress2 %]"
            - "[% hold.branch.branchaddress3 %]"
            - "[% hold.branch.branchcity %] [% hold.branch.branchzip %]"
            - "----"
            - "Thank you!"

        - module: reserves
          code: HOLDDGST
          branchcode: ""
          name: "Hold(s) available for pickup"
          is_html: 0
          title: "Hold(s) available for pickup"
          message_transport_type: sms
          lang: default
          content:
            - "You have one or more holds available for pickup:"
            - ""
            - "----"
            - "Title: [% hold.biblio.title %]"
            - "----"

        - module: reserves
          code: HOLD
          branchcode: ""
          name: "Hold available for pickup"
          is_html: 0
          title: "Hold available for pickup at <<branches.branchname>>"
          message_transport_type: sms
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "Your hold for <<biblio.title>> is available for pickup."

        - module: reserves
          code: HOLD
          branchcode: ""
          name: "Hold available for pickup"
          is_html: 0
          title: "Hold available for pickup (print notice)"
          message_transport_type: print
          lang: default
          content:
            - "<<branches.branchname>>"
            - "<<branches.branchaddress1>>"
            - "<<branches.branchaddress2>>"
            - ""
            - ""
            - "Change service requested"
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - "<<borrowers.firstname>> <<borrowers.surname>>"
            - "<<borrowers.address>>"
            - "<<borrowers.city>> <<borrowers.zipcode>>"
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - ""
            - "<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>"
            - ""
            - "You have a hold available for pickup as of <<reserves.waitingdate>>:"
            - ""
            - "Title: <<biblio.title>>"
            - "Author: <<biblio.author>>"
            - "Copy: <<items.copynumber>>"
            - ""

        - module: reserves
          code: HOLDPLACED
          branchcode: ""
          name: "Hold placed on item"
          is_html: 0
          title: "Hold placed on item"
          message_transport_type: email
          lang: default
          content:
            - "A hold has been placed on the following item : <<biblio.title>> (<<biblio.biblionumber>>) by the user <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)."

        - module: reserves
          code: HOLD_CHANGED
          branchcode: ""
          name: "Canceled hold available for different patron"
          is_html: 0
          title: "Canceled hold available for different patron"
          message_transport_type: email
          lang: default
          content:
            - "The patron picking up <<biblio.title>> (<<items.barcode>>) has changed to <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)."
            - "Please update the hold information for this item."
            - "Title: <<biblio.title>>"
            - "Author: <<biblio.author>>"
            - "Item: <<items.itemcallnumber>>"
            - "Pickup location: <<branches.branchname>>"

        - module: reserves
          code: HOLD_REMINDER
          branchcode: ""
          name: "Waiting hold reminder"
          is_html: 0
          title: "You have waiting holds."
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe following holds are waiting at [% branch.branchname %]:\n\n[% FOREACH hold IN holds %]\n    [% hold.biblio.title %] : waiting since [% hold.waitingdate | $KohaDates %]\n[% END %]"

        - module: reserves
          code: NEW_CURBSIDE_PICKUP
          branchcode: ""
          name: "New curbside pickup"
          is_html: 0
          title: "You have scheduled a curbside pickup for [% branch.branchname %]"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE KohaDates -%]"
            - "[%- SET cp = curbside_pickup -%]"
            - ""
            - "You have a curbside pickup scheduled for [% cp.scheduled_pickup_datetime | $KohaDates with_hours => 1 %] at [% cp.library.branchname %]."
            - "Any holds waiting for you at the pickup time will be included in this pickup. At this time, that list includes:\n[%- FOREACH h IN cp.patron.holds %]\n[%- IF h.branchcode == cp.branchcode && h.found == 'W' %]\n* [% h.biblio.title %], [% h.biblio.author %] ([% h.item.barcode %])\n[%- END %]\n[%- END %]"
            - ""
            - "Once you have arrived, please call your library or log into your account and click the \"Alert staff of your arrival\" button to let them know you are there."

        - module: serial
          code: SERIAL_ALERT
          branchcode: ""
          name: "New serial issue"
          is_html: 0
          title: "New serial issue is now available"
          message_transport_type: email
          lang: default
          content:
            - "<<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "The following issue is now available:"
            - ""
            - "<<biblio.title>>, <<biblio.author>> (<<items.barcode>>)"
            - ""
            - "Please pick it up at your convenience."

        - module: suggestions
          code: ACCEPTED
          branchcode: ""
          name: "Suggestion accepted"
          is_html: 0
          title: "Purchase suggestion accepted"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>."
            - ""
            - "The library has reviewed your suggestion today. The item will be ordered as soon as possible. You will be notified by mail when the order is completed, and again when the item arrives at the library."
            - ""
            - "If you have any questions, please email us at <<branches.branchemail>>."
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: suggestions
          code: AVAILABLE
          branchcode: ""
          name: "Suggestion available"
          is_html: 0
          title: "Suggested purchase available"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>."
            - ""
            - "We are pleased to inform you that the item you requested is now part of the collection."
            - ""
            - "If you have any questions, please email us at <<branches.branchemail>>."
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: suggestions
          code: NEW_SUGGESTION
          branchcode: ""
          name: "New suggestion"
          is_html: 1
          title: "New suggestion"
          message_transport_type: email
          lang: default
          content:
            - "<h3>Suggestion pending approval</h3>"
            - "    <p><h4>Suggested by</h4>"
            - "    <ul>"
            - "    <li><<borrowers.firstname>> <<borrowers.surname>></li>"
            - "    <li><<borrowers.cardnumber>></li>"
            - "    <li><<borrowers.phone>></li>"
            - "    <li><<borrowers.email>></li>"
            - "    </ul>"
            - "    </p>"
            - "    <p><h4>Title suggested</h4>"
            - "    <ul>"
            - "    <li><b>Library:</b> <<branches.branchname>></li>"
            - "    <li><b>Title:</b> <<suggestions.title>></li>"
            - "    <li><b>Author:</b> <<suggestions.author>></li>"
            - "    <li><b>Copyright date:</b> <<suggestions.copyrightdate>></li>"
            - "    <li><b>Standard number (ISBN, ISSN or other):</b> <<suggestions.isbn>></li>"
            - "    <li><b>Publisher:</b> <<suggestions.publishercode>></li>"
            - "    <li><b>Collection title:</b> <<suggestions.collectiontitle>></li>"
            - "    <li><b>Publication place:</b> <<suggestions.place>></li>"
            - "    <li><b>Quantity:</b> <<suggestions.quantity>></li>"
            - "    <li><b>Item type:</b>  <<suggestions.itemtype>></li>"
            - "    <li><b>Reason for suggestion:</b> <<suggestions.patronreason>></li>"
            - "    <li><b>Notes:</b> <<suggestions.note>></li>"
            - "    </ul>"
            - "    </p>"

        - module: suggestions
          code: ORDERED
          branchcode: ""
          name: "Suggestion ordered"
          is_html: 0
          title: "Suggested item ordered"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>."
            - ""
            - "We are pleased to inform you that the item you requested has now been ordered. It should arrive soon, at which time it will be processed for addition into the collection."
            - ""
            - "You will be notified again when the book is available."
            - ""
            - "If you have any questions, please email us at <<branches.branchemail>>"
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: suggestions
          code: REJECTED
          branchcode: ""
          name: "Suggestion rejected"
          is_html: 0
          title: "Purchase suggestion declined"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "You have suggested that the library acquire <<suggestions.title>> by <<suggestions.author>>."
            - ""
            - "The library has reviewed your request today, and has decided not to accept the suggestion at this time."
            - ""
            - "The reason given is: <<suggestions.reason>>"
            - ""
            - "If you have any questions, please email us at <<branches.branchemail>>."
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: suggestions
          code: TO_PROCESS
          branchcode: ""
          name: "Notify fund owner"
          is_html: 0
          title: "A suggestion is ready to be processed"
          message_transport_type: email
          lang: default
          content:
            - "Dear <<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "A new suggestion is ready to be processed: <<suggestions.title>> by <<suggestions.author>>."
            - ""
            - "Thank you,"
            - ""
            - "<<branches.branchname>>"

        - module: suggestions
          code: NOTIFY_MANAGER
          branchcode: ""
          name: "Notify manager of a suggestion"
          is_html: 0
          title: "A suggestion has been assigned to you"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - ""
            - "A new suggestion has been assigned to you: [% suggestion.title %]."
            - ""
            - "Thank you,"
            - ""
            - "[% branch.branchname %]"

        - module: members
          code: PROBLEM_REPORT
          branchcode: ""
          name: "OPAC problem report"
          is_html: 0
          title: "OPAC problem report"
          message_transport_type: email
          lang: default
          content:
            - "Username: <<problem_reports.username>>"
            - ""
            - "Problem page: <<problem_reports.problempage>>"
            - ""
            - "Title: <<problem_reports.title>>"
            - ""
            - "Message: <<problem_reports.content>>"

        - module: circulation
          code: AUTO_RENEWALS
          branchcode: ""
          name: "Notification of automatic renewal"
          is_html: 0
          title: "Automatic renewal notice"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - "[% IF checkout.auto_renew_error == 'auto_renew_final' %]"
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
            - "This item has reached the maximum number of automatic renewals and will no longer be renewed."
            - "[% ELSIF checkout.auto_renew_error == 'auto_unseen_final' %]"
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
            - "This item has reached the maximum number of unseen renewals and will need to be renewed at the library."
            - "[% ELSIF checkout.auto_renew_error %]"
            - "The following item, [% biblio.title %], has not been renewed because:"
            - "[% IF checkout.auto_renew_error == 'too_many' %]"
            - "You have reached the maximum number of renewals possible."
            - "[% ELSIF checkout.auto_renew_error == 'on_reserve' %]"
            - "This item is on hold for another patron."
            - "[% ELSIF checkout.auto_renew_error == 'restriction' %]"
            - "You are currently restricted."
            - "[% ELSIF checkout.auto_renew_error == 'overdue' %]"
            - "You have overdue items."
            - "[% ELSIF checkout.auto_renew_error == 'auto_too_late' %]"
            - "It's too late to renew this item."
            - "[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]"
            - "Your total unpaid fines are too high."
            - "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]"
            - "This item must be renewed at the library."
            - "[% ELSIF checkout.auto_renew_error == 'auto_account_expired' %]"
            - "Your account has expired."
            - "[% END %]"
            - "[% ELSE %]"
            - "The following item, [% biblio.title %], has correctly been renewed and is now due on [% checkout.date_due | $KohaDates as_due_date => 1 %]"
            - "[% END %]"

        - module: circulation
          code: CHECKINSLIP
          branchcode: ""
          name: "Checkin slip"
          is_html: 1
          title: "Checkin slip"
          message_transport_type: print
          lang: default
          content:
            - "<h3>[% branch.branchname %]</h3>"
            - "Checked in items for [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br>"
            - "([% borrower.cardnumber %]) <br>"
            - "<br>"
            - "[% today | $KohaDates %]<br>"
            - "<br>"
            - "<h4>Checked in today</h4>"
            - "[% FOREACH checkin IN old_checkouts %]"
            - "[% SET item = checkin.item %]"
            - "<p>"
            - "[% item.biblio.title %] <br>"
            - "Barcode: [% item.barcode %] <br>"
            - "</p>"
            - "[% END %]"

        - module: circulation
          code: OVERDUE_FINE_DESC
          branchcode: ""
          name: "Overdue item fine description"
          is_html: 0
          title: "Overdue item fine description"
          message_transport_type: print
          lang: default
          content:
            - "[% item.biblio.title %] [% checkout.date_due | $KohaDates %]"

        - module: circulation
          code: AUTO_RENEWALS_DGST
          branchcode: ""
          name: "Notification on auto renewals"
          is_html: 0
          title: "Auto renewals (Digest)"
          message_transport_type: email
          lang: default
          content:
            - "Dear [% borrower.firstname %] [% borrower.surname %],"
            - "[% IF error %]"
            - "There were [% error %] items that were not renewed."
            - "[% END %]"
            - "[% IF success %]"
            - "There were [% success %] items that were renewed."
            - "[% END %]"
            - "[% FOREACH checkout IN checkouts %]"
            - "[% NEXT IF (checkout.auto_renew_error == 'auto_too_soon') %]"
            - "[% checkout.item.biblio.title %] : [% checkout.item.barcode %]"
            - "[% IF !checkout.auto_renew_error %]"
            - "was renewed until [% checkout.date_due | $KohaDates as_due_date => 1%]"
            - "[% ELSIF checkout.auto_renew_error == 'too_many' %]"
            - "You have reached the maximum number of renewals possible."
            - "[% ELSIF checkout.auto_renew_error == 'on_reserve' %]"
            - "This item is on hold for another patron."
            - "[% ELSIF checkout.auto_renew_error == 'restriction' %]"
            - "You are currently restricted."
            - "[% ELSIF checkout.auto_renew_error == 'overdue' %]"
            - "You have overdue items."
            - "[% ELSIF checkout.auto_renew_error == 'auto_too_late' %]"
            - "It's too late to renew this item."
            - "[% ELSIF checkout.auto_renew_error == 'auto_too_much_oweing' %]"
            - "Your total unpaid fines are too high."
            - "[% ELSIF checkout.auto_renew_error == 'too_unseen' %]"
            - "This item must be renewed at the library."
            - "[% ELSIF checkout.auto_renew_error == 'auto_renew_final' %]"
            - "was renewed until [% checkout.date_due | $KohaDates as_due_date => 1%]"
            - "This item has reached the maximum number of automatic renewals and will no longer be renewed."
            - "[% ELSIF checkout.auto_renew_error == 'auto_unseen_final' %]"
            - "was renewed until [% checkout.date_due | $KohaDates as_due_date => 1%]"
            - "This item has reached the maximum number of unseen renewals and will need to be renewed at the library."
            - "[% END %]"
            - "[% END %]"

        - module: circulation
          code: RETURN_RECALLED_ITEM
          branchcode: ""
          name: "Notification to return a recalled item"
          is_html: 0
          title: "Notification to return a recalled item"
          message_transport_type: email
          lang: default
          content:
            - "Date: <<today>>"
            - ""
            - "<<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "A recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date."
            - ""
            - "Thank you!"

        - module: circulation
          code: PICKUP_RECALLED_ITEM
          branchcode: ""
          name: "Recalled item awaiting pickup"
          is_html: 0
          title: "Recalled item awaiting pickup"
          message_transport_type: email
          lang: default
          content:
            - "Date: <<today>>"
            - ""
            - "<<borrowers.firstname>> <<borrowers.surname>>,"
            - ""
            - "A recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.pickup_library_id>>. Please pick up your item by <<recalls.expiration_date>>."
            - ""
            - "Thank you!"

        - module: circulation
          code: RECALL_REQUESTER_DET
          branchcode: ""
          name: "Details of patron who recalled item"
          is_html: 0
          title: "Details of patron who recalled item"
          message_transport_type: print
          lang: default
          content:
            - "Date: <<today>>"
            - ""
            - "Recall for pickup at <<branches.branchname>>"
            - "<<borrowers.surname>>, <<borrowers.firstname>> (<<borrowers.cardnumber>>)"
            - "<<borrowers.phone>>"
            - "<<borrowers.streetnumber>> <<borrowers.address>>, <<borrowers.address2>>, <<borrowers.city>> <<borrowers.zipcode>>"
            - "<<borrowers.email>>"
            - ""
            - "ITEM RECALLED"
            - "<<biblio.title>> by <<biblio.author>>"
            - "Barcode: <<items.barcode>>"
            - "Callnumber: <<items.itemcallnumber>>"
            - "Waiting since: <<recalls.waiting_date>>"
            - "Notes: <<recalls.notes>>"

        - module: members
          code: 2FA_DISABLE
          branchcode: ""
          name: "Confirmation of disabling two factor authentication"
          is_html: 1
          title: "Confirmation of disabling two factor authentication"
          message_transport_type: email
          lang: default
          content:
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
            - "<p>This is to confirm that someone disabled two factor authentication on your account.</p>"
            - "<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>"
            - "<p>Your library</p>"

        - module: members
          code: 2FA_ENABLE
          branchcode: ""
          name: "Confirmation of enabling two factor authentication"
          is_html: 1
          title: "Confirmation of enabling two factor authentication"
          message_transport_type: email
          lang: default
          content:
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
            - "<p>This is to confirm that someone enabled two factor authentication on your account.</p>"
            - "<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>"
            - "<p>Your library</p>"

        - module: members
          code: OPAC_REG
          branchcode: ""
          name: "New OPAC self-registration submitted"
          is_html: 1
          title: "New OPAC self-registration"
          message_transport_type: email
          lang: default
          content:
            - "<h3>New OPAC self-registration</h3>"
            - "<p><h4>Self-registration made:</h4>"
            - "<ul>"
            - "<li> [% borrower.firstname %] [% borrower.surname %]</li>"
            - "[% IF borrower.cardnumber %]<li>Cardnumber: [% borrower.cardnumber %]</li>[% END %]"
            - "[% IF borrower.email %]<li>Email: [% borrower.email %]</li>[% END %]"
            - "[% IF borrower.phone %]<li>Phone: [% borrower.phone %]</li>[% END %]"
            - "[% IF borrower.mobile %]<li>Mobile: [% borrower.mobile %]</li>[% END %]"
            - "[% IF borrower.fax %]<li>Fax: [% borrower.fax %]</li>[% END %]"
            - "[% IF borrower.emailpro %]<li>Secondary email: [% borrower.emailpro %]</li>[% END %]"
            - "[% IF borrower.phonepro %]<li>Secondary phone: [% borrower.phonepro %]</li>[% END %]"
            - "[% IF borrower.branchcode %]<li>Home library: [% borrower.branchcode %]</li>[% END %]"
            - "[% IF borrower.categorycode %]<li>Temporary patron category: [% borrower.categorycode %]</li>[% END %]"
            - "</ul>"
            - "</p>"

        - module: catalogue
          code: LIST
          branchcode: ""
          name: "Send list"
          is_html: 1
          title: "Your list: [% listname | html %]"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE Branches -%]"
            - "[%- USE AuthorisedValues -%]"
            - "[%- USE Koha -%]"
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "Hi,<br><br>"
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %].<br>"
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
            - "[% IF ( comment ) %]<hr><br>[% comment | html | html_line_break %]<br><br>[% END %]<hr>"
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
            - "[% biblio.title | html %]"
            - "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]<br>"
            - "[% IF ( biblio.author || biblio.get_marc_contributors.size ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_contributors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_contributors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %]<br>[% END %]"
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %]<br>[% END %]"
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %]<br>[% END %]"
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %]<br>[% END %]"
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %]<br>[% END %]"
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %]<br>[% END %]"
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
            - "[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]"
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
            - "[<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
            - "[% IF ( item.location ) %], [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %][% END %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]</li>[% END %]</ul>[% END %]"
            - "<hr></li>[% END %]</ol>"

        - module: catalogue
          code: CART
          branchcode: ""
          name: "Send cart"
          is_html: 1
          title: "Your cart"
          message_transport_type: email
          lang: default
          content:
            - "[%- USE Branches -%]"
            - "[%- USE AuthorisedValues -%]"
            - "[%- USE Koha -%]"
            - "[%- PROCESS 'html_helpers.inc' -%]"
            - "Hi,<br><br>"
            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog.<br>"
            - "Please note that the attached file is a MARC bibliographic records file which can be imported into personal bibliographic software like EndNote, Reference Manager or ProCite.<br>"
            - "[% IF ( comment ) %]<hr><br>[% comment | html | html_line_break %]<br><br>[% END %]<hr>"
            - "<ol>[% FOREACH biblio IN biblios %]<li>"
            - "[% biblio.title | html %]"
            - "[% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle.split(' | ') %][% subtitle | html %][% END %][% END %][% biblio.part_number | html %] [% biblio.part_name | html %]<br>"
            - "[% IF ( biblio.author || biblio.get_marc_contributors.size ) %]Author(s): [% IF ( biblio.author ) %][% biblio.author | html %][% END %][% IF ( biblio.get_marc_contributors ) %][% IF ( biblio.author ) %]; [% END %][% FOREACH author IN biblio.get_marc_contributors %][% FOREACH subfield IN author.MARCAUTHOR_SUBFIELDS_LOOP %][% subfield.separator | html %][% subfield.value | html %][% END %][% UNLESS ( loop.last ) %];[% END %][% END %][% END %]<br>[% END %]"
            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %]<br>[% END %]"
            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %]<br>[% END %]"
            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %]<br>[% END %]"
            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %]<br>[% END %]"
            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %]<br>[% END %]"
            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %]<br>[% END %]"
            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %]<br>[% END %]"
            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %]<br>[% END %]"
            - "[% IF ( biblio.get_marc_host_only || biblio.get_marc_hostinfo_only ) %]In: [% IF biblio.get_marc_host_only.biblionumber %][% INCLUDE 'biblio-title.inc'  biblio=biblio.get_marc_host_only %] [% biblio.get_marc_relatedparts_only %][% ELSE %][% biblio.get_marc_hostinfo_only %][% END %]<br>[% END %]"
            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %]<br>[% END %]"
            - "<a href='[% Koha.Preference('OpacBaseUrl') %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %]'>View in online catalog</a>"
            - "[% IF ( biblio.items.count > 0 ) %]<br>Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %]"
            - "[% IF ( item.location ) %], [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %][% END %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]</li>[% END %]</ul>[% END %]"
            - "<hr></li>[% END %]</ol>"

        - module: preservation
          code: PRES_TRAIN_ITEM
          branchcode: ""
          name: "Train item slip"
          is_html: 0
          title: "Train item slip"
          message_transport_type: print
          lang: default
          content:
            - "[%~ USE AuthorisedValues ~%]"
            - "[%~ SET train = train_item.train ~%]"
            - "[%~ SET item = train_item.catalogue_item ~%]"
            - "Train name: [% train.name %]"
            - "Sent on: [% train.sent_on | $KohaDates %]"
            - ""
            - "[% train.default_processing.name %]"
            - ""
            - "Item number #[% train_item.user_train_item_id %]"
            - ""
            - "[% FOREACH item_attribute IN train_item.attributes %]"
            - "    [%~ SET value = item_attribute.value ~%]"
            - "    [%~ IF item_attribute.processing_attribute.type == 'authorised_value' ~%]"
            - "        [%~ SET value = AuthorisedValues.GetByCode(item_attribute.processing_attribute.option_source, item_attribute.value) ~%]"
            - "    [%~ END ~%]"
            - "    [% item_attribute.processing_attribute.name %]: [% value %]"
            - "[% END %]"

        - module: reserves
          code: HOLDPLACED_PATRON
          branchcode: ""
          name: "Hold is confirmed"
          is_html: 0
          title: "Your hold on [% hold.biblio.title %] is confirmed"
          message_transport_type: email
          lang: default
          content:
            - "Hello [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %]),"
            - "Your hold on [% hold.biblio.title %] ([% hold.biblio.id %]) has been confirmed."
            - "You will be notified by the library when your item is available for pickup."
            - "Thank you!"
