use C4::Dates;
use C4::Acquisition;
use C4::Output;
+use C4::Reports;
use C4::Circulation;
use Date::Calc qw(
Today
my $output = $input->param("output");
my $basename = $input->param("basename");
my $mime = $input->param("MIME");
-my $del = $input->param("sep");
+our $sep = $input->param("sep");
+$sep = "\t" if ($sep eq 'tabulation');
my $selected_branch; # = $input->param("?");
our $branches = GetBranches;
-attachment => "$basename.csv");
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
- my $sep;
- $sep =C4::Context->preference("delimiter");
print @$results[0]->{line} ."/". @$results[0]->{column} .$sep;
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
$req = $dbh->prepare("SELECT authorised_value,lib FROM authorised_values WHERE category='Bsort1' ORDER BY lib");
$req->execute;
$template->param( SORT1_LOOP => $req->fetchall_arrayref({}));
- $req = $dbh->prepare("SELECT DISTINCTROW sort2 AS value FROM borrowers WHERE sort2 IS NOT NULL AND sort <> '' ORDER BY sort2 LIMIT 200");
+ $req = $dbh->prepare("SELECT DISTINCTROW sort2 AS value FROM borrowers WHERE sort2 IS NOT NULL AND sort2 <> '' ORDER BY sort2 LIMIT 200");
# More than 200 items in a dropdown is not going to be useful anyway, and w/ 50,000 patrons we can destory DB performance.
$req->execute;
$template->param( SORT2_LOOP => $req->fetchall_arrayref({}));
-values => \@mime,
-size => 1,
-multiple => 0 );
- my @dels = ( C4::Context->preference("delimiter") );
- my $CGIsepChoice=CGI::scrolling_list(
- -name => 'sep',
- -id => 'sep',
- -values => \@dels,
- -size => 1,
- -multiple => 0 );
+ my $CGIsepChoice=GetDelimiterChoices;
$template->param(
CGIextChoice => $CGIextChoice,
CGIsepChoice => $CGIsepChoice,