LP#1551447: don't update already-customized format.selfcheck.fines
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 20:48:50 +0000 (16:48 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 20:48:50 +0000 (16:48 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_fines_printing.sql

index 84837be..3e6f5d7 100644 (file)
@@ -31,6 +31,35 @@ $$
     [% END %]
     </ol>
 </div>
-$$ WHERE id=13;
+$$ WHERE id=13
+AND template = 
+$$
+[%- USE date -%]
+[%- SET user = target -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR xact IN user.open_billable_transactions_summary %]
+        <li>
+            <div>Details: 
+                [% IF xact.xact_type == 'circulation' %]
+                    [%- helpers.get_copy_bib_basics(xact.circulation.target_copy).title -%]
+                [% ELSE %]
+                    [%- xact.last_billing_type -%]
+                [% END %]
+            </div>
+            <div>Total Billed: [% xact.total_owed %]</div>
+            <div>Total Paid: [% xact.total_paid %]</div>
+            <div>Balance Owed : [% xact.balance_owed %]</div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+$$
+;
 
-COMMIT;
\ No newline at end of file
+COMMIT;