[OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" Calculator
Kathy Lussier
klussier at masslnc.org
Wed Feb 14 10:13:19 EST 2018
Hi Bill,
Are you on 2.12 or 3.0? I'm not sure, but it could be an issue that
didn't work in 2.12, but was eventually resolved in 3.0.
Kathy
On 02/14/2018 10:09 AM, Bill Coffey wrote:
>
> I have added it to (2) staff workstations and there not getting any
> totals.
>
> Electronic Circuit Board
>
> 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
>
> *From:*Open-ils-general
> [mailto:open-ils-general-bounces at list.georgialibraries.org] *On Behalf
> Of *John Amundson
> *Sent:* Wednesday, February 14, 2018 10:04 AM
> *To:* Evergreen Discussion Group
> <open-ils-general at list.georgialibraries.org>
> *Subject:* Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You
> Saved" Calculator
>
> Hi, Bill:
>
> Your code seems to work for me.
>
> The summed amount will not show in the preview. To confirm it is added
> correctly, you can print a checkout receipt.
>
> John
>
>
> <http://www.cwmars.org>
>
>
>
> John Amundson | Library Applications Associate III | CW MARS
>
> jamundson at cwmars.org <mailto:jamundson at cwmars.org> | 508-755-3323 x322
> <tel:%28508%29%20755-3323>
>
> http://www.cwmars.org <http://www.cwmars.org/>
>
> On Wed, Feb 14, 2018 at 7:42 AM, Bill Coffey <bill.coffey at waynegov.com
> <mailto:bill.coffey at waynegov.com>> wrote:
>
> I am having a problem with the receipt for checkouts.
>
> I have tried several variants for the coding, but I can’t get the
> total.
>
> In the Line Item section I can get the Price of the books with the
> addition of the section in red.
>
> Here is the setup for my Library.
>
> Header:
>
> Welcome to %LIBRARY%! 919-735-1824 <tel:%28919%29%20735-1824><br/>
>
> Please see a staff member to update your email address.<br/>
>
> You checked out the following items:<hr/><ol>
>
> Line Item:
>
> <li>%title%<br/>
>
> Barcode: %barcode%<br/>
>
> Due: %due_date% <br/>
>
> Added and shows price of books
>
> %price% <span style="display: none;" sum="sum1">%price%</span>
>
> Footer:
>
> </ol>
>
> <b>Cost to buy these books: $<span sumout="sum1"
> fixed="2"></span></b><br/>
>
> The Value of your Public Library -<b> PRICELESS!</b>
>
> <hr />%SHORTNAME% %TODAY_TRIM%<br/>
>
> You were helped by %STAFF_FIRSTNAME%<br/>
>
> <hr /> DVDs are $1.00 per day.<br/>
>
> All other items are 25 cents each for every day<br/>
>
> they're late up to a maximum of $10 per item.<br/><br/>
>
> Bill Coffey
>
> Systems Administrator
>
> Wayne County Public Library
>
> 1001 E. Ash St
> <https://maps.google.com/?q=1001+E.+Ash+St%0D+Goldsboro,+NC+27530&entry=gmail&source=g>
>
> Goldsboro, NC 27530
> <https://maps.google.com/?q=1001+E.+Ash+St%0D+Goldsboro,+NC+27530&entry=gmail&source=g>
>
> Phone: (919) 735-6249 <tel:%28919%29%20735-6249>
>
> Fax: (919) 731-2889 <tel:%28919%29%20731-2889>
>
> email: bill.coffey at waynegov.com <mailto:bill.coffey at waynegov.com>
>
> *From:*Open-ils-general
> [mailto:open-ils-general-bounces at list.georgialibraries.org
> <mailto:open-ils-general-bounces at list.georgialibraries.org>] *On
> Behalf Of *Terran McCanna
> *Sent:* Tuesday, February 13, 2018 5:41 PM
> *To:* Evergreen Discussion Group
> <open-ils-general at list.georgialibraries.org
> <mailto:open-ils-general at list.georgialibraries.org>>
> *Subject:* Re: [OPEN-ILS-GENERAL] Web Client Print Templates -
> "You Saved" Calculator
>
> Great! Glad it works!
>
>
> Terran McCanna
> PINES Program Manager
> Georgia Public Library Service
> 1800 Century Place, Suite 150
> <https://maps.google.com/?q=1800+Century+Place,+Suite+150+%0D+Atlanta,+GA+30345&entry=gmail&source=g>
> Atlanta, GA 30345
> 404-235-7138 <tel:%28404%29%20235-7138>
> tmccanna at georgialibraries.org <mailto:tmccanna at georgialibraries.org>
>
> On Tue, Feb 13, 2018 at 5:03 PM, John Amundson
> <jamundson at cwmars.org <mailto:jamundson at cwmars.org>> wrote:
>
> Thanks, Terran!
>
> That seems to do the trick.
>
> If anyone is curious about how I added this to the checkout
> receipt:
>
> ...
>
> <div ng-init="transactions.subtotal=0">
>
> <ol>
>
> <li ng-repeat="checkout in circulations" |
> ng-init="transactions.subtotal=transactions.subtotal --
> checkout.copy.price" >
>
> ....
>
> </li>
>
> </ol>
>
> ....
>
> <div>You Saved<br/>{{transactions.subtotal |
> currency}}</span><br/> by borrowing from <br/>
> {{current_location.name <http://current_location.name>}}!</div>
>
> ...
>
>
> https://lh5.googleusercontent.com/C1fNrKOLEXFs-jfAIXQIMqbKqVBCJrBceOenfgotAcJE6XtZ2ZeeTYFkyfir63-HfzjX6q5zhBQWiO5RZk2tYnWzJ1_rjAADAH4nCmiuhNJuoG8HZLq7MBW-pAU4R9ScKcCybdVO
> <http://www.cwmars.org/>
>
>
>
> John Amundson | Library Applications Associate III | CW MARS
>
> jamundson at cwmars.org <mailto:jamundson at cwmars.org>|
> 508-755-3323 x322 <tel:%28508%29%20755-3323>
>
> http://www.cwmars.org <http://www.cwmars.org/>
>
> On Tue, Feb 13, 2018 at 4:13 PM, Terran McCanna
> <tmccanna at georgialibraries.org
> <mailto:tmccanna at georgialibraries.org>> wrote:
>
> I have an example here that subtotals bill amounts:
> https://pines.georgialibraries.org/dokuwiki/doku.php?id=circ:workstations:receipts#subtotals
>
> I haven't tested this scenario, but you should be able to
> do something similar...
>
> 1) Set up am empty variable before the ng-repeat loop:
> <div ng-init="transactions.subtotal = 0">
>
> 2) Somewhere inside the loop do some math: <li
> ng-init="transactions.subtotal = transactions.subtotal --
> checkout.copy.price">
>
> 3) After the end of the ng-repeat display your subtotal:
> <div>You Saved: {{transactions.subtotal | currency}}</div>
>
>
> Terran McCanna
> PINES Program Manager
> Georgia Public Library Service
> 1800 Century Place, Suite 150
> <https://maps.google.com/?q=1800+Century+Place,+Suite+150+Atlanta,+GA+30345&entry=gmail&source=g>
> Atlanta, GA 30345
> <https://maps.google.com/?q=1800+Century+Place,+Suite+150+Atlanta,+GA+30345&entry=gmail&source=g>
> 404-235-7138 <tel:%28404%29%20235-7138>
> tmccanna at georgialibraries.org
> <mailto:tmccanna at georgialibraries.org>
>
> On Tue, Feb 13, 2018 at 3:29 PM, John Amundson
> <jamundson at cwmars.org <mailto:jamundson at cwmars.org>> wrote:
>
> Hi,
>
> We are preparing for our move to the web client and
> are currently going through and updating print
> templates. For the Checkout, Items Out, and Renew
> templates, many of our libraries print "You saved
> $x.yz by borrowing from your local library." The price
> of the items out would be added together and displayed
> at the end of the receipt with the above text.
>
> We did this by adding the following code to the line
> item section of the template:
>
> %price% %price% <span style="display: none;"
> sum="sum1">%price%</span>
>
> and the following in the footer, where the sum is
> displayed:
>
> <span sumout="sum1" fixed="2"></span>
>
> I updated the line item portion for the web client
> with the new variable name,
>
> <span style="display: none;"
> sum="sum1">{{checkout.copy.price}} </span>
>
> but no matter what I do, the total sum is blank.
>
> I cannot figure how to make this work. I was wondering
> if anyone has gotten this to work yet and would be
> willing to share their code. If not, does anyone have
> any suggestions I could try?
>
> Thank you,
>
> John
>
> https://lh5.googleusercontent.com/C1fNrKOLEXFs-jfAIXQIMqbKqVBCJrBceOenfgotAcJE6XtZ2ZeeTYFkyfir63-HfzjX6q5zhBQWiO5RZk2tYnWzJ1_rjAADAH4nCmiuhNJuoG8HZLq7MBW-pAU4R9ScKcCybdVO
> <http://www.cwmars.org/>
>
>
>
> John Amundson | Library Applications Associate III |
> CW MARS
>
> jamundson at cwmars.org <mailto:jamundson at cwmars.org>|
> 508-755-3323 x322 <tel:%28508%29%20755-3323>
>
> http://www.cwmars.org <http://www.cwmars.org/>
>
--
Kathy Lussier
Project Coordinator
Massachusetts Library Network Cooperative
(508) 343-0128
klussier at masslnc.org
Twitter: http://www.twitter.com/kmlussier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20180214/03f10f0d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 10699 bytes
Desc: not available
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20180214/03f10f0d/attachment-0001.jpg>
More information about the Open-ils-general
mailing list