LP#1745232 - Bill History Receipt doesn't have Finish Date
authorGarry Collum <gcollum@gmail.com>
Thu, 24 May 2018 02:17:38 +0000 (22:17 -0400)
committerJason Stephenson <jason@sigio.com>
Thu, 24 May 2018 19:01:15 +0000 (15:01 -0400)
Adds xact.finish and xact.summary.last_payment to the example data.  Also adds xact.summary.last_payment_ts to the template body to indicate when the last payment was made.  Also adds a list of variables that can be used in the template in the template's description.

To test -
1. apply the patch
2. find a patron with billings, or add some billings to a patron record.
3. make payments on some of the billings using various methods.
4. go to billing history and print the history list.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>

Open-ILS/src/templates/staff/share/print_templates/t_bills_historical.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index 6b0279d..3a5e4cc 100644 (file)
@@ -5,9 +5,24 @@ to this template includes:
 * transasctions - a list of transactions, each of which
   contains:
 
-  xact.summary - information about the transaction
-  xact.title - Copy title
+  current_location.name - Current location's name
+  current_location.shortname - Current location's shortname
+  today - Today's date and time
+  xact.id - Bill unique id
   xact.copy_barcode - Copy barcode
+  xact.xact_finish - Billing finish date and time
+  xact.xact_start - Billing start date and time
+  xact.summary - Information about the transaction
+    xact.summary.balance_owed - Balance owed
+    xact.summary.last_billing_note - Last billing note
+    xact.summary.last_billing_type - Last billing type
+    xact.summary.last_payment_note - Last payment note
+    xact.summary.last_payment_ts - Last payment date and time 
+    xact.summary.last_payment_type - Last payment type
+    xact.summary.total_owed - Total billed 
+    xact.summary.total_paid - Total paid
+    xact.summary.xact_type - Billing type 
+  xact.title - Copy title
 
 -->
 Welcome to {{current_location.name}}!<br/>
@@ -19,7 +34,7 @@ You had the following bills:
     <dd>
     <table> 
       <tr valign="top">
-        <td>[% l('Date:') %]</td>
+        <td>[% l('Billing Date:') %]</td>
         <td>{{xact.xact_start | date:$root.egDateAndTimeFormat}}</td>
       </tr> 
       <tr valign="top">
@@ -39,7 +54,8 @@ You had the following bills:
       <tr valign="top">
         <td>[% l('Last Payment') %]:</td>
         <td>{{xact.summary.last_payment_type}}<br/>
-            {{xact.summary.last_payment_note}}
+            {{xact.summary.last_payment_note}}<br/>
+            {{xact.summary.last_payment_ts | date:$root.egDateAndTimeFormat}}
         </td>
       </tr> 
       <tr valign="top">
index 012eab0..f599bc0 100644 (file)
@@ -476,24 +476,28 @@ function($scope , $q , egCore , ngToast) {
             {
                 id : 1,
                 xact_start : new Date().toISOString(),
+                xact_finish : new Date().toISOString(),
                 summary : {
                     xact_type : 'circulation',
                     last_billing_type : 'Overdue materials',
                     total_owed : 1.50,
                     last_payment_note : 'Test Note 1',
                     last_payment_type : 'cash_payment',
+                    last_payment_ts : new Date().toISOString(),
                     total_paid : 0.50,
                     balance_owed : 1.00
                 }
             }, {
                 id : 2,
                 xact_start : new Date().toISOString(),
+                xact_finish : new Date().toISOString(),
                 summary : {
                     xact_type : 'circulation',
                     last_billing_type : 'Overdue materials',
                     total_owed : 2.50,
                     last_payment_note : 'Test Note 2',
                     last_payment_type : 'credit_payment',
+                    last_payment_ts : new Date().toISOString(),
                     total_paid : 0.50,
                     balance_owed : 2.00
                 }