minor fixes (in query building & html typos), no new features
authortipaul <tipaul>
Thu, 17 Mar 2005 14:53:03 +0000 (14:53 +0000)
committertipaul <tipaul>
Thu, 17 Mar 2005 14:53:03 +0000 (14:53 +0000)
koha-tmpl/intranet-tmpl/default/en/reports/acquisitions_stats.tmpl
koha-tmpl/intranet-tmpl/default/en/reports/issues_stats.tmpl
koha-tmpl/intranet-tmpl/default/en/reports/reports-home.tmpl
reports/issues_stats.pl

index e8bad61..7b8a48e 100644 (file)
                        </tr>
                        <tr class="hilighted"> 
                                <td>&nbsp;</td>
-                               <td align="center" colspan="2">by <select name="PlacedOnDisplay">
-                                       <option value=""> </option>
-                                       <option value ="1">Day</option>
+                               <td align="center" colspan="2">group by <select name="PlacedOnDisplay">
+                                       <option value="">None</option>
+                                       <option value ="1">Day of week</option>
                                        <option value ="2">Month</option>
                                        <option value ="3">Year</option>
                                        </select>
                        </tr>
                        <tr> 
                                <td>&nbsp;</td>
-                               <td align="center" colspan="2">by <select name="ReceivedOnDisplay">
-                                       <option value=""> </option>
-                                       <option value ="1">Day</option>
+                               <td align="center" colspan="2">group by <select name="ReceivedOnDisplay">
+                                       <option value="">None</option>
+                                       <option value ="1">Day of week</option>
                                        <option value ="2">Month</option>
                                        <option value ="3">Year</option>
                                        </select>
        
        <div id="bloc25">
                <h3 class="reports"> Cell value </h3>
-                       <input type="radio" name="Cellvalue" value="1"> Count items
+                       <input type="radio" name="Cellvalue" value="1" checked> Count items
                        <input type="radio" name="Cellvalue" value="2"> Amount
        </div>
        <div id="bloc25">
index b226353..2501751 100644 (file)
                                        <option value ="issue">Issue</option>
                                        <option value ="return">Return</option>
                                        </select></td>
-                               <td align="center" colspan="2">by <select name="DisplayBy">
-                                       <option value=""> </option>
-                                       <option value ="1">Day</option>
+                               <td align="center" colspan="2">group by <select name="DisplayBy">
+                                       <option value="">None</option>
+                                       <option value ="1">Day of week</option>
                                        <option value ="2">Month</option>
                                        <option value ="3">Year</option>
                                        </select>
        
        <div id="bloc25">
                <h3 class="reports"> Cell value </h3>
-                       <p><input type="radio" name="Cellvalue" value="1"> Count issues </p>
+                       <p><input type="radio" name="Cellvalue" value="1" checked> Count issues </p>
                        <p><input type="radio" name="Cellvalue" value="3"> Circulation rate </p>
        </div>
        <div id="bloc25">
index 2ab13a7..5ce671b 100644 (file)
@@ -3,28 +3,26 @@
 <div id="mainbloc">
 <h1 class="reports">Reports</h1>
 <div id="bloc25">
-       <h2 class="reports">Stats on borrowers</h2>
-       <ul>
-               <li><a href="/cgi-bin/koha/reports/borrowers_stats.pl">Global reports</a></li>
-       </ul>
-       <h2 class="reports">Stats on catalogue</h2>
+       <h2 class="reports">Stat wizard on </h2>
+       <p><a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Acquisitions</a></p>
+       <p><a href="/cgi-bin/koha/reports/borrowers_stats.pl">Borrowers</a></p>
+       <p><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalogue</a></p>
+       <p><a href="/cgi-bin/koha/reports/issues_stats.pl">Issues</a></p>
+</div>
+<div id="bloc25">
+       <h2 class="reports">Other stats</h2>
+       <p>on catalogue</p>
        <ul>
                <li><a href="/cgi-bin/koha/reports/inventory.pl">Inventory/Stocktaking</a></li>
                <li><a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalogue by itemtype</a></li>
-               <li><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalogue statistics</a></li>
        </ul>
-       <h2 class="reports">Stats on issues</h2>
+       <p>on issues</p>
        <ul>
-               <li><a href="/cgi-bin/koha/reports/issues_stats.pl">Global reports</a></li>
                <li><a href="/cgi-bin/koha/stats.pl?time=yesterday">Till Reconciliation:</a> Daily Report (yesterday)</li>
                <li><a href="/cgi-bin/koha/stats.pl?time=today">Till Reconciliation:</a> Daily Report (today)</li>
                <li><a href="/cgi-bin/koha/overdue.pl">Overdue items</a></li>
                <li><a href="/cgi-bin/koha/reports/manager.pl?report_name=issues_by_borrower_category">Issues by borrower category</a></li>
        </ul>
-       <h2 class="reports">Stats on acquisitions</h2>
-       <ul>
-               <li><a href="/cgi-bin/koha/reports/acquisitions_stats.pl">Global reports</a></li>
-       </ul>
 </div>
 <div id="bloc25">
        <h2 class="reports">data exports</h2>
index 84f6976..9be9fd1 100755 (executable)
@@ -307,7 +307,7 @@ sub calculate {
        my $linefield;                               
        if (($line =~/datetime/) and ($dsp == 1)) {
                #Display by day
-               $linefield .="dayname($line)";  
+               $linefield .="concat(weekday($line),' ',dayname($line))";  
        } elsif (($line=~/datetime/) and ($dsp == 2)) {
                #Display by Month
                $linefield .="monthname($line)";  
@@ -319,7 +319,9 @@ sub calculate {
        } else {
                $linefield .= $line;
        }  
-       
+       my $lineorder = $linefield;
+       $lineorder = "weekday($line)" if $lineorder =~ "^dayname";
+
        my $strsth;
        $strsth .= "select distinctrow $linefield from statistics, borrowers where (statistics.borrowernumber=borrowers.borrowernumber) and $line is not null ";
        
@@ -339,8 +341,8 @@ sub calculate {
                $strsth .= " and $line LIKE ? " ;
        }
        $strsth .=" group by $linefield";
-       $strsth .=" order by $linefield";
-#      warn "". $strsth;
+       $strsth .=" order by $lineorder";
+       warn "". $strsth;
        
        my $sth = $dbh->prepare( $strsth );
        if (( @linefilter ) and ($linefilter[1])){
@@ -467,8 +469,8 @@ sub calculate {
        $strcalc .= " AND monthname(datetime) like '" . $monthsel ."'" if ( $monthsel );
        $strcalc .= " AND statistics.type like '" . $type ."'" if ( $type );
        
-       $strcalc .= " group by $linefield, $colfield order by $linefield,$colfield";
-#      warn "". $strcalc;
+       $strcalc .= " group by $linefield, $colfield order by $lineorder,$colfield";
+       warn "". $strcalc;
        my $dbcalc = $dbh->prepare($strcalc);
        $dbcalc->execute;
 #      warn "filling table";