[open-ils-commits] r11446 - branches/rel_1_4/Open-ILS/examples/templates

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Dec 8 14:09:16 EST 2008


Author: erickson
Date: 2008-12-08 14:09:13 -0500 (Mon, 08 Dec 2008)
New Revision: 11446

Modified:
   branches/rel_1_4/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: branches/rel_1_4/Open-ILS/examples/templates/overdue_combined_xml.example
===================================================================
--- branches/rel_1_4/Open-ILS/examples/templates/overdue_combined_xml.example	2008-12-08 17:52:35 UTC (rev 11445)
+++ branches/rel_1_4/Open-ILS/examples/templates/overdue_combined_xml.example	2008-12-08 19:09:13 UTC (rev 11446)
@@ -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