LP1782631: Stop Styling Grocery Bills as Overdues
authorJason Boyer <jboyer@library.in.gov>
Thu, 19 Jul 2018 18:29:32 +0000 (14:29 -0400)
committerDan Wells <dbw2@calvin.edu>
Thu, 19 Jul 2018 19:05:37 +0000 (15:05 -0400)
Only checking for the lack of a value in the
checkin_time field causes grocery bills to still
trigger the bill colorizing feature, but because
they have no stop_fines reason they're colored
the same as an overdue item.

This patch requires the presence of a due_date
field before coloring a bill row.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/web/js/ui/default/staff/circ/patron/bills.js

index 63a7121..8f4157f 100644 (file)
@@ -223,7 +223,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
     // Apply coloring to rows based on fines stop reason
     $scope.colorizeBillsList = {
         apply: function(item) {
     // Apply coloring to rows based on fines stop reason
     $scope.colorizeBillsList = {
         apply: function(item) {
-            if (!item['circulation.checkin_time']) {
+            if (item['circulation.due_date'] && !item['circulation.checkin_time']) {
                 if (item['circulation.stop_fines'] == 'LOST') {
                     return 'lost-row';
                 } else if (item['circulation.stop_fines'] == 'LONGOVERDUE') {
                 if (item['circulation.stop_fines'] == 'LOST') {
                     return 'lost-row';
                 } else if (item['circulation.stop_fines'] == 'LONGOVERDUE') {
@@ -240,7 +240,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location,
         isEnabled: true,
         template: function(item) {
             var icon = '';
         isEnabled: true,
         template: function(item) {
             var icon = '';
-            if (!item['circulation.checkin_time']) {
+            if (item['circulation.due_date'] && !item['circulation.checkin_time']) {
                 if (item['circulation.stop_fines'] == "LOST") {
                     icon = 'glyphicon-question-sign';
                 } else if (item['circulation.stop_fines'] == "LONGOVERDUE") {
                 if (item['circulation.stop_fines'] == "LOST") {
                     icon = 'glyphicon-question-sign';
                 } else if (item['circulation.stop_fines'] == "LONGOVERDUE") {