Fill statistics table properly for renewals; and issue->checkout, return->checkin
authorRyan Higgins <rch@liblime.com>
Sun, 25 May 2008 07:54:18 +0000 (02:54 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 27 May 2008 12:33:30 +0000 (07:33 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Circulation.pm
koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tmpl
reports/issues_stats.pl

index 5712c0e..0880c99 100644 (file)
@@ -1034,7 +1034,7 @@ sub AddIssue {
             C4::Context->userenv->{'branch'},
             'issue',                        $charge,
             '',                             $item->{'itemnumber'},
-            $item->{'itemtype'}, $borrower->{'borrowernumber'}
+            $item->{'itype'}, $borrower->{'borrowernumber'}
         );
     }
     
@@ -1879,7 +1879,7 @@ sub AddRenewal {
         $sth->finish;
     }
     # Log the renewal
-    UpdateStats( $branch, 'renew', $charge, '', $itemnumber );
+    UpdateStats( $branch, 'renew', $charge, '', $itemnumber, $item->{itype}, $borrowernumber);
 }
 
 sub GetRenewCount {
index 7089ce4..a37003a 100644 (file)
                 </tr>
                 <tr class="hilighted"> 
                 <td><label for="PeriodTypeSel">Type:</label><select name="PeriodTypeSel" id="PeriodTypeSel">
-                    <option value ="issue">Issue</option>
-                    <option value ="return">Return</option>
+                    <option value ="issue">Checkout</option>
+                    <option value ="renew">Renewal</option>
+                    <option value ="return">Checkin</option>
                     <option value ="localuse">Local Use</option>
                     </select></td>
                 <td colspan="2"><label for="DisplayBy">group by</label> <select name="DisplayBy" id="DisplayBy">
index 61b9ce7..8bce853 100755 (executable)
@@ -291,7 +291,7 @@ sub calculate {
                         push @loopfilter, \%cell;
                 }
         }
-        push @loopfilter,{crit=>"Issue|Return ",filter=>$type};
+        push @loopfilter,{crit=>"Event",filter=>$type};
         push @loopfilter,{crit=>"Display by ",filter=>$dsp} if ($dsp);
         push @loopfilter,{crit=>"Select Day ",filter=>$daysel} if ($daysel);
         push @loopfilter,{crit=>"Select Month ",filter=>$monthsel} if ($monthsel);