Bugfix: [1/3] overdue_notices.pl does not process all advertised fields
authorChris Nighswonger <cnighswonger@foundations.edu>
Tue, 16 Feb 2010 15:56:02 +0000 (10:56 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 17 Feb 2010 11:36:01 +0000 (06:36 -0500)
commit599887a1855349de6bafe9c1b6ce155ed9be5fb5
tree99a221f80ae02282f9056fb90e1d03b6ee0092fd
parent8594f3f14196641040fe1900b6fec2e1b050df06
Bugfix: [1/3] overdue_notices.pl does not process all advertised fields

Note: overdue_notices.pl really needs to be completely re-written.

The script does not process all fields advertised in tools/letter.pl
This patch adds code to process all fields advertised as well as any
from the items table.

It also adds two additional tags for use in the letter templates:

<item></item> which should enclose all fields from the biblio, biblioitems,
and items tables.

<fine></fine> which should be enclosed by the item tag and should
enclose a currency identifier per ISO 4217. If this tag is present with
a proper identifier, the fine for that item will be displayed in the
proper currency format. Note: ISO 4217 changes from time to time therefore
all currencies may not be supported. If you find one that is not
supported, please file a bug with the Locale::Currency::Format author
Tan D Nguyen <tnguyen at cpan doe org>.

An example of the implimentation of these two tags in a notice template
might be like:

The following item(s) is/are currently overdue:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>, Barcode: <<items.barcode>> Fine: <fine>GBP</fine></item>

Which, assuming two items were overdue, would result in a notice like:

The following item(s) is/are currently overdue:

"A Short History of Western Civilization" by Harrison, John B, 909.09821 H2451, Barcode: 08030003 Fine: £3.50
"History of Western Civilization" by Hayes, Carlton Joseph Huntley, 909.09821 H3261 v.1, Barcode: 08030004 Fine: £3.50

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
C4/Letters.pm
misc/cronjobs/overdue_notices.pl