[open-ils-commits] r1226 - servres/trunk/conifer/integration (artunit)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 9 10:30:30 EST 2011
Author: artunit
Date: 2011-02-09 10:30:28 -0500 (Wed, 09 Feb 2011)
New Revision: 1226
Modified:
servres/trunk/conifer/integration/uwindsor.py
Log:
quick fix for due date in multiple statuses
Modified: servres/trunk/conifer/integration/uwindsor.py
===================================================================
--- servres/trunk/conifer/integration/uwindsor.py 2011-02-09 05:23:25 UTC (rev 1225)
+++ servres/trunk/conifer/integration/uwindsor.py 2011-02-09 15:30:28 UTC (rev 1226)
@@ -162,14 +162,17 @@
if len(circmod) == 0:
circmod = circinfo.get("circ_modifier")
+ circs = circinfo.get("circulations")
+
+ if circs and len(circs) > 0:
+ circ = circs[0]
+ rawdate = circ.get("due_date")
+ #remove offset info, %z is flakey for some reason
+ rawdate = rawdate[:-5]
+ duetime = time.strptime(rawdate, settings.TIME_FORMAT)
+
if avail == 0 or bringfw:
- circs = circinfo.get("circulations")
if circs and len(circs) > 0:
- circ = circs[0]
- rawdate = circ.get("due_date")
- #remove offset info, %z is flakey for some reason
- rawdate = rawdate[:-5]
- duetime = time.strptime(rawdate, settings.TIME_FORMAT)
if len(dueinfo) == 0 or bringfw:
earliestdue = duetime
if voltest:
@@ -204,9 +207,11 @@
dueinfo = time.strftime(DUE_FORMAT,earliestdue)
callno = callnum
- alldisplay = callnum + ' Available'
- if (avail == 0):
- alldisplay = '%s %s' % (callnum, dueinfo)
+ alldisplay = callnum + ' (Available)'
+
+ if circs and len(circs) > 0:
+ alldisplay = '%s (DUE: %s)' % (callnum, time.strftime(settings.DUE_FORMAT,duetime))
+
alldues.append(alldisplay)
if voltest or attachtest:
More information about the open-ils-commits
mailing list