[OPEN-ILS-GENERAL] Receipt Template Question

Elizabeth Davis edavis at albright.org
Wed May 4 13:39:39 EDT 2016


Hi Brent

Thanks so much! That third option did the trick.

Elizabeth

From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Brent Mills
Sent: Wednesday, May 04, 2016 1:17 PM
To: open-ils-general at list.georgialibraries.org
Subject: Re: [OPEN-ILS-GENERAL] Receipt Template Question


Hi Elizabeth,

There's a sum function that you can include in your receipt templates to add up the given macro/value for a total.

I don't believe there's a count function, or I haven't seen one for the receipt templates, at least.

You might be able to do something like one of these approaches:

For the "checkout" receipt template (line item bit is included within the <li> tags you have):

Line Item: <span style="display: none;" sum="sum1">%copy_number%</span>

Footer: <div><center>You currently have <span sumout="sum1" style="font-weight:bold;"></span> item(s) checked out from<br/>%LIBRARY%</center></div>

That would depend on each of the "copy_number" fields being "1", and that field isn't a required entry... so it's probably not the best option.

I'd probably do something like:

Line Item: <span style="display: none;" sum="sum1">1</span>

Footer: <div><center>You currently have <span sumout="sum1" style="font-weight:bold;"></span> item(s) checked out from<br/>%LIBRARY%</center></div>

So a barebones/complete example for line item/footer would be:

Line Item:

<li>
<span style="font-weight:bold">%title%</span><br/>
Author: %author%<br/>
Barcode: %barcode%<br/>
Due: %due_date%<br/>
Item Type: %circ_modifier%<br/><br/>
<span style="display: none;" sum="sum1">1</span>
</li>

Footer:

<div><center>You currently have <span sumout="sum1" style="font-weight:bold;"></span> item(s) checked out from<br/>%LIBRARY%</center></div>
I'm not sure if there's any harm in hardcoding a "1" value for each line item, but that seems to work. I'll let others chime in.

Good luck!

-Brent
On 5/4/16 8:09 AM, Elizabeth Davis wrote:
Hello Everyone,

We had a request from a library that wants to have a total number of checked out items auto-populated on the bottom of their checkout receipts for their Summer Reading Club program.  I've got the template printing the list numbers, but can't seem to get it to total the number of items.

Any suggestions?

Thanks so much,

Elizabeth Davis
Head of Digital Services
Scranton Public Library
500 Vine Street
Scranton, PA 18509
570-348-3000 ext. 3050
edavis at albright.org<mailto:edavis at albright.org>




--

Brent Mills

Systems Librarian | Sage Library System

email: brent at hoodriverlibrary.org<mailto:brent at hoodriverlibrary.org>

tickets: sagelib.org/support

phone: 541.610.8384
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20160504/8416d78c/attachment.html>


More information about the Open-ils-general mailing list