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-boun...@list.georgialibraries.org] On Behalf Of Elizabeth Davis Sent: Wednesday, May 4, 2016 9:40 AM To: open-ils-general@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-boun...@list.georgialibraries.org] On Behalf Of Brent Mills Sent: Wednesday, May 04, 2016 1:17 PM To: open-ils-general@list.georgialibraries.org<mailto:open-ils-general@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 eda...@albright.org<mailto:eda...@albright.org> -- Brent Mills Systems Librarian | Sage Library System email: br...@hoodriverlibrary.org<mailto:br...@hoodriverlibrary.org> tickets: sagelib.org/support phone: 541.610.8384