Bug 3150: Move emails for sending cart and list contents to notices
[srvgit] / installer / data / mysql / en / mandatory / sample_notices.yml
index 53a7e2a..765875f 100644 (file)
@@ -43,6 +43,81 @@ tables:
             - ""
             - "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>"
+            - "Thankyou for your report concerning [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 0 -%].<br>"
+            - "<br>"
+            - "You reported: <br>"
+            - "[%- ticket.body -%]<br>"
+            - "<br>"
+            - "Thankyou"
+
+        - 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>"
+            - "Thankyou"
+
+        - 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>"
+            - "Thankyou"
+
+        - 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 [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 1 -%]<br>"
+            - "<br>"
+            - "[%- ticket.body -%]<br>"
+            - "<br>"
+            - "You can mark this concern as resolved from the concern management <a href='[%- Koha.Preference('IntranetBaseURL') -%]/cgi-bin/koha/cataloguing/concerns.pl'>page</a>."
+
         - module: circulation
           code: ACCOUNT_CREDIT
           branchcode: ""
@@ -52,68 +127,116 @@ tables:
           message_transport_type: print
           lang: default
           content:
-            - "[% USE Price %]"
-            - "[% PROCESS 'accounts.inc' %]"
+            - "[%- USE AuthorisedValues -%]"
+            - "[%- USE KohaDates -%]"
+            - "[%- USE Price -%]"
+            - "[%- PROCESS \"accounts.inc\" -%]"
             - "<table>"
-            - "[% IF ( LibraryName ) %]"
-            - " <tr>"
-            - "    <th colspan=\"5\" class=\"centerednames\">"
+            - "    [% IF ( LibraryName ) %]"
+            - "    <tr>"
+            - "      <th colspan=\"2\" class=\"centerednames\">"
             - "        <h3>[% LibraryName | html %]</h3>"
-            - "    </th>"
-            - " </tr>"
-            - "[% END %]"
-            - " <tr>"
-            - "    <th colspan=\"5\" class=\"centerednames\">"
-            - "        <h2><u>Fee receipt</u></h2>"
-            - "    </th>"
-            - " </tr>"
-            - " <tr>"
-            - "    <th colspan=\"5\" class=\"centerednames\">"
-            - "        <h2>[% Branches.GetName( credit.patron.branchcode ) | html %]</h2>"
-            - "    </th>"
-            - " </tr>"
-            - " <tr>"
-            - "    <th colspan=\"5\">"
+            - "      </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>"
-            - "  <tr>"
-            - "    <th>Created</th>"
-            - "    <th>Updated</th>"
-            - "    <th>Description of charges</th>"
-            - "    <th>Note</th>"
-            - "    <th>Amount</th>"
-            - " </tr>"
-            - ""
-            - " <tr class=\"highlight\">"
-            - "    <td>[% credit.date | $KohaDates %]</td>"
-            - "    <td>[% credit.timestamp | $KohaDates with_hours = 1 %]</td>"
-            - "    <td>"
-            - "      [% PROCESS account_type_description account=credit %]"
-            - "      [%- IF credit.description %], [% credit.description | html %][% END %]"
-            - "    </td>"
-            - "    <td>[% credit.note | html %]</td>"
-            - "    <td class=\"credit\">[% credit.amount | $Price %]</td>"
-            - " </tr>"
-            - ""
-            - "[% IF ( tendered ) %]"
-            - "  <tr>"
-            - "    <td colspan=\"3\">Amount tendered: </td>"
-            - "    <td>[% tendered | $Price %]</td>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <td colspan=\"3\">Change given: </td>"
-            - "    <td>[% change | $Price %]</td>"
-            - "  </tr>"
-            - "[% END %]"
-            - ""
-            - "<tfoot>"
-            - "  <tr>"
-            - "    <td colspan=\"4\">Total outstanding dues as on date: </td>"
-            - "    [% IF ( credit.patron.account.balance >= 0 ) %]<td class=\"credit\">[% ELSE %]<td class=\"debit\">[% END %][% credit.patron.account.balance | $Price %]</td>"
-            - "  </tr>"
-            - "</tfoot>"
+            - "      </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
@@ -126,57 +249,85 @@ tables:
           lang: default
           content:
             - "[% USE Price %]"
-            - "[% PROCESS 'accounts.inc' %]"
+            - "[% USE KohaDates %]"
+            - "[% PROCESS \"accounts.inc\" %]"
             - "<table>"
-            - "  [% IF ( LibraryName ) %]"
+            - "    [% IF ( LibraryName ) %]"
             - "    <tr>"
-            - "      <th colspan=\"6\" class=\"centerednames\">"
+            - "      <th colspan=\"3\" class=\"centerednames\">"
             - "        <h3>[% LibraryName | html %]</h3>"
             - "      </th>"
             - "    </tr>"
-            - "  [% END %]"
-            - ""
-            - "  <tr>"
-            - "    <th colspan=\"6\" class=\"centerednames\">"
-            - "      <h2><u>INVOICE</u></h2>"
-            - "    </th>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <th colspan=\"6\" class=\"centerednames\">"
-            - "      <h2>[% Branches.GetName( debit.patron.branchcode ) | html %]</h2>"
-            - "    </th>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <th colspan=\"6\" >"
-            - "      Bill to: [% debit.patron.firstname | html %] [% debit.patron.surname | html %] <br />"
-            - "      Card number: [% debit.patron.cardnumber | html %]<br />"
-            - "    </th>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <th>Created</th>"
-            - "    <th>Updated</th>"
-            - "    <th>Description of charges</th>"
-            - "    <th>Note</th>"
-            - "    <th style=\"text-align:right;\">Amount</th>"
-            - "    <th style=\"text-align:right;\">Amount outstanding</th>"
-            - "  </tr>"
-            - ""
-            - "  <tr class=\"highlight\">"
-            - "    <td>[% debit.date | $KohaDates%]</td>"
-            - "    <td>[% debit.timestamp | $KohaDates with_hours = 1 %]</td>"
-            - "    <td>"
-            - "      [% PROCESS account_type_description account=debit %]"
-            - "      [%- IF debit.description %], [% debit.description | html %][% END %]"
-            - "    </td>"
-            - "    <td>[% debit.note | html %]</td>"
-            - "    <td class=\"debit\">[% debit.amount | $Price %]</td>"
-            - "    <td class=\"debit\">[% debit.amountoutstanding | $Price %]</td>"
-            - "  </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>"
-            - "      <td colspan=\"5\">Total outstanding dues as on date: </td>"
-            - "      [% IF ( totalcredit ) %]<td class=\"credit\">[% ELSE %]<td class=\"debit\">[% END %][% total | $Price %]</td>"
+            - "      <th colspan=\"2\" style=\"text-align:right;\">Total outstanding:</th>"
+            - "      <td>[% debit.amountoutstanding | $Price %]</td>"
             - "    </tr>"
             - "  </tfoot>"
             - "</table>"
@@ -403,6 +554,21 @@ tables:
             - "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)"
@@ -418,6 +584,21 @@ tables:
             - "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"
@@ -444,6 +625,21 @@ tables:
             - "<<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)"
@@ -461,6 +657,21 @@ tables:
             - "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"
@@ -628,6 +839,21 @@ tables:
             - "<<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)"
@@ -645,6 +871,21 @@ tables:
             - "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"
@@ -1077,6 +1318,21 @@ tables:
             - "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: 1
+          title: "Library account password change notification for [% patron.firstname %] [% patron.surname %]"
+          message_transport_type: email
+          lang: default
+          content:
+            - "Dear [% patron.firstname %] [% patron.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"
@@ -1192,6 +1448,112 @@ tables:
             - "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: ""
@@ -1307,67 +1669,66 @@ tables:
             - "[% USE Price %]"
             - "[% PROCESS \"accounts.inc\" %]"
             - "<table>"
-            - "[% IF ( LibraryName ) %]"
-            - " <tr>"
-            - "    <th colspan=\"2\" class=\"centerednames\">"
+            - "    [% 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 %]"
+            - "      </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>[% credit.amount * -1| $Price %]</td>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <td>Tendered: </td>"
-            - "    <td>[% collected | $Price %]</td>"
-            - "  </tr>"
-            - "  <tr>"
-            - "    <td>Change: </td>"
-            - "    <td>[% change | $Price %]</td>"
+            - "    [% END %]"
+            - "  <tfoot>"
+            - "    <tr class=\"highlight\">"
+            - "      <td>Total:</td>"
+            - "      <td>[% payment.amount * -1 | $Price %]</td>"
             - "    </tr>"
-            - "</tfoot>"
+            - "    <tr>"
+            - "      <td>Tendered: </td>"
+            - "      <td>[% tendered | $Price %]</td>"
+            - "    </tr>"
+            - "    <tr>"
+            - "      <td>Change given:</td>"
+            - "      <td>[% change | $Price %]</td>"
+            - "    </tr>"
+            - "  </tfoot>"
             - "</table>"
 
         - module: reserves
@@ -1415,6 +1776,19 @@ tables:
           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
@@ -1835,7 +2209,7 @@ tables:
             - ""
             - "<<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.branchcode>>. Please pick up your item by <<recalls.expirationdate>>."
+            - "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!"
 
@@ -1860,8 +2234,8 @@ tables:
             - "<<biblio.title>> by <<biblio.author>>"
             - "Barcode: <<items.barcode>>"
             - "Callnumber: <<items.itemcallnumber>>"
-            - "Waiting since: <<recalls.waitingdate>>"
-            - "Notes: <<recalls.recallnotes>>"
+            - "Waiting since: <<recalls.waiting_date>>"
+            - "Notes: <<recalls.notes>>"
 
         - module: members
           code: 2FA_DISABLE
@@ -1901,16 +2275,78 @@ tables:
           lang: default
           content:
             - "<h3>New OPAC self-registration</h3>"
-            - "<p><h4>Self-registration made by</h4>"
+            - "<p><h4>Self-registration made:</h4>"
             - "<ul>"
-            - "<li><<borrowers.firstname>> <<borrowers.surname>></li>"
-            - "<li>Email: <<borrowers.email>></li>"
-            - "<li>Phone: <<borrowers.phone>></li>"
-            - "<li>Mobile: <<borrowers.mobile>></li>"
-            - "<li>Fax: <<borrowers.fax>></li>"
-            - "<li>Secondary email: <<borrowers.emailpro>></li>"
-            - "<li>Secondary phone:<<borrowers.phonepro>></li>"
-            - "<li>Home library: <<borrowers.branchcode>></li>"
-            - "<li>Temporary patron category: <<borrowers.categorycode>></li>"
+            - "<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:
+            - "Hi,"
+            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
+            - "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."
+            - "<hr/>[% comment | html %]<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 %]"
+            - "[% IF ( biblio.author || biblio.get_marc_contributors ) %]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 %][% END %]"
+            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
+            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
+            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
+            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
+            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
+            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
+            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
+            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
+            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
+            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
+            - "[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %][% 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:
+            - "Hi,"
+            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a cart from our online catalog."
+            - "[% borrower.firstname | html %] [% borrower.surname | html %] sent you a list from our online catalog called: [% listname | html %]."
+            - "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."
+            - "<hr/>[% comment | html %]<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 %]"
+            - "[% IF ( biblio.author || biblio.get_marc_contributors ) %]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 %][% END %]"
+            - "[% SET biblioitem = biblio.biblioitem %][% IF ( biblioitem.isbn ) %]ISBN: [% FOREACH isbn IN biblioitem.isbn %][% isbn | html %][% UNLESS ( loop.last ) %]; [% END %][% END %][% END %]"
+            - "[% IF ( biblioitem.publishercode ) %]Published by: [% biblioitem.publishercode | html %][% IF ( biblioitem.publicationyear ) %] in [% biblioitem.publicationyear | html %][% END %][% IF ( biblioitem.pages ) %], [% biblioitem.pages | html %][% END %][% END %]"
+            - "[% IF ( biblio.seriestitle ) %]Collection: [% biblio.seriestitle | html %][% END %]"
+            - "[% IF ( biblio.copyrightdate ) %]Copyright year: [% biblio.copyrightdate | html %][% END %]"
+            - "[% IF ( biblio.notes ) %]Notes: [% biblio.notes | html %][% END %]"
+            - "[% IF ( biblio.unititle ) %]Unified title: [% biblio.unititle | html %][% END %]"
+            - "[% IF ( biblio.serial ) %]Serial: [% biblio.serial | html %][% END %]"
+            - "[% IF ( biblioitem.lccn ) %]LCCN: [% biblioitem.lccn | html %][% END %]"
+            - "[% IF ( biblioitem.url ) %]URL: [% biblioitem.url | html %][% END %]"
+            - "[% SET OPACBaseURL = Koha.Preference('OPACBaseURL') %][% IF ( OPACBaseURL ) %]In online catalog: [% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | html %][% END %]"
+            - "[% IF ( biblio.items.count > 0 ) %]Items: <ul>[% FOREACH item IN biblio.items %]<li>[% Branches.GetName( item.holdingbranch ) | html %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %][% IF item.itemcallnumber %]([% item.itemcallnumber | html %])[% END %][% item.barcode | html %]</li>[% END %]</ul>[% END %]"
+            - "<hr/></li>[% END %]</ol>"