April 12, 2012

Evergreen Receipts Followup

This post is followup to a series.

At some point some of the modifications I wanted to preform on receipts were added as built-in text macros. The benefit of this is that if for some unfortunate reason you have to use text only receipts you can still modify them as you see fit - JavaScript customization only works in the "Mozilla" (browser) print mode. Thomas Berezansky was kind enough to mention them to me (over a month ago now, because I am terrible at following up on personal projects) and you can read how the built in date formatting, whitespace trimming, and substrings work at http://bstcon.com/receipts.txt . The last line - "Doesn't even cover the default set of features that exist without a custom JS file defined in Mozilla print mode. ;)" - is more than a reminder that there is a lot of flexibility available "for free" in the receipt editor; it's also a reminder that nothing is documented except for the placeholders. Currently you can learn what's available by looking through the source code for that part of the Evergreen client or you can do your own thing, possibly duplicating existing functionality (though perhaps with nicer syntax).

He also pointed out an available placeholder that I didn't notice: %shelf_expire_time%. This uses a library setting that you can configure in the client to determine your available hold expiration dates automatically. This is better than adding the date manually, and was either added sometime after I originally changed our receipts in 2008 or I just didn't know about it since I hadn't looked through most of the library settings at the time. Perhaps someone will find another use for mod-DateAdd, but it's not necessary for hold expiration dates.