[OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

Forrest, Stuart sforrest at bcgov.net
Wed Feb 14 15:45:46 EST 2018


Just out of interest, with help from Terran McCanna and John Amundson I managed to implement this in 3.0 webclient also. Here is the code I used for that.

<div>Welcome to {{current_location.name}}</div>
<div>You have the following items checked out:</div>
<hr/>
<div ng-init="transactions.subtotal=0">
<ol>
    <li ng-repeat="checkout in circulations" | ng-init="transactions.subtotal=transactions.subtotal -- checkout.copy.price" >
	<div>{{checkout.title}}</div>
	<div>Barcode: {{checkout.copy.barcode}} </div>
	<div>Due: {{checkout.circ.due_date | egDueDate:$root.egDateAndTimeFormat:checkout.circ.circ_lib:checkout.circ.duration}}</div>
	<div>
	<div>Price: {{checkout.copy.price | currency}}</div>
    </li>
</ol>
<hr/>
<div>{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}</div>
<div>You were helped by {{staff.first_given_name}}</div>
<BLOCKQUOTE>
    <div style="width:150px;height:70px;padding:10px;border:2px solid black;" align="center">
	<font size="4">
	<b>You saved: {{transactions.subtotal | currency}}</b>
	<br/> by using your
	<br/> public library
    </div>
</BLOCKQUOTE>

Stuart

***************************************************
Stuart Forrest PhD
IT Analyst
Beaufort County Library System
843 255 6450
sforrest at bcgov.net

www.beaufortcountylibrary.org

For Leisure, For Learning, For Life


-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Diane Disbro
Sent: Wednesday, February 14, 2018 3:38 PM
To: 'Evergreen Discussion Group'
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

And thank you for this discussion so that the rest of us know how to implement this practice at our libraries!

Diane Disbro
Circulation Coordinator/Branch Manager
Union Branch
Scenic Regional Library
308 Hawthorne Drive
Union, MO     63084
(636) 583-3224
www.scenicregional.org




-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Bill Coffey
Sent: Wednesday, February 14, 2018 2:31 PM
To: 'Evergreen Discussion Group'
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

That works very well!!!
 Thanks to everyone for their help.

Bill Coffey
Systems Administrator
Wayne County Public Library
1001 E. Ash St
Goldsboro, NC 27530
 
Phone:  (919) 735-6249
Fax:      (919) 731-2889
email:   bill.coffey at waynegov.com


-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Forrest, Stuart
Sent: Wednesday, February 14, 2018 2:20 PM
To: Evergreen Discussion Group <open-ils-general at list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

Hi

In 2.11 this is how we have it setup

Line Item
<li>%title%<br/>
Barcode: %barcode% <br/>
Due: <b>%due_date%</b>
<span style="display: none;" sum="sum1">%price%</span> </li>

Footer
</ol><hr />%SHORTNAME% %TODAY_TRIM%<br/> <br/>


<BLOCKQUOTE>
<div style="width:150px;height:70px;padding:10px;border:2px solid black;" align="center"> <font size="4"> <b>You saved: $<span sumout="sum1" fixed="2"></b> </span><br/> by using your<br/> public library <br/> </BLOCKQUOTE> </div>

Not sure if there is a difference in format between 2.11 and 2.12 though

Stuart

***************************************************
Stuart Forrest PhD
IT Analyst
Beaufort County Library System
843 255 6450
sforrest at bcgov.net

www.beaufortcountylibrary.org

For Leisure, For Learning, For Life

-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Bill Coffey
Sent: Wednesday, February 14, 2018 2:10 PM
To: 'Evergreen Discussion Group'
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

I have yet to get a total amount on any receipt.
Using:

<span style="display: none;" sum="sum1">%price%</span> And removing the style I can get the price of each book to show in the line item area.

In the Footer using:
Cost to buy these books: $  <span sumout="sum1" fixed="2"></span></b> The total sum still does not show after the $

I did get it to show the $0.00 but that is all.
Thanks for any help.

Bill Coffey
Systems Administrator
Wayne County Public Library
1001 E. Ash St
Goldsboro, NC 27530
 
Phone:  (919) 735-6249
Fax:      (919) 731-2889
email:   bill.coffey at waynegov.com

-----Original Message-----
From: Open-ils-general [mailto:open-ils-general-bounces at list.georgialibraries.org] On Behalf Of Tina Ji
Sent: Wednesday, February 14, 2018 2:03 PM
To: Evergreen Discussion Group <open-ils-general at list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator

We countered some mystery with the price sum. Though using the same code, a couple of our sites did not see the total initially.  
Eventually it showed up, still using the same code. Very weird.

It's on 2.10 and 2.12.

Quoting Bill Coffey <bill.coffey at waynegov.com>:

> Receipt on staff computer:
> See attachment
>
> Here is the test receipt:
> Welcome to Goldsboro Library! 919-735-1824 Please see a staff member 
> to update your email address.
> You checked out the following items:
> ________________________________
>
>   1.  Peace comes to Castle Oak
> Barcode: 3635300990263
> Due: 2006-08-23
> (using %price% to test if the price is there) 10.00
>   2.  The robber barons : the great American capitalists, 1861-1901
> Barcode: 33207002163014
> Due: 2006-09-06
> (using %price% to test if the price is there) 10.95
>   3.  Katy no-pocket
> Barcode: 33034001434539
> Due: 2006-09-06
> (using %price% to test if the price is there) 0.00
>   4.  King's Castle
> Barcode: 31039000791757
> Due: 2006-09-06
> (using %price% to test if the price is there) 5.95
>   5.  Katy no-pocket
> Barcode: 33034001434539
> Due: 2006-09-06
> (using %price% to test if the price is there) 0.00 Cost to buy these
> books: $ The Value of your Public Library - PRICELESS!
> ________________________________
> GOLDSBORO 2018-02-14 10:54
> You were helped by Bill
> ________________________________
> DVDs are $1.00 per day.
> All other items are 25 cents each for every day they're late up to a 
> maximum of $10 per item.
>
>
>
> Bill Coffey
> Systems Administrator
> Wayne County Public Library
> 1001 E. Ash St
> Goldsboro, NC 27530
>
> Phone:  (919) 735-6249
> Fax:      (919) 731-2889
> email:   bill.coffey at waynegov.com
>


--
Tina Ji
1-888-848-9250 ext 1014
Support Specialist
BC Libraries Co-operative





More information about the Open-ils-general mailing list