fix the sort value for Hold Available Time collab/phasefx/xul_patron_interfaces_date_sort
authorJason Etheridge <jason@esilibrary.com>
Wed, 2 May 2012 21:27:05 +0000 (17:27 -0400)
committerJason Etheridge <jason@esilibrary.com>
Wed, 2 May 2012 21:27:46 +0000 (17:27 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/circ/util.js

index d5d653d..0158080 100644 (file)
@@ -2003,15 +2003,11 @@ circ.util.hold_columns = function(modify,params) {
                 return "";
             }
             ,'sort_value' : function(my) {
-                // FIXME - ugh
-                return util.date.db_date2Date( my.acp.create_date() ).getTime();
-                if (my.ahr.transit() && my.ahr.transit().dest_recv_time()) {
-                    return util.date.db_date2Date( my.ahr.transit().dest_recv_time() ).getTime();
-                }
-                if (!my.ahr.transit() && my.ahr.capture_time()) {
-                    return util.date.db_date2Date( my.ahr.capture_time() ).getTime();
+                if (my.ahr.current_shelf_lib() == my.ahr.pickup_lib()) {
+                    return util.date.db_date2Date( my.ahr.shelf_time() ).getTime();
+                } else {
+                    return util.date.db_date2Date( null ).getTime();
                 }
-                return 0;
             }
         },
         {