use C4::Auth;
use C4::Branch; # GetBranches
use C4::Biblio; # GetBiblioItemData
-use C4::Date;
+use C4::Dates;
my $input = new CGI;
my $itm = $input->param('itm');
use CGI;
use C4::Output;
use C4::Auth;
-use C4::Date;
+use C4::Dates;
use C4::Overdues; # AddNotifyLine
use C4::Biblio;
use C4::Koha;
use C4::Output;
use C4::Print;
use C4::Auth qw/:DEFAULT get_session/;
-use C4::Date;
+use C4::Dates;
use C4::Branch; # GetBranches
use C4::Koha; # GetPrinter
use C4::Circulation;
# ($year, $month, $day) = ($duedatespec) ? split /-/, $duedatespec : (0,0,0);
#}
-my @datearr = localtime( time() );
+my @datearr = localtime();
# FIXME - Could just use POSIX::strftime("%Y%m%d", localtime);
my $todaysdate =
use CGI;
use C4::Auth;
use C4::Branch;
-use C4::Date;
+use C4::Dates;
my $input = new CGI;
-my $type = $input->param('type');
-
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-my $order=$input->param('order');
-my $bornamefilter=$input->param('borname');
-my $borcatfilter=$input->param('borcat');
-my $itemtypefilter=$input->param('itemtype');
-my $borflagsfilter=$input->param('borflags') || " ";
-my $branchfilter=$input->param('branch');
-my $showall=$input->param('showall');
-my $theme = $input->param('theme'); # only used if allowthemeoverride is set
-
+my $type = $input->param('type');
+my $theme = $input->param('theme'); # only used if allowthemeoverride is set
+my $order = $input->param('order');
+my $showall = $input->param('showall');
+
+my $bornamefilter = $input->param('borname');
+my $borcatfilter = $input->param('borcat');
+my $itemtypefilter = $input->param('itemtype');
+my $borflagsfilter = $input->param('borflags') || " ";
+my $branchfilter = $input->param('branch');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
use C4::Auth;
use C4::Output;
use C4::Circulation;
-use C4::Date;
+use C4::Dates;
use C4::Print;
use C4::Reserves;
use C4::Biblio;
my @payments = TotalPaid( $date, $date2 );
my $count = @payments;
my $total = 0;
+my $totalw = 0;
my $oldtime;
-my $totalw = 0;
my @loop;
my %row;
my $i = 0;
}
}
}
- my $hour = substr( $payments[$i]{'timestamp'}, 8, 2 );
- my $min = substr( $payments[$i]{'timestamp'}, 10, 2 );
- my $sec = substr( $payments[$i]{'timestamp'}, 12, 2 );
- my $time = "$hour:$min:$sec";
- my $time2 = "$payments[$i]{'date'}";
+ my $time2 = $payments[$i]{'date'};
my $branch = Getpaidbranch( $time2, $payments[$i]{'borrowernumber'} );
my $borrowernumber = $payments[$i]{'borrowernumber'};
my $oldtime = $payments[$i]{'timestamp'};
&& $oldtype == $payments[$i]{'accounttype'}
&& $oldtime eq $payments[$i]{'timestamp'} )
{
- my $hour = substr( $payments[$i]{'timestamp'}, 8, 2 );
- my $min = substr( $payments[$i]{'timestamp'}, 10, 2 );
- my $sec = substr( $payments[$i]{'timestamp'}, 12, 2 );
- my $time = "$hour:$min:$sec";
- my $time2 = "$payments[$i]{'date'}";
- my $branch = Getpaidbranch( $time2, $payments[$i]{'borrowernumber'} );
+ my $xtime2 = $payments[$i]{'date'};
+ my $branch = Getpaidbranch( $xtime2, $payments[$i]{'borrowernumber'} );
if ( $payments[$i]{'accounttype'} eq 'W' ) {
$totalw += $payments[$i]{'amount'};
}
use CGI;
use C4::Branch; # GetBranches
use C4::Auth;
-use C4::Date;
+use C4::Dates;
use C4::Circulation;
use C4::Reserves;
use C4::Members;
use C4::Output;
use C4::Branch;
use C4::Auth;
-use C4::Date;
+use C4::Dates;
use C4::Biblio;
use C4::Circulation;
use C4::Members;
my $theme = $input->param('theme'); # only used if allowthemeoverride is set
my $itemnumber = $input->param('itemnumber');
-my $todaysdate = join "-", &Today;
+
# if we have a resturn of the form to delete the transfer, we launch the subrroutine
if ($itemnumber) {
my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} );
my $itemtypeinfo = getitemtypeinfo( $gettitle->{'itemtype'} );
- $getransf{'title'} = $gettitle->{'title'};
$getransf{'datetransfer'} = format_date( $num->{'datesent'} );
- $getransf{'biblionumber'} = $gettitle->{'biblionumber'};
- $getransf{'itemnumber'} = $gettitle->{'itemnumber'};
- $getransf{'barcode'} = $gettitle->{'barcode'};
- $getransf{'itemtype'} = $itemtypeinfo->{'description'};
- $getransf{'homebranch'} = $gettitle->{'homebranch'};
- $getransf{'holdingbranch'} = $gettitle->{'holdingbranch'};
- $getransf{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
+ $getransf{'itemtype'} = $itemtypeinfo->{'description'};
+ foreach (qw(title biblionumber itemnumber barcode homebranch holdingbranch itemcallnumber)) {
+ $getransf{$_} = $gettitle->{$_};
+ }
# we check if we have a reserv for this transfer
my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'} );
$template->param(
branchesloop => \@branchesloop,
- show_date => format_date($todaysdate),
+ show_date => format_date(join("-", &Today)),
);
output_html_with_http_headers $input, $cookie, $template->output;
use C4::Output;
use C4::Branch; # GetBranchName
use C4::Auth;
-use C4::Date;
+use C4::Dates;
use C4::Circulation;
use C4::Members;
use C4::Biblio;
print $input->header(-type => 'text/plain', -charset => 'ISO-8859-1');
my $dbh = C4::Context->dbh;
-my $query = "SELECT surname, firstname, cardnumber, address, city, zipcode ".
+$query = "SELECT surname, firstname, cardnumber, address, city, zipcode ".
"FROM borrowers " .
"WHERE surname LIKE '". $query . "%' " .
"OR firstname LIKE '" . $query . "%' " .