let's assume that the default combined XML notice template is primarily used for...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 8 Dec 2008 19:09:36 +0000 (19:09 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 8 Dec 2008 19:09:36 +0000 (19:09 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11447 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/templates/overdue_combined_xml.example

index 024821f..74ea16d 100644 (file)
@@ -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>