Add Cost Savings to the Patron's Slip

Add Cost Savings to the Patron's Slip

A library can add a note to a patron checkout receipt that tells them how much they saved by using their library.

Editing a Notice

Go to the Staff Interface >Tools > Notices & Slips. Locate the ISSUESLIP or ISSUEQSLIP (or both). Although these receipts are generally printed with a receipt printer, you will want to edit the EMAIL portion of the notice, not the PRINT.

Example

<h3><<branches.branchname>></h3>
Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
(<<borrowers.cardnumber>>) <br />

<<today>><br />

<h4>Checked Out Today</h4>
<checkedout>
<p>
<<biblio.title>> <br />
Barcode: <<items.barcode>><br />
Date due: <<issues.date_due>><br />
</p>

</checkedout>

Then add this bit:

[% USE Price %]
[% totalValue = 0 %]

[% totalValue = 0 %]
[% FOREACH checkout IN checkouts %]
[% IF checkout.item.price == '' || checkout.item.price == '0.00' %]
[% FOREACH itemtype IN ItemTypes.Get() %]
[% IF checkout.item.itype == itemtype.itemtype %]
[% totalValue = totalValue + itemtype.defaultreplacecost %]
[% END %]
[% END %]
[% ELSE %]
[% totalValue = totalValue + checkout.item.price %]
[% END %]
[% END %]

<div>
By using the library today you have saved: <strong>$[% totalValue | $Price %]</strong>
</div>

Lifetime Savings Example

If you want to add the patron's lifetime savings, add this to the slip after the

</div>

[% FOREACH old_checkout IN borrower.old_checkouts %]
[% IF old_checkout.item.price == '' || old_checkout.item.price == '0.00' %]
[% FOREACH itemtype IN ItemTypes.Get() %]
[% IF old_checkout.item.itype == itemtype.itemtype %]
[% totalValue = totalValue + itemtype.defaultreplacecost %]
[% END %]
[% END %]
[% ELSE %]
[% totalValue = totalValue + old_checkout.item.price %]
[% END %]
[% END %]

<div>
By using the library your all time savings is: <strong>$[% totalValue | $Price%]</strong>
</div>

Replacement Price vs Purchase Price

This code uses the replacement price found in the item. If you prefer to use the purchase price, change the item.replacementprice to item.price.

This code will also defaults to itemtype.replacementprice when price is NULL or 0.00.

Example of Entire Issue Slip

Here is a link to a document that provides an entire issue slip code if you would prefer to just copy this and input it into Koha. This includes the lifetime savings at the bottom.