Bugzilla – Attachment 27944 Details for
Bug 8769
Allow SIP2 return backdating
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8769 - (QA Followup) Rename $today to $return_date_dt
Bug-8769---QA-Followup-Rename-today-to-returndated.patch (text/plain), 3.05 KB, created by
Kyle M Hall
on 2014-05-05 11:42:27 UTC
(
hide
)
Description:
Bug 8769 - (QA Followup) Rename $today to $return_date_dt
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2014-05-05 11:42:27 UTC
Size:
3.05 KB
patch
obsolete
>From d2767f254a933286c2d5db792808a5835284e3bc Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 5 May 2014 07:41:34 -0400 >Subject: [PATCH] Bug 8769 - (QA Followup) Rename $today to $return_date_dt > >--- > C4/Circulation.pm | 15 ++++++--------- > 1 files changed, 6 insertions(+), 9 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f89bb9a..1e8ce52 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1780,7 +1780,7 @@ sub AddReturn { > } > > # case of a return of document (deal with issues and holdingbranch) >- my $today = dt_from_string( $return_date, 'iso' ); >+ my $return_date_dt = dt_from_string( $return_date, 'iso' ); > > if ($doreturn) { > my $datedue = $issue->{date_due}; >@@ -1792,7 +1792,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'}, $return_date_dt ) == -1 ? 1 : 0; > } > > if ($borrowernumber) { >@@ -1805,12 +1805,9 @@ sub AddReturn { > : ( $control eq 'PatronLibrary' ) ? $borrower->{branchcode} > : $issue->{branchcode}; > >- my $date_returned = >- $return_date ? dt_from_string($return_date) : $today; >- > my ( $amount, $type, $unitcounttotal ) = > C4::Overdues::CalcFine( $item, $borrower->{categorycode}, >- $control_branchcode, $datedue, $date_returned ); >+ $control_branchcode, $datedue, $return_date_dt ); > > $type ||= q{}; > >@@ -1890,7 +1887,7 @@ sub AddReturn { > > if ( $issue->{overdue} && $issue->{date_due} ) { > # fix fine days >- my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $today ); >+ my ($debardate,$reminder) = _debar_user_on_return( $borrower, $item, $issue->{date_due}, $return_date_dt ); > if ($reminder){ > $messages->{'PrevDebarred'} = $debardate; > } else { >@@ -1900,8 +1897,8 @@ sub AddReturn { > } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) { > my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); > $borrower_debar_dt->truncate(to => 'day'); >- my $today_dt = $today->clone()->truncate(to => 'day'); >- if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { >+ my $return_date_dt_clone = $return_date_dt->clone()->truncate(to => 'day'); >+ if ( DateTime->compare( $borrower_debar_dt, $return_date_dt_clone ) != -1 ) { > $messages->{'PrevDebarred'} = $borrower->{'debarred'}; > } > } >-- >1.7.2.5
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 8769
:
12193
|
12811
|
12812
|
12813
|
15248
|
19999
|
20000
|
21942
|
23698
|
26753
|
27465
|
27466
|
27467
|
27944
|
27945
|
27946