[open-ils-commits] r15063 - in trunk/Open-ILS/xul/staff_client/server: circ patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 3 09:48:56 EST 2009
Author: phasefx
Date: 2009-12-03 09:48:54 -0500 (Thu, 03 Dec 2009)
New Revision: 15063
Modified:
trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
trunk/Open-ILS/xul/staff_client/server/patron/items.js
Log:
Use the new .duedate field for non-cat circs, which avoids closed dates like due dates for normal circs
Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkout.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-12-03 02:54:50 UTC (rev 15062)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkout.js 2009-12-03 14:48:54 UTC (rev 15063)
@@ -376,16 +376,7 @@
checkout.payload.circ.circ_lib( checkout.payload.noncat_circ.circ_lib() );
checkout.payload.circ.circ_staff( checkout.payload.noncat_circ.staff() );
checkout.payload.circ.usr( checkout.payload.noncat_circ.patron() );
-
- JSAN.use('util.date');
- var c = checkout.payload.noncat_circ.circ_time();
- var d = c == "now" ? new Date() : util.date.db_date2Date( c );
- var t =obj.data.hash.cnct[ checkout.payload.noncat_circ.item_type() ];
- var cd = t.circ_duration() || "14 days";
- var i = util.date.interval_to_seconds( cd ) * 1000;
- d.setTime( Date.parse(d) + i );
- checkout.payload.circ.due_date( util.date.formatted_date(d,'%F') );
-
+ checkout.payload.circ.due_date( checkout.payload.noncat_circ.duedate() );
}
}
Modified: trunk/Open-ILS/xul/staff_client/server/patron/items.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-12-03 02:54:50 UTC (rev 15062)
+++ trunk/Open-ILS/xul/staff_client/server/patron/items.js 2009-12-03 14:48:54 UTC (rev 15063)
@@ -210,12 +210,9 @@
fake_circ.xact_start( nc_circ.circ_time() );
fake_circ.renewal_remaining(0);
fake_circ.stop_fines('Non-Cataloged');
+ fake_circ.due_date( nc_circ.duedate() );
- JSAN.use('util.date');
- var c = nc_circ.circ_time();
- var d = c == "now" ? new Date() : util.date.db_date2Date( c );
- var t = obj.data.hash.cnct[ nc_circ.item_type() ];
- if (!t) {
+ if (!obj.data.hash.cnct[ nc_circ.item_type() ]) {
var robj2 = obj.network.simple_request('FM_CNCT_RETRIEVE',[ nc_circ.circ_lib() ]);
if (typeof robj2.ilsevent != 'undefined') throw(robj);
obj.data.stash_retrieve();
@@ -226,12 +223,7 @@
}
}
obj.data.stash('hash','list');
- t = obj.data.hash.cnct[ nc_circ.item_type() ];
}
- var cd = t.circ_duration() || $("patronStrings").getString('staff.patron.items.show_noncats.14_days');
- var i = util.date.interval_to_seconds( cd ) * 1000;
- d.setTime( Date.parse(d) + i );
- fake_circ.due_date( util.date.formatted_date(d,'%F') );
var fake_record = new mvr();
fake_record.title( obj.data.hash.cnct[ nc_circ.item_type() ].name());
More information about the open-ils-commits
mailing list