John, Terran

Thank you so much, I have been fighting with this for days, im not particularly 
oh-fey with AngularJS.

Now onto the next receipt…


Stuart Forrest PhD
IT Analyst
Beaufort County Library System
843 255 6450

For Leisure, For Learning, For Life

From: Open-ils-general 
[] On Behalf Of John 
Sent: Tuesday, February 13, 2018 5:03 PM
To: Evergreen Discussion Group
Subject: Re: [OPEN-ILS-GENERAL] Web Client Print Templates - "You Saved" 

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">
    <li ng-repeat="checkout in circulations" | 
ng-init="transactions.subtotal=transactions.subtotal -- checkout.copy.price" >
<div>You Saved<br/>{{transactions.subtotal | currency}}</span><br/> by 
borrowing from <br/> 


John Amundson | Library Applications Associate III | CW MARS<> | 508-755-3323 

On Tue, Feb 13, 2018 at 4:13 PM, Terran McCanna 
<<>> wrote:
I have an example here that subtotals bill amounts:
I haven't tested this scenario, but you should be able to do something 
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 
Atlanta, GA 

On Tue, Feb 13, 2018 at 3:29 PM, John Amundson 
<<>> wrote:

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 
%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 Amundson | Library Applications Associate III | CW MARS<> | 508-755-3323 

Reply via email to