Bugzilla – Attachment 34137 Details for
Bug 12895
Dropbox mode doesn't work correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12895 repair dropbox mode
0001-Bug-12895-repair-dropbox-mode.patch (text/plain), 3.87 KB, created by
Koha Team University Lyon 3
on 2014-12-05 09:43:35 UTC
(
hide
)
Description:
Bug 12895 repair dropbox mode
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2014-12-05 09:43:35 UTC
Size:
3.87 KB
patch
obsolete
>From e7a995ed68da442fccded235c705c6e200d69ca3 Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Fri, 5 Dec 2014 09:27:02 +0100 >Subject: [PATCH] Bug 12895 repair dropbox mode > >One day late patrons were restricted even with dropbox mode activated >--- > C4/Circulation.pm | 5 +++-- > circ/returns.pl | 14 +++++++++++--- > 2 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f24f2f7..28dc6c2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1736,7 +1736,7 @@ patron who last borrowed the book. > =cut > > sub AddReturn { >- my ( $barcode, $branch, $exemptfine, $dropbox, $return_date ) = @_; >+ my ( $barcode, $branch, $exemptfine, $dropbox, $return_date, $dropboxdate ) = @_; > > if ($branch and not GetBranchDetail($branch)) { > warn "AddReturn error: branch '$branch' not found. Reverting to " . C4::Context->userenv->{'branch'}; >@@ -1851,7 +1851,7 @@ sub AddReturn { > # FIXME: check issuedate > returndate, factoring in holidays > #$circControlBranch = _GetCircControlBranch($item,$borrower) unless ( $item->{'issuedate'} eq C4::Dates->today('iso') );; > $circControlBranch = _GetCircControlBranch($item,$borrower); >- $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $today ) == -1 ? 1 : 0; >+ $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $dropboxdate ) == -1 ? 1 : 0; > } > > if ($borrowernumber) { >@@ -1950,6 +1950,7 @@ sub AddReturn { > > if ( $issue->{overdue} && $issue->{date_due} ) { > # fix fine days >+ $today = $dropboxdate if $dropbox; > my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $today ); > if ($reminder){ > $messages->{'PrevDebarred'} = $debardate; >diff --git a/circ/returns.pl b/circ/returns.pl >index adc2f1e..0faf22a 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -241,7 +241,7 @@ if ($barcode) { > # save the return > # > ( $returned, $messages, $issueinformation, $borrower ) = >- AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override ); >+ AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $return_date_override, $dropboxdate ); > my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn'); > $homeorholdingbranchreturn ||= 'homebranch'; > >@@ -287,7 +287,11 @@ if ($barcode) { > $riduedate{0} = $duedate; > $input{borrowernumber} = $borrower->{'borrowernumber'}; > $input{duedate} = $duedate; >- $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, $time_now) == -1); >+ unless ( $dropboxmode ) { >+ $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, DateTime->now()) == -1); >+ } else { >+ $input{return_overdue} = 1 if (DateTime->compare($issueinformation->{date_due}, $dropboxdate) == -1); >+ } > push( @inputloop, \%input ); > > if ( C4::Context->preference("FineNotifyAtCheckin") ) { >@@ -533,7 +537,11 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { > $ri{minute} = $duedate->minute(); > $ri{duedate} = output_pref($duedate); > my ($b) = GetMemberDetails( $riborrowernumber{$_}, 0 ); >- $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1 ); >+ unless ( $dropboxmode ) { >+ $ri{return_overdue} = 1 if (DateTime->compare($duedate, DateTime->now()) == -1); >+ } else { >+ $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1); >+ } > $ri{borrowernumber} = $b->{'borrowernumber'}; > $ri{borcnum} = $b->{'cardnumber'}; > $ri{borfirstname} = $b->{'firstname'}; >-- >1.7.10.4 >
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 12895
:
34137
|
34693
|
34716