Bugzilla – Attachment 29802 Details for
Bug 12596
Backdating returns with SpecifiyReturnDate causes fines for items not overdue!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not overdue!
Bug-12596---Backdating-returns-with-SpecifiyReturn.patch (text/plain), 1.16 KB, created by
Kyle M Hall (khall)
on 2014-07-17 14:57:26 UTC
(
hide
)
Description:
Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not overdue!
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-07-17 14:57:26 UTC
Size:
1.16 KB
patch
obsolete
>From 9f250f8b9389fba0b4ef419458f8edd805a647f8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 17 Jul 2014 10:57:06 -0400 >Subject: [PATCH] Bug 12596 - Backdating returns with SpecifiyReturnDate causes fines for items not overdue! > >When using the backdating of returns feature, an item that is not >overdue is treated as being as many days overdue as it is *not* overdue. >This is due to the fact that _get_chargeable_units appears to return the >difference between the return date and the due date without >consideration the return date being earlier than the due date. >--- > C4/Overdues.pm | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 169b36c..e4cb241 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -283,6 +283,11 @@ C<$branchcode> is the branch whose calendar to use for finding holidays. > > sub _get_chargeable_units { > my ($unit, $dt1, $dt2, $branchcode) = @_; >+ >+ # If the due date is later than the return date >+ return 0 if ( $dt1 > $dt2 ); >+ ## FIXME: Add unit test >+ > my $charge_units = 0; > my $charge_duration; > if ($unit eq 'hours') { >-- >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 12596
:
29802
|
29803
|
29804
|
29805
|
29806
|
29940
|
29941
|
30049
|
30050