From 51ca2cc1212cfae38712523d090df118b873e589 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 28 May 2014 16:46:09 -0400 Subject: [PATCH] bill page; use mbt not mobts Signed-off-by: Bill Erickson --- .../templates/staff/circ/patron/t_bills_list.tt2 | 8 +++--- .../web/js/ui/default/staff/circ/patron/bills.js | 31 +++++++++++++--------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2 index 241869eae2..d090ae3e51 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_bills_list.tt2 @@ -1,6 +1,6 @@ - + - - + + ' : 0}}; + var query = { + usr : billSvc.userId, + xact_finish : null, + 'summary.balance_owed' : {'<>' : 0} + }; + $scope.gridQuery = function() {return query}; $scope.gridSort = ['xact_start']; // default sort @@ -306,7 +308,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, for (var i = 0; i < selectedItems.length; i++) { // for/break var item = selectedItems[i]; - var owed = Number(item.balance_owed); + var owed = Number(item['summary.balance_owed']); if (payment_amount > owed) { // pending payment exceeds balance of current item. @@ -450,7 +452,10 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, // then clicking Apply Payment -- this just adds a speed bump (ditto // the XUL client). $scope.refundXact = function(all) { - var items = all.filter(function(item) {return item.balance_owed < 0}); + var items = all.filter(function(item) { + return item['summary.balance_owed'] < 0 + }); + if (items.length == 0) return; var ids = items.map(function(item) {return item.id}); -- 2.11.0