If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day.
Tying the on-site checkout due date to the template doesn't look like it can work if the SpecifyDueDate preference is turned off. circulation.pl won't even consider the date which gets passed if SpecifyDueDate is off: circulation.pl line 160: my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); if($duedatespec_allow){ if ($duedatespec) { if ($duedatespec =~ C4::Dates->regexp('syspref')) { $datedue = dt_from_string($duedatespec); Because of this it's probably better to calculate the custom due date for on-site checkouts in circulation.pl based on the onsite_checkout checkbox value.
Created attachment 33578 [details] [review] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59)
Created attachment 33690 [details] [review] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 33695 [details] [review] [PASSED QA] Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled If you have the SpecifyDueDate preference disabled and check something out as an on-site checkout the due date seems to follow the default circulation rule rather than restricted the checkout to that day. Test plan: 0/ Disable SpecifyDueDate and enable OnSiteCheckouts 1/ Check an item out to a patron and check the 'On-site checkout' checkbox 2/ Verify (screen and DB) that the due date is correct (today 23:59) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script.
Patch pushed to master. Thanks Jonathan!