Bug 3203: ACCTDETAIL notices don't parse branches or borrowers tokens
authorIan Walls <ian.walls@bywatersolutions.com>
Sun, 27 Mar 2011 17:05:48 +0000 (13:05 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 28 Mar 2011 08:26:29 +0000 (21:26 +1300)
commit1d6f791541686dfa409843f8f5b1624f1be6e8cb
treebfe4fa828dc758c1ac6aaa49e022639b05324a51
parent42f316ae480100572e996a7a4de76b9528db3d23
Bug 3203: ACCTDETAIL notices don't parse branches or borrowers tokens

This patch enables the ACCTDETAIL notices (and any branch-specific derivatives) to use
<<branches.*>> and <<borrowers.*>> tokens

This patch also attempts to send the email from the branch email first, falling back to
KohaAdminEmailAddress if no branch email exists.

To test:

1. Enable AutoEmailOpacUser system preference
2. Add <<branches.*>> tokens to the ACCTDETAIL notice
3. Create a new patron, including:
   a. test email address in the field matching your AutoEmailPrimaryAddress syspref value
   b. username and password (required to send a notice)
   c. any other required fields to save the record
4. Check you inbox.  Notice should send instantly (no need to run process_message_queue.pl)

Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Letters.pm
members/memberentry.pl