#!/usr/bin/perl
-# $Id$
# Copyright 2000-2002 Katipo Communications
#
use C4::Auth;
use CGI;
use C4::Context;
-use HTML::Template;
-use C4::Search;
+
use C4::Output;
use C4::Koha;
-use C4::Interface::CGI::Output;
-use C4::Circulation::Circ2;
+use C4::Circulation;
+use C4::Date;
=head1 NAME
=head1 DESCRIPTION
-
-=over2
+=over 2
=cut
my $line = $input->param("Line");
my $column = $input->param("Column");
my @filters = $input->param("Filter");
+$filters[0]=format_date_in_iso($filters[0]);
+$filters[1]=format_date_in_iso($filters[1]);
+$filters[2]=format_date_in_iso($filters[2]);
+$filters[3]=format_date_in_iso($filters[3]);
my $podsp = $input->param("PlacedOnDisplay");
my $rodsp = $input->param("ReceivedOnDisplay");
my $aodsp = $input->param("AcquiredOnDisplay"); ##added by mason.
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {editcatalogue => 1},
+ flagsrequired => {reports => 1},
debug => 1,
});
$template->param(do_it => $do_it,
- intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
- intranetstylesheet => C4::Context->preference("intranetstylesheet"),
- IntranetNav => C4::Context->preference("IntranetNav"),
+ DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(),
);
if ($do_it) {
else {
print $input->header(
-type => 'application/vnd.sun.xml.calc',
+ -encoding => 'utf-8',
-attachment => "$basename.csv",
-name => "$basename.csv"
);
}
my $CGIBookSellers = CGI::scrolling_list(
-name => 'Filter',
- -id => 'Filter',
+ -id => 'supplier',
-values => \@select,
# -labels => \%select,
}
my $CGIItemTypes = CGI::scrolling_list(
-name => 'Filter',
- -id => 'Filter',
+ -id => 'itemtypes',
-values => \@select,
-labels => \%select,
-size => 1,
}
my $CGIBudget = CGI::scrolling_list(
-name => 'Filter',
- -id => 'Filter',
+ -id => 'budget',
-values => \@select,
-labels => \%select,
-size => 1,
}
my $CGISort1 = CGI::scrolling_list(
-name => 'Filter',
- -id => 'Filter',
+ -id => 'sort1',
-values => \@select,
-size => 1,
-multiple => 0
}
my $CGISort2 = CGI::scrolling_list(
-name => 'Filter',
- -id => 'Filter',
+ -id => 'sort2',
-values => \@select,
-size => 1,
-multiple => 0
if ( ( ( $i == 1 ) or ( $i == 3 ) ) and ( @$filters[ $i - 1 ] ) ) {
$cell{err} = 1 if ( @$filters[$i] < @$filters[ $i - 1 ] );
}
- $cell{filter} .= @$filters[$i];
+ # format the dates filters, otherwise just fill as is
+ if ($i>=4) {
+ $cell{filter} .= @$filters[$i];
+ } else {
+ $cell{filter} .= format_date(@$filters[$i]);
+ }
$cell{crit} .= "Placed On From" if ( $i == 0 );
$cell{crit} .= "Placed On To" if ( $i == 1 );
$cell{crit} .= "Received On From" if ( $i == 2 );
# preparing calculation
my $strcalc;
$strcalc .= "SELECT $linefield, $colfield, ";
- $strcalc .= "COUNT( aqorders.ordernumber ) " if ( $process == 1 );
+ $strcalc .= "SUM( aqorders.quantity ) " if ( $process == 1 );
$strcalc .= "SUM( aqorders.quantity * aqorders.listprice ) "
if ( $process == 2 );
$strcalc .= "FROM (aqorders, aqbasket,aqorderbreakdown)