[OPEN-ILS-GENERAL] Receipt Template Question

Elizabeth Davis edavis at albright.org
Fri May 6 12:10:47 EDT 2016


Hi Holly

Thank you very much. That's a great idea.

Elizabeth

From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Holly Brennan
Sent: Wednesday, May 04, 2016 1:59 PM
To: Evergreen Discussion Group <open-ils-general at list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Receipt Template Question

Hi Elizabeth -

Looks like Brent has you covered, but I'll chime in with what I have. On our items_out receipt, I have this in the header:

<hr>You have a total of <b><span sumout="sum2" ></span></b> items checked out:<ol>

Which prints as You have a total of # items checked out:

I also made a sum for our checkout receipts, since it's common for patrons (especially parents checking out a lot of picture books) to want to know how many books they have in the stack they checked out today:

<hr>Today, you checked out <b><span sumout="sum2" ></span></b> items:<ol>

Which prints as Today, you checked out # items:

I've done a lot with receipt templates - they're fun! Glad to hear others exploring what can be done.

-Holly

From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Elizabeth Davis
Sent: Wednesday, May 4, 2016 9:40 AM
To: open-ils-general at list.georgialibraries.org<mailto:open-ils-general at list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Receipt Template Question

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<mailto: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/20160506/32d1f04c/attachment.html>


More information about the Open-ils-general mailing list