LP#1402797 Add Check Number input
authorMike Rylander <mrylander@gmail.com>
Thu, 30 Oct 2014 14:50:03 +0000 (10:50 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 12 Feb 2015 16:58:27 +0000 (11:58 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/src/templates/staff/circ/patron/t_bills.tt2
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js

index b8ab917..317bd08 100644 (file)
           </div>
         </div>
         <div class="form-group">
+          <label for="check-input" class="col-md-6 control-label">
+            [% l('Check Number') %]
+          </label>
+          <div class="col-md-6">
+            <input type="number" min="1" step="any" id="check-input" 
+              ng-model="check_number" focus-me="focus_check" 
+              value="" class="form-control col-md-6 "/>
+          </div>
+        <div class="form-group">
           <label for="amount-input" class="col-md-6 control-label">
             [% l('Payment Received') %]
           </label>
index 5b83989..cee0f0f 100644 (file)
@@ -24,7 +24,7 @@ function($q , egCore , patronSvc) {
         .then(function(summary) {return service.summary = summary})
     }
 
-    service.applyPayment = function(type, payments, note) {
+    service.applyPayment = function(type, payments, note, check) {
         return egCore.net.request(
             'open-ils.circ',
             'open-ils.circ.money.payment',
@@ -32,6 +32,7 @@ function($q , egCore , patronSvc) {
                 userid : service.userId,
                 note : note || '', 
                 payment_type : type,
+                check_number : check,
                 payments : payments,
                 patron_credit : 0
             },
@@ -121,6 +122,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
     billSvc.userId = $routeParams.id;
 
     // set up some defaults
+    $scope.check_number = 0;
     $scope.payment_amount = 0;
     $scope.session_voided = 0;
     $scope.payment_type = 'cash_payment';
@@ -274,7 +276,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
     function sendPayment(note) {
         var make_payments = generatePayments();
         billSvc.applyPayment(
-            $scope.payment_type, make_payments, note)
+            $scope.payment_type, make_payments, note, $scope.check_number)
         .then(function(payment_ids) {
 
             if ($scope.receipt_on_pay) {