Bugzilla – Attachment 33578 Details for
Bug 13255
On-site checkout due date wrong if SpecifyDueDate is disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled
Bug-13255-On-site-checkout-due-date-wrong-if-Speci.patch (text/plain), 2.87 KB, created by
Jonathan Druart
on 2014-11-14 16:18:31 UTC
(
hide
)
Description:
Bug 13255: On-site checkout due date wrong if SpecifyDueDate is disabled
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-11-14 16:18:31 UTC
Size:
2.87 KB
patch
obsolete
>From ac6edd3c835e0ce4c1a78b9643bccb032c642ee3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 14 Nov 2014 17:15:57 +0100 >Subject: [PATCH] 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) >--- > circ/circulation.pl | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index bd7f821..6e9f449 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -104,6 +104,8 @@ if (!C4::Auth::haspermission( C4::Context->userenv->{id} , { circulate => 'force > $force_allow_issue = 0; > } > >+my $onsite_checkout = $query->param('onsite_checkout'); >+ > my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers > our %renew_failed = (); > for (@failedrenews) { $renew_failed{$_} = 1; } >@@ -158,7 +160,10 @@ else { > my ($datedue,$invalidduedate); > > my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); >-if($duedatespec_allow){ >+if( $onsite_checkout ) { >+ $datedue = output_pref({ dt => dt_from_string, dateonly => 1, dateformat => 'iso' }); >+ $datedue .= ' 23:59:00'; >+} elsif( $duedatespec_allow ) { > if ($duedatespec) { > if ($duedatespec =~ C4::Dates->regexp('syspref')) { > $datedue = dt_from_string($duedatespec); >@@ -336,7 +341,7 @@ if ($barcode) { > } > } > >- unless( $query->param('onsite_checkout') and C4::Context->preference("OnSiteCheckoutsForce") ) { >+ unless( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") ) { > delete $question->{'DEBT'} if ($debt_confirmed); > foreach my $impossible ( keys %$error ) { > $template->param( >@@ -361,13 +366,12 @@ if ($barcode) { > getTitleMessageIteminfo => $getmessageiteminfo->{'title'}, > getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'}, > NEEDSCONFIRMATION => 1, >- onsite_checkout => $query->param('onsite_checkout'), >+ onsite_checkout => $onsite_checkout, > ); > $confirm_required = 1; > } > } > unless($confirm_required) { >- my $onsite_checkout = $query->param('onsite_checkout'); > AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew') } ); > $session->clear('auto_renew'); > $inprocess = 1; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13255
:
33578
|
33690
|
33695