overdue_notices.pl send no email directly to patron
[koha.git] / C4 / Reports.pm
blob9bee9d7ac968f5f86fa41819984ad82e435da93f
1 package C4::Reports;
3 # Copyright 2007 Liblime Ltd
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
20 use strict;
21 use CGI;
23 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
24 use C4::Context;
25 use C4::Debug;
27 BEGIN {
28 # set the version for version checking
29 $VERSION = 0.13;
30 require Exporter;
31 @ISA = qw(Exporter);
32 @EXPORT = qw(
33 GetDelimiterChoices
37 =head1 NAME
39 C4::Reports - Module for generating reports
41 =head1 DESCRIPTION
43 This module contains functions common to reports.
45 =head1 EXPORTED FUNCTIONS
47 =head2 GetDelimiterChoices
49 =over 4
51 my $delims = GetDelimiterChoices;
53 =back
55 This will return a list of all the available delimiters.
57 =cut
59 sub GetDelimiterChoices {
60 my $dbh = C4::Context->dbh;
62 my $sth = $dbh->prepare("
63 SELECT options, value
64 FROM systempreferences
65 WHERE variable = 'delimiter'
66 ");
68 $sth->execute();
70 my ($choices, $default) = $sth->fetchrow;
71 my @dels = split /\|/, $choices;
73 return CGI::scrolling_list(
74 -name => 'sep',
75 -id => 'sep',
76 -default => $default,
77 -values => \@dels,
78 -size => 1,
79 -multiple => 0 );
84 __END__
86 =head1 AUTHOR
88 Jesse Weaver <jesse.weaver@liblime.com>
90 =cut