- The Receipt Template Editor Interface
- Using Macros
- Using HTML and CSS
- Using Includes
- Advanced Code Tips
- Importing and Exporting Templates
- Class PowerPoint Presentation
- Additional Resources
The receipts that print from the Evergreen staff client software are managed via the Receipt Template Editor workstation by workstation. Typically, library systems will set up the receipts the way they want them to print out on one workstation at a branch, then export the settings as a file and import that file to each of the other workstations at that branch. Some library systems choose to set up different types of workstations (Circulation versus Technical Services, for example) differently depending on the type of work that needs to be done.
Different workstations may be connected to different types of printers, and some printers may print certain things better than others. For example, some older printers may ignore special formatting, larger font sizes, or graphics that are added to the receipts and just print out plain text. Be sure to test the receipts you modify on your own receipt printers. (See also: Receipt Printer Setup)
Open the Receipt Template Editor by logging in to the Evergreen Staff Client and going to Admin > Workstation Administration > Receipt Template Editor.
Each type of receipt has its own Template. Choose the Template you wish to review or modify from the drop-down list on the upper-left.
The Force Printer Context dropdown has options that correspond to the Printer Settings Editor: default, receipt, label, mail, and offline. If you choose a Template and then select one of these options, it will override the defaults and force all receipts of that type to print to the corresponding printer.
This section of the screen gives you a rough preview image of how the receipt will print out. However, it does not always recognize some of the code you have used or all of the macros, so it may not always preview exactly the way the final result will look. Always be sure to print out your receipts on your actual receipt printer(s) to evaluate your modifications.
- Preview: The Preview button refreshes the Preview section of the screen (however, this is usually unnecessary).
- Default: The Default button resets the currently selected template back to its original "out of the box" settings.
- Macros: See "Using Macros" below.
- Save Locally: After making changes to a template, click Save Locally to save the changes.
- Export and Import: See "Importing and Exporting" below.
Header, Line Item, and Footer
Each Template has a Header, a Line Item, and a Footer. The Header prints at the top of the receipt, the Line Item prints once for each item on the receipt (for instance, once for each item that is checked out, or once for each bill on an account), and the Footer prints at the bottom of the page.
Each of these sections may contain text (simply typed in), macros (codes that pull in data from the system), or formatting code (HTML and/or CSS).
If you select a template and then click the Macros button on the upper-right, a pop-up window will open with lists of macros that will work with that template. As an example, here are the Macros that display for the checkin template:
The General macros listed at the top are commonly available for most types of Templates, whether they are related to Bills or Items or anything else.
The second set of macros (in this case, items) is available for that specific group of templates (item_status, items_out, checkout, etc.)
Each macro name is bracketed by percent signs (%) - whenever the system sees these signs, it will search for a particular piece of data and display it on the receipt in place of the macro. For example, if you put %PATRON_FIRSTNAME% into the Header of your checkout template, it will print out the first name of the patron whose materials you have checked out at the top of the form.
Download: Macro Descriptions (PDF)
At this time, the individual macros are not well-documented, and occasionally there will be macros that will work that are not listed on the macro pop-up lists. For example, if you wish to add book titles to bill printouts, you may use the %title% macro in the Line Item section of the bills template even though %title% is not listed as an option on the Macros pop-up lists. Feel free to experiment with different macros on a test workstation to see if they will print what you think they ought to in the working environment. If you lose track of your experimentations on a template, you may click the Default button to reset it back to the beginning.
|bills||%title%||Use in Line Item section of bill templates to list item title (if available) along with the amount owed.|
|Use anywhere in the bills_current template to print the account balance (%grand_total_owed%), the total amount that has been billed to that account (%grand_total_billed%), and the total amount that has been paid on that account (%grand_total_paid%). (Most libraries will just use %grand_total_owed%.)|
|checkout||%balance_owed%||Use in footer to get the total owed on this account.|
(If you encounter a macro that works but is not on this list, please contact Terran McCanna (firstname.lastname@example.org) with the details so that it can be added to this list.)
You can use basic HTML and CSS code to format the display on your receipts. A few basic tips are listed here, and if you wish to learn more you can take free online classes through GLEAN (Lynda.com) or teach yourself through free sites such as W3Schools. Not all code may work well with the receipt template format, so be sure to test your modifications carefully.
|Bold||<b>My Text</b>||My Text|
|Italic||<i>My Text</i>||My Text|
|Underlined||<u>My Text</u>||My Text|
|Horizontal Line||My Text<hr/>My Text||MyText
|Bulleted List||<ul><li>Item One</li><li>Item Two</li><li>Item Three</li></ul>||
|Numbered List||<ol><li>Item One</li><li>Item Two</li><li>Item Three</li></ol>||
|Paragraph||<p>My first paragraph.</p><p>My second paragraph.</p>||
My first paragraph.
My second paragraph.
|Centering||<p align="center">My Text</p>||My Text|
|Align on the Right||<p align="right">My Text</p>||My Text|
|Add Image||See How to Add an Image to a Receipt|
|Font Choice||<p style="font-family:arial,sans-serif;">My text</p>
<p style="font-family:times,serif;">My text</p>
<p style="font-size:xx-large;">My text</p>
|Make Uppercase||<p style="text-transform:uppercase;">My text</p>||
|Example: Put transit info in large font at top of slip||
In Header section:
(item info here)
|Example: Add balance owed to checkout receipt
(only works on checkout, not on items_out)
In Footer section:
|YOU OWE: $7.25|
|Example: Add balance owed to current bills receipt
(only works on bills_current)
In Header or Footer:
<b>YOU OWE: $%grand_total_owed%</b>
|YOU OWE: $7.25|
If there is a portion of the receipt that you'd like to be the same across multiple templates (perhaps a library's name, contact information, and hours), you may set up an Include to do this.
Anyone who logs in with a Local Administrator account should already have the correct permissions to make these changes. The required permissions are:
Library Settings Editor Configuration
- Go to the Library Settings Editor (Admin > Local Administration > Library Settings Editor).
- Choose your Context Location (local branch or local system).
- After the list loads, filter by "include" to display the list of options: alert_text, notice_text, event_text, header_text, footer_text.
- Click Edit next to the Include you wish to modify (for example, "Content of header_text include").
- In the pop-up window that opens, check to be sure that the Context is showing the correct branch or system, and type what you want to include in the Value field. This is a small field, so you may find it easier to type in what you'd like to include in Notepad or another text editor and then copy and paste it into the Value field. If you do this, be sure to type it in as one line without any line or paragraph breaks in order for it to copy and paste into this field correctly. (Example: <b>Thank you for visiting<br/>%LIBRARY%</b><br/>www.gapines.org<br/> )
- Click the Update Setting button.
- Repeat for any of the other includes you wish to modify.
- Close the Evergreen staff client and reopen it to pick up all of the newly changed settings.
Receipt Template Configuration
Next, you will need to add this Include to the receipts that you wish it to appear on:
- Go to the Receipt Template Editor (Admin > Workstation Administration > Receipt Template Editor).
- Choose the first receipt template you'd like to add the Include to (for example, checkout).
- Go to the section of the receipt template that you'd like to add it to (usually the header or footer) and type in the macro to reference it %INCLUDE(x)% where x is the name of the include (for example: %INCLUDE(header_text)% ).
- Click the Save Locally button.
- Test printing out a receipt that uses that template to ensure that it prints correctly.
- Repeat steps 2-6 for each of the other receipt templates you'd like to modify.
- Export the finished set of receipt templates and import to each of the other workstations you wish to update (see Importing and Exporting below).
|Date Formatting (due_date)||
The checkout template preview shows that %due_date%
prints as YYYY-MM-DD, but it does not. It actually prints
as MM/DD/YYYY HH:MM AM/PM. To print just the date
without the time, use:
|Date Formating (today)||
When printing the current date, you have several
different date macros to choose from that are in different
|Date Formatting (rearrange)||
If you are presented with the date in the International
format (2011-09-21), you may format it to display in a
|Print text sideways||
<div style="moz-transform: rotate(90deg);">My text</div>
|Getting a Total from Line Items||
In LINE ITEM section:
Item Price: 7.54
Item Price: 3.79
Item Price: 9.99
Total Price: 21.32
|Print First # Characters Only||
Where %title% is Crime and Punishment:
Where %author% is Dostoevsky:
Crime and Pun
|Print Last # of Characters Only||
Where %PATRON_BARCODE% is 21012002885648:
|Sorts List Alphabetically||
In Line Item section:
Back in Society
Once you have one workstation's receipt templates set up the way you like, you can back up the set of them by using the Export function, and then go to another workstation and use the Import function to pull in the modified templates and overwrite the local workstation's default templates.
- Update and save all of the receipt templates you wish to modify on one workstation.
- In the Receipt Template Editor on that workstation, click the Export button (it does not matter which template you are viewing, as it will export all of them).
- Save it to a convenient location (flash drive, network drive, etc.)
- Go to a workstation you want to add the receipt templates to and open the Receipt Template Editor.
- Click the Import button (again, it does not matter which template you are viewing, as it will import all templates).
- Navigate to the location of your exported template file and either double-click on the file name or click the Open button on the pop-up window.
- Click the Save Locally button.
- Evergreen 2.8 Official Documentation
- Tips and Sample Receipt Codes from Tina Jordan at Chestatee Regional Library System
- Instructions from CWMARS
- Instructions from MassLNC
- Advanced Tips from Loquacious Thesis