[SIGNED-OFF} Fix for Bug 6623 - Nicer style for "clear screen" button
[koha.git] / reports / acquisitions_stats.pl
index aa3ea5d..8220148 100755 (executable)
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 # test comment
 
 use strict;
+#use warnings; FIXME - Bug 2505
 use C4::Auth;
 use CGI;
 use C4::Context;
@@ -56,7 +57,6 @@ my $aodsp          = $input->param("AcquiredOnDisplay");    ##added by mason.
 my $calc           = $input->param("Cellvalue");
 my $output         = $input->param("output");
 my $basename       = $input->param("basename");
-my $mime           = $input->param("MIME");
 
 #warn "calcul : ".$calc;
 my ($template, $borrowernumber, $cookie)
@@ -228,15 +228,10 @@ else {
         -multiple => 0
     );
 
-    my @mime = ( C4::Context->preference("MIME") );
-    foreach my $mime (@mime) {
-        #               warn "".$mime;
-    }
-
     my $CGIextChoice = CGI::scrolling_list(
         -name     => 'MIME',
         -id       => 'MIME',
-        -values   => \@mime,
+        -values   => ['CSV'], # FIXME translation
         -size     => 1,
         -multiple => 0
     );
@@ -437,7 +432,7 @@ sub calculate {
         }
     }
     $strsth .= " GROUP BY $linefield";
-    $strsth .= " ORDER BY $linefield";
+    $strsth .= " ORDER BY $line";
 
     #warn "377:strsth= $strsth";
 
@@ -554,7 +549,7 @@ sub calculate {
 
 
     $strsth2 .= " GROUP BY $colfield";
-    $strsth2 .= " ORDER BY $colfield";
+    $strsth2 .= " ORDER BY $column";
 
     my $sth2 = $dbh->prepare($strsth2);