From 0e7377a1394ccee49819a30ba4a7f541408e8d56 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 14 Nov 2016 16:44:25 -0500 Subject: [PATCH] better idea with Check Number unset default Check Number, disable widget if not Check Payment, and disable Apply Payment button if Check Payment with invalid Check Number Signed-off-by: Jason Etheridge Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 | 5 +++-- Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 index 99abe6f194..4378e32f53 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_bills.tt2 @@ -64,7 +64,8 @@
@@ -86,7 +87,7 @@
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index 4412c97f3c..35bab20e52 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -140,7 +140,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, billSvc.userId = $routeParams.id; // set up some defaults - $scope.check_number = 1; + $scope.check_number = null; $scope.payment_amount = null; $scope.session_voided = 0; $scope.payment_type = 'cash_payment'; @@ -229,6 +229,9 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, }); return -(amount / 100); } + $scope.invalid_check_number = function() { + return $scope.payment_type == 'check_payment' && ! $scope.check_number; + } // update the item.payment_pending value each time the user // selects different transactions to pay against. -- 2.43.2