From: Thomas Berezansky Date: Tue, 17 Jan 2012 16:13:15 +0000 (-0500) Subject: Don't show estimated wait for negative estimates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0d9bccad69ba6f186e2960530884e88a319aaf07;p=contrib%2FConifer.git Don't show estimated wait for negative estimates JSPac code was just checking for the truth of the estimated_wait return, but the estimated_wait return can be -1 under some circumstances. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 302f0ec49f..7f006d2abd 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -461,7 +461,8 @@ function myOShowHoldStatus(r) { var row = $("myopac_holds_row_" + r.hold.id()); - if(qstats.estimated_wait || myopacShowHoldEstimate) { + // A note: estimated_wait may be -1 under some circumstances where it shouldn't be shown. + if((qstats.estimated_wait && qstats.estimated_wait > 0) || myopacShowHoldEstimate) { myopacShowHoldEstimate = true; if(qstats.estimated_wait) { // wait is currently returned in seconds, but displayed in days