@@ -, +, @@ date - 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 - 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 - Turn off SpecifyDueDate - on-site use with and without restriction should set the due date to the current date now --- circ/circulation.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -160,7 +160,7 @@ else { my ($datedue,$invalidduedate); my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); -if( $onsite_checkout ) { +if( $onsite_checkout && !$duedatespec_allow ) { $datedue = output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); $datedue .= ' 23:59:00'; } elsif( $duedatespec_allow ) { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -50,7 +50,9 @@ 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'); + [% IF !Koha.Preference('SpecifyDueDate') %] + $("#duedatespec").datetimepicker('destroy'); + [% END %] } else { $("#duedatespec").datetimepicker({ onClose: function(dateText, inst) { $("#barcode").focus(); }, --