Checked out to <<borrowers.title>> <<borrowers.firstname>> <<borrowers.initials>> <<borrowers.surname>> <br />
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.