Bugzilla – Attachment 9429 Details for
Bug 8045
Problems on Due date when checking in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8045: fixes "date due" when checking in
SIGNED-OFF-Bug-8045-fixes-date-due-when-checking-i.patch (text/plain), 1.59 KB, created by
Nicole C. Engard
on 2012-05-07 14:29:35 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8045: fixes "date due" when checking in
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-05-07 14:29:35 UTC
Size:
1.59 KB
patch
obsolete
>From 7ed4ae7978f38f5bf0be8044e084a8a3c550d64c Mon Sep 17 00:00:00 2001 >From: Adrien Saurat <adrien.saurat@biblibre.com> >Date: Mon, 7 May 2012 16:11:11 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 8045: fixes "date due" when checking in > >Added cloning of object parameters in "days_between" method. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> > >Checked in items that were overdue, due in the future and not >checked out and all showed the right info in the check in >table. >--- > Koha/Calendar.pm | 15 +++++++++------ > 1 files changed, 9 insertions(+), 6 deletions(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index 75c5c9e..f63e7eb 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -169,13 +169,16 @@ sub days_between { > my $start_dt = shift; > my $end_dt = shift; > >+ my $datestart_temp = $start_dt->clone(); >+ my $dateend_temp = $end_dt->clone(); >+ > # start and end should not be closed days >- my $duration = $end_dt->delta_days($start_dt); >- $start_dt->truncate( to => 'days' ); >- $end_dt->truncate( to => 'days' ); >- while ( DateTime->compare( $start_dt, $end_dt ) == -1 ) { >- $start_dt->add( days => 1 ); >- if ( $self->is_holiday($start_dt) ) { >+ my $duration = $dateend_temp->delta_days($datestart_temp); >+ $datestart_temp->truncate( to => 'days' ); >+ $dateend_temp->truncate( to => 'days' ); >+ while ( DateTime->compare( $datestart_temp, $dateend_temp ) == -1 ) { >+ $datestart_temp->add( days => 1 ); >+ if ( $self->is_holiday($datestart_temp) ) { > $duration->subtract( days => 1 ); > } > } >-- >1.7.2.3
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 8045
:
9428
| 9429