From 09ed03b2d84ec63d410614ad18b5f11c33ec40f6 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 6 Mar 2015 10:39:19 +0100 Subject: [PATCH] Bug 13647: On-site checkouts - Allow library to specify due date This will remove the restriction that forces the due date for an on-site checkout to the end of the current day. It will still suggest the end of the day, but you will be able to change the date to whatever you want using the datepicker widget. To test: Before applying the patch: - Turn on OnSiteCheckouts and OnSiteCheckoutsForce system preferences - Check the on-site use checkbox and try to set due date manually, it should not be possible - Check out the item and check the due date is set to the end of today - Put a restriction on your patron account and repeat steps, the item checked out should again have a due date at the end of the day > There should be no way to be able to check out an item with a 'custom' due date Apply the patch: - Repeat steps from above, check out - on-site use without a restriction on your account - without changing the due date - with a due date picked with the datepicker - on-site use with a restriction on your account ... see above - no on-site use but with a specified due date - no on-site use, not specifying a due date Signed-off-by: Nicole Engard --- circ/circulation.pl | 5 +---- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 982669c..2a1e343 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -160,10 +160,7 @@ else { my ($datedue,$invalidduedate); my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); -if( $onsite_checkout ) { - $datedue = output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); - $datedue .= ' 23:59:00'; -} elsif( $duedatespec_allow ) { +if( $duedatespec_allow ) { if ($duedatespec) { if ($duedatespec =~ C4::Dates->regexp('syspref')) { $datedue = dt_from_string($duedatespec); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index c1613ad..a7a2074 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -50,7 +50,6 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); function toggle_onsite_checkout(){ if ( $("#onsite_checkout").attr('checked') ) { $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]") - $("#duedatespec").datetimepicker('destroy'); } else { $("#duedatespec").datetimepicker({ onClose: function(dateText, inst) { $("#barcode").focus(); }, -- 1.7.10.4