Bug 8682 - Renewals do not appear on quick slips
authorLiz Rea <liz@catalyst.net.nz>
Thu, 31 Jan 2013 01:53:29 +0000 (14:53 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 24 Feb 2013 15:10:30 +0000 (10:10 -0500)
To test:
Issue two books to a patron.
Do a renewal on one of them.
update the issuedate on the item that has been renewed to something before today (renewals on the same day will work even without this patch)
I did: select * from issues;
update issues set issuedate="2013-01-25 14:00:00" where itemnumber = 948; (itemnumber is variable depending on your test data.)

Print a quick slip before the patch - the renewal will not show up as one of today's issues.
Print a quick slip after the patch - the renewal will show up as one of today's issues.

If you need reasoning as to why a renewal should show up on the quick slip, think of it as a record of everything
a borrower did today, without the hassle of overdues.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

C4/Members.pm

index 5c857f6..8042840 100644 (file)
@@ -2356,7 +2356,7 @@ sub IssueSlip {
 
     my $issueslist = GetPendingIssues($borrowernumber);
     foreach my $it (@$issueslist){
-        if ((substr $it->{'issuedate'}, 0, 10) eq $now) {
+        if ((substr $it->{'issuedate'}, 0, 10) eq $now || (substr $it->{'lastreneweddate'}, 0, 10) eq $now) {
             $it->{'now'} = 1;
         }
         elsif ((substr $it->{'date_due'}, 0, 10) le $now) {