LP#1402797 webby: checkin fine tally patron bills link
authorBill Erickson <berickxx@gmail.com>
Fri, 12 Dec 2014 22:27:06 +0000 (17:27 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 Feb 2015 16:58:27 +0000 (11:58 -0500)
Checkin fine tally display now acts as a link which opens a new tab to
the patron bills page for the current checkin patron when fines exist.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/circ/checkin/t_checkin.tt2
Open-ILS/web/js/ui/default/staff/circ/checkin/app.js

index 1d8c466..c578efa 100644 (file)
     <span>[% l('Fine Tally:') %]</span>
     <span class="pad-horiz alert alert-danger">{{fine_total | currency}}</span>
     <span ng-if="billable_barcode">
-      <span>[% l('Transaction for [_1] billed:', '{{billable_barcode}}') %]</span>
+      <!-- note: this forces a new tab -->
+      <a href='./circ/patron/{{billable_user_id}}/bills' target='_blank'>
+        <span>[% l('Transaction for [_1] billed:', '{{billable_barcode}}') %]</span>
+      </a>
       <span class="pad-horiz alert alert-danger">{{billable_amount | currency}}</span>
     </span>
   </div>
index 79b1fd7..dd3fe8f 100644 (file)
@@ -162,6 +162,7 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro
         delete $scope.alert;
         delete $scope.billable_amount;
         delete $scope.billable_barcode;
+        delete $scope.billable_user_id;
 
         var params = compiled.params;
         var options = compiled.options;
@@ -191,6 +192,7 @@ function($scope , $q , $window , $location , egCore , checkinSvc , egGridDataPro
                 if (amt != 0) {
                     $scope.billable_barcode = row_item.copy_barcode;
                     $scope.billable_amount = amt;
+                    $scope.billable_user_id = row_item.circ.usr();
                     $scope.fine_total = 
                         ($scope.fine_total * 100 + amt * 100) / 100;
                 }