[open-ils-commits] r11447 - trunk/Open-ILS/examples/templates
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Dec 8 14:09:39 EST 2008
Author: erickson
Date: 2008-12-08 14:09:36 -0500 (Mon, 08 Dec 2008)
New Revision: 11447
Modified:
trunk/Open-ILS/examples/templates/overdue_combined_xml.example
Log:
let's assume that the default combined XML notice template is primarily used for mailing notices, since emails are already handled by the system. as such, if a user does not have a valid address, do not add them to the notice
Modified: trunk/Open-ILS/examples/templates/overdue_combined_xml.example
===================================================================
--- trunk/Open-ILS/examples/templates/overdue_combined_xml.example 2008-12-08 19:09:13 UTC (rev 11446)
+++ trunk/Open-ILS/examples/templates/overdue_combined_xml.example 2008-12-08 19:09:36 UTC (rev 11447)
@@ -2,17 +2,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<file type="notice" date="[% date.format(date.now,'%Y-%m-%d') %]" time="[% date.format(date.now, '%H:%M:%S') %]">
[%- FOREACH circ_set = overdues %]
- <notice type='overdue' notify_interval='[% circ_set.notice.notify_interval %]'>
[%- SET user = circ_set.circ_list.0.usr -%]
[%- SET lib = circ_set.circ_list.0.circ_lib -%]
[%- SET user_addr = user.mailing_address -%]
- [%- IF !user_addr -%]
+ [%- IF !user_addr or user_addr.valid == 'f' -%]
[%- SET user_addr = user.billing_address -%]
[%- END %]
[%- SET lib_addr = lib.mailing_address -%]
[%- IF !lib_addr -%]
[%- SET lib_addr = lib.billing_address -%]
- [%- END %]
+ [%- END -%]
+ [%- IF !user_addr or user_addr.valid == 'f'; NEXT; END; %]
+ <notice type='overdue' notify_interval='[% circ_set.notice.notify_interval %]'>
<patron>
<barcode>[% user.card.barcode %]</barcode>
<first_given_name>[% user.first_given_name %]</first_given_name>
More information about the open-ils-commits
mailing list