Browse Source

Resynching Savannah

3.0.x
tgarip1957 18 years ago
parent
commit
4843e0ee78
  1. 4
      acqui/neworderempty.pl
  2. 1
      admin/admin-home.pl
  3. 20
      admin/koha_attr.pl
  4. 1
      admin/systempreferences.pl
  5. 50
      admin/z3950servers.pl
  6. 3
      catalogue/ISBDdetail.pl
  7. 21
      catalogue/catalogue-search.pl
  8. 2
      catalogue/detail.pl
  9. 121
      catalogue/detailprint.pl
  10. 4
      catalogue/moredetail.pl
  11. 11
      circ/branchreserves.pl
  12. 4
      circ/branchtransfers.pl
  13. 5
      circ/circulation.pl
  14. 4
      circ/rescirculation.pl
  15. 4
      circ/resreturns.pl
  16. 25
      circ/returns.pl

4
acqui/neworderempty.pl

@ -140,8 +140,8 @@ if ( $ordnum eq '' ) { # create order
creationdate => format_date( $basket->{creationdate} ),
authorisedbyname => $basket->{authorisedbyname},);
}else{
my @datetoday = localtime();
my $date = (1900+$datetoday[5])."-".($datetoday[4]+1)."-". $datetoday[3];
my $date = get_today();
$template->param(
creationdate => format_date($date),
authorisedbyname => $loggedinuser,);

1
admin/admin-home.pl

@ -3,7 +3,6 @@
use strict;
use CGI;
use C4::Auth;
use C4::Output;
use C4::Interface::CGI::Output;

20
admin/koha_attr.pl

@ -70,7 +70,7 @@ if ($op eq 'add_form') {
#---- if primkey exists, it's a modify action, so read values to modify...
my $data;
if ($id) {
$sth=$dbh->prepare("select id,kohafield,attr,extraattr,label,sorts,recordtype,tagfield,tagsubfield,opacshow,intrashow,facets_label from koha_attr where id=? ");
$sth=$dbh->prepare("select id,kohafield,attr,label,sorts,recordtype,tagfield,tagsubfield,opacshow,intrashow from koha_attr where id=? ");
$sth->execute($id);
$data=$sth->fetchrow_hashref;
$sth->finish;
@ -126,13 +126,11 @@ if ($op eq 'add_form') {
$template->param('use-heading-flags-p' => 1);
$template->param(label => $data->{'label'},
attr=> $data->{'attr'},
extraattr=>$data->{'extraattr'},
recordtype=>$recordlist,
tagfield=>$taglist,
tagsubfield=>$tagsublist,
facets_label=>$data->{'facets_label'},
sorts => CGI::checkbox(-name=>'sorts',
-checked=> $data->{'sorts'}?'checked':'',
-checked=> $data->{'sorts'}?'checked':'',
-value=> 1,
-label => '',
-id=> 'sorts'),
@ -155,12 +153,11 @@ if ($op eq 'add_form') {
} elsif ($op eq 'add_validate') {
my $id =$input->param('id');
$sth=$dbh->prepare("replace koha_attr set id=?,kohafield=?,attr=?,extraattr=?,label=?,sorts=?,recordtype=?,tagfield=?,tagsubfield=? ,opacshow=?,intrashow=? ,facets_label=?");
$sth=$dbh->prepare("replace koha_attr set id=?,kohafield=?,attr=?,label=?,sorts=?,recordtype=?,tagfield=?,tagsubfield=? ,opacshow=?,intrashow=? ");
my $kohafield =$input->param('kohafield');
my $attr =$input->param('attr');
my $extraattr =$input->param('extraattr');
my $label = $input->param('label');
my $sorts =$input->param('sorts');
my $opacshow =$input->param('opacshow');
@ -168,9 +165,8 @@ my $id =$input->param('id');
my $recordtype =$input->param('recordtype');
my $tagfield =$input->param('tagfield');
my $tagsubfield =$input->param('tagsubfield');
my $facets_label =$input->param('facets_label');
unless (C4::Context->config('demo') eq 1) {
$sth->execute( $id,$kohafield,$attr,$extraattr,$label,$sorts?1:0,$recordtype,$tagfield,$tagsubfield,$opacshow?1:0,$intrashow?1:0,$facets_label);
$sth->execute( $id,$kohafield,$attr,$label,$sorts?1:0,$recordtype,$tagfield,$tagsubfield,$opacshow?1:0,$intrashow?1:0);
}
$sth->finish;
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=koha_attr.pl?searchfield=$kohafield\"></html>";
@ -233,13 +229,11 @@ my $id =$input->param('id');
$row_data{label} = $results[$i]->{'label'};
$row_data{sorts} = $results[$i]->{'sorts'};
$row_data{attr} = $results[$i]->{'attr'};
$row_data{extraattr} = $results[$i]->{'extraattr'};
$row_data{recordtype} = $results[$i]->{'recordtype'};
$row_data{tagfield} = $results[$i]->{'tagfield'};
$row_data{tagsubfield} = $results[$i]->{'tagsubfield'};
$row_data{opacshow} = $results[$i]->{'opacshow'};
$row_data{intrashow} = $results[$i]->{'intrashow'};
$row_data{facets_label} = $results[$i]->{'facets_label'};
$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
$row_data{toggle} = $toggle;
@ -267,15 +261,13 @@ my $id =$input->param('id');
$row_data{label} = $results[$i]->{'label'};
$row_data{sorts} = $results[$i]->{'sorts'};
$row_data{attr} = $results[$i]->{'attr'};
$row_data{extraattr} = $results[$i]->{'extraattr'};
$row_data{recordtype} = $results[$i]->{'recordtype'};
$row_data{tagfield} = $results[$i]->{'tagfield'};
$row_data{tagsubfield} = $results[$i]->{'tagsubfield'};
$row_data{opacshow} = $results[$i]->{'opacshow'};
$row_data{intrashow} = $results[$i]->{'intrashow'};
$row_data{facets_label} = $results[$i]->{'facets_label'};
$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{marctokoha}."&amp;id=".$results[$i]->{'id'};
$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{marctokoha}."&amp;id=".$results[$i]->{'id'};
$row_data{edit} = "$script_name?op=add_form&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
$row_data{delete} = "$script_name?op=delete_confirm&amp;searchfield=".$results[$i]->{'kohafield'}."&amp;id=".$results[$i]->{'id'};
$row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
}

1
admin/systempreferences.pl

@ -73,6 +73,7 @@ my %tabsysprefs;
$tabsysprefs{z3950AuthorAuthFields}="Catalogue";
$tabsysprefs{z3950NormalizeAuthor}="Catalogue";
$tabsysprefs{SQLorZEBRA}="Catalogue";
# Circulation
$tabsysprefs{maxoutstanding}="Circulation";
$tabsysprefs{maxreserves}="Circulation";

50
admin/z3950servers.pl

@ -33,7 +33,7 @@ sub StringSearch {
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
my $count=@data;
my $sth=$dbh->prepare("Select host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers where (name like ?) order by rank,name");
my $sth=$dbh->prepare("Select * from z3950servers where (name like ?) order by rank,name");
$sth->execute("$data[0]\%");
my @results;
while (my $data=$sth->fetchrow_hashref) {
@ -76,7 +76,7 @@ if ($op eq 'add_form') {
my $data;
if ($searchfield) {
my $dbh = C4::Context->dbh;
my $sth=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers where (name = ?) order by rank,name");
my $sth=$dbh->prepare("select * from z3950servers where (name = ?) order by rank,name");
$sth->execute($searchfield);
$data=$sth->fetchrow_hashref;
$sth->finish;
@ -87,7 +87,17 @@ if ($op eq 'add_form') {
db => $data->{'db'},
userid => $data->{'userid'},
password => $data->{'password'},
checked => $data->{'checked'},
opacshow => CGI::checkbox(-name=>'opacshow',
-checked=> $data->{'opacshow'}?'checked':'',
-value=> 1,
-label => '',
-id=> 'opacshow'),
checked => CGI::checkbox(-name=>'checked',
-checked=> $data->{'checked'}?'checked':'',
-value=> 1,
-label => '',
-id=> 'checked'),
rank => $data->{'rank'});
# END $OP eq ADD_FORM
################## ADD_VALIDATE ##################################
@ -98,30 +108,24 @@ if ($op eq 'add_form') {
my $sth=$dbh->prepare("select * from z3950servers where name=?");
$sth->execute($input->param('searchfield'));
if ($sth->rows) {
$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=? where name=?");
$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,opacshow=?,syntax=? where name=?");
$sth->execute($input->param('host'),
$input->param('port'),
$input->param('db'),
$input->param('userid'),
$input->param('password'),
$input->param('searchfield'),
$input->param('checked'),
$input->param('checked')?1:0,
$input->param('rank'),
$input->param('opacshow')?1:0,
$input->param('syntax'),
$input->param('searchfield'),
);
} else {
$sth=$dbh->prepare("insert into z3950servers (host,port,db,userid,password,name,checked,rank,syntax) values (?, ?, ?, ?, ?, ?, ?, ?,?)");
$sth->execute($input->param('host'),
$input->param('port'),
$input->param('db'),
$input->param('userid'),
$input->param('password'),
$input->param('searchfield'),
$input->param('checked'),
$input->param('rank'),
$input->param('syntax'),
);
$sth=$dbh->prepare("insert into z3950servers (host,port,db,userid,password,name,checked,rank,opacshow,syntax) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
$sth->execute($input->param('host'), $input->param('port'), $input->param('db'), $input->param('userid'),
$input->param('password'), $input->param('searchfield'),$input->param('checked')?1:0, $input->param('rank'),
$input->param('opacshow')?1:0,$input->param('syntax') );
}
$sth->finish;
# END $OP eq ADD_VALIDATE
@ -131,7 +135,7 @@ if ($op eq 'add_form') {
$template->param(delete_confirm => 1);
my $dbh = C4::Context->dbh;
my $sth2=$dbh->prepare("select host,port,db,userid,password,name,id,checked,rank,syntax from z3950servers where (name = ?) order by rank,name");
my $sth2=$dbh->prepare("select * from z3950servers where (name = ?) order by rank,name");
$sth2->execute($searchfield);
my $data=$sth2->fetchrow_hashref;
$sth2->finish;
@ -141,7 +145,16 @@ if ($op eq 'add_form') {
db => $data->{'db'},
userid => $data->{'userid'},
password => $data->{'password'},
checked => $data->{'checked'},
checked => CGI::checkbox(-name=>'checked',
-checked=> $data->{'checked'}?'checked':'',
-value=> 1,
-label => '',
-id=> 'checked'),
opacshow => CGI::checkbox(-name=>'opacshow',
-checked=> $data->{'opacshow'}?'checked':'',
-value=> 1,
-label => '',
-id=> 'opacshow'),
rank => $data->{'rank'});
# END $OP eq DELETE_CONFIRM
@ -173,6 +186,7 @@ if ($op eq 'add_form') {
userid =>$results->[$i]{'userid'},
password => ($results->[$i]{'password'}) ? ('#######') : ('&nbsp;'),
checked => $results->[$i]{'checked'},
opacshow => $results->[$i]{'opacshow'},
rank => $results->[$i]{'rank'},
syntax => $results->[$i]{'syntax'},
toggle => $toggle);

3
catalogue/ISBDdetail.pl

@ -85,12 +85,13 @@ my $res;
if ($tag<10) {
my $value=XML_readline_onerecord($record,"","",$tag);
my $subfieldcode = "@";
my $subfieldvalue = get_authorised_value_desc($tag, $subf[$i][0], $value, '', $dbh);;
my $subfieldvalue = get_authorised_value_desc($tag, "", $value, '', $dbh);;
my $tagsubf = $tag.$subfieldcode;
$calculated =~ s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
} else {
my @subf = XML_readline_withtags($record,"","",$tag);
for my $i (0..$#subf) {
my $subfieldcode = $subf[$i][0];
my $subfieldvalue = get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);;

21
catalogue/catalogue-search.pl

@ -52,14 +52,21 @@ foreach my $marc (@marclist) {
}
#### Now normal search routine
foreach my $field (@fields) {
$search{$field} = $query->param($field);
my @fieldvalue = $query->param($field);
foreach my $fvalue (@fieldvalue) {
push @forminputs, { field=>$field ,value=> $fvalue} unless ($field eq 'reorder');
$facetsdesc.="&".$field."=".$fvalue;
}
}
## Build the query for facets as well
for (my $i=0;$i<@value;$i++){
$facetsdesc.="&value=".$value[$i];
$facetsdesc.="&kohafield=".$kohafield[$i];
$facetsdesc.="&relation=".$relation[$i];
$facetsdesc.="&and_or=".$and_or[$i];
}
$facetsdesc.="&order=".$order;
$hashdesc{'query'} = join " , ", @value;
push @searchdesc,\%hashdesc;
@ -96,7 +103,7 @@ if (!$zoom){
## using sql search for barcode,biblionumber or itemnumber only useful for libraian interface
($count, @results) =sqlsearch($dbh,\%search);
}else{
my $sortorder=$order.",".$ascend if $order;
my $sortorder=$order.$ascend if $order;
($count,$facets,@results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$sortorder, \@and_or, 1,$reorder,$startfrom, $number_of_results,"intranet",$searchtype);
}
if ( $count eq "error"){
@ -187,7 +194,7 @@ if ( $count == 1){
pg => $url };
push @$numbers, { number => "&gt;&gt;",
highlight => 0 , forminputs=>\@forminputs,
start => ($total_pages-1)*$number_of_results,
startfrom => ($total_pages-1)*$number_of_results,
pg => $total_pages};
}
# push @$numbers,{forminputs=>@forminputs};
@ -227,7 +234,7 @@ my @sorts;
foreach my $sort (@kohafields) {
if ($sort->{sorts}){
push @sorts,$sort;
if ($order eq $sort->{'attr'}) {
if ($order eq $sort->{'kohafield'}) {
$sort->{'sel'} = 1;
}
}
@ -241,7 +248,7 @@ $template->param(branchloop => \@branches,);
my $itemtypes=GetItemTypes();
my (@item_type_loop);
foreach my $thisitemtype (sort keys %$itemtypes) {
my %row =(value => $thisitemtype,
my %row =(itemtype => $thisitemtype,
description => $itemtypes->{$thisitemtype}->{'description'},
);
push @item_type_loop, \%row;

2
catalogue/detail.pl

@ -9,8 +9,6 @@ use CGI;
use C4::Biblio;
use C4::Context;
use Encode;
my $dbh=C4::Context->dbh;
my $query=new CGI;
my ($template, $borrowernumber, $cookie)

121
catalogue/detailprint.pl

@ -17,89 +17,82 @@
# 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
use HTML::Template;
use strict;
require Exporter;
use C4::Context;
use C4::Output; # contains gettemplate
use CGI;
use C4::Search;
use C4::Auth;
use C4::Serials; #uses getsubscriptionfrom biblionumber
use C4::Interface::CGI::Output;
use C4::Date;
use CGI;
use C4::Biblio;
use C4::Context;
my $dbh=C4::Context->dbh;
my $query=new CGI;
my $type=$query->param('type');
($type) || ($type='intra');
my $biblionumber=$query->param('bib');
# change back when ive fixed request.pl
my @items = ItemInfo(undef, $biblionumber, $type);
my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "catalogue/detailprint.tmpl",
query => $query,
type => "intranet",
authnotrequired => 1,
flagsrequired => {borrow => 1},
});
my $biblionumber=$query->param('biblionumber');
$template->param(biblionumber => $biblionumber);
my $retrieve_from=C4::Context->preference('retrieve_from');
my ($record,$frameworkcode);
my @itemrecords;
my @items;
if ($retrieve_from eq "zebra"){
($record,@itemrecords)=ZEBRAgetrecord($biblionumber);
}else{
$record =XMLgetbiblio($dbh,$biblionumber);
$record=XML_xml2hash_onerecord($record);
my @itemxmls=XMLgetallitems($dbh,$biblionumber);
foreach my $itemrecord(@itemxmls){
my $itemhash=XML_xml2hash_onerecord($itemrecord);
push @itemrecords, $itemhash;
}
}
my $dat = XMLmarc2koha_onerecord($dbh,$record,"biblios");
my $norequests = 1;
foreach my $itm (@items) {
$norequests = 0 unless $itm->{'notforloan'};
foreach my $itemrecord (@itemrecords){
my $item= XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
$item=ItemInfo($dbh,$item);
$item->{itemtype}=$dat->{itemtype};
$norequests = 0 unless $item->{'notforloan'};
$item->{$item->{'publictype'}} = 1; ## NOT sure what this is kept from old db probably useless now
push @items,$item;
}
my $dat=bibdata($biblionumber);
my ($authorcount, $addauthor)= &addauthor($biblionumber);
my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
my ($websitecount, @websites) = &getwebsites($biblionumber);
my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
$dat->{'count'}=@items;
$dat->{'norequests'} = $norequests;
$template->param(count =>$dat->{'count'});
$template->param(norequests => $norequests);
$dat->{'additional'}=$addauthor->[0]->{'author'};
for (my $i = 1; $i < $authorcount; $i++) {
$dat->{'additional'} .= "|" . $addauthor->[$i]->{'author'};
} # for
## get notes subjects and URLS from MARC record
my $marcflavour = C4::Context->preference("marcflavour");
my $marcnotesarray = &getMARCnotes($dbh,$record,$marcflavour);
my $marcsubjctsarray = &getMARCsubjects($dbh,$record,$marcflavour);
my $marcurlssarray = &getMARCurls($dbh,$record,$marcflavour);
$template->param(MARCURLS => $marcurlssarray);
$template->param(MARCNOTES => $marcnotesarray);
$template->param(MARCSUBJCTS => $marcsubjctsarray);
my @results;
$results[0]=$dat;
my @results = ($dat,);
my $resultsarray=\@results;
my $itemsarray=\@items;
my $webarray=\@webbiblioitems;
my $sitearray=\@websites;
my $startfrom=$query->param('startfrom');
($startfrom) || ($startfrom=0);
my ($template, $loggedinuser, $cookie) = get_template_and_user({
template_name => ('catalogue/detailprint.tmpl'),
query => $query,
type => "intranet",
authnotrequired => ($type eq 'opac'),
flagsrequired => {catalogue => 1},
});
my $count=1;
# now to get the items into a hash we can use and whack that thru
my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20);
my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0);
$template->param(startfrom => $startfrom+1,
endat => $startfrom+20,
numrecords => $count,
nextstartfrom => $nextstartfrom,
prevstartfrom => $prevstartfrom,
BIBLIO_RESULTS => $resultsarray,
ITEM_RESULTS => $itemsarray,
WEB_RESULTS => $webarray,
SITE_RESULTS => $sitearray,
loggedinuser => $loggedinuser,
biblionumber => $biblionumber,
);
$template->param(BIBLIO_RESULTS => $resultsarray,
ITEM_RESULTS => $itemsarray,
subscriptionsnumber => $subscriptionsnumber,
);
output_html_with_http_headers $query, $cookie, $template->output;
# Local Variables:
# tab-width: 8
# End:

4
catalogue/moredetail.pl

@ -104,9 +104,7 @@ if ($flag != 0 && $override ne "yes"){
}else {
##UPDATE here
#my $sth=$dbh->prepare("update items set itemlost=? ,wthdrawn=? where itemnumber=?");
#$sth->execute($lost,$withdrawn,$itemnumber);
#$sth->finish;
XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'wthdrawn',$withdrawn,1);
XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',$lost);

11
circ/branchreserves.pl

@ -21,13 +21,10 @@
use strict;
use C4::Context;
use C4::Output;
use CGI;
use HTML::Template;
use C4::Auth;
use C4::Date;
use C4::Circulation::Circ2;
use Date::Manip;
use C4::Reserves2;
use C4::Search;
use C4::Koha;
@ -54,9 +51,8 @@ my ($template, $loggedinuser, $cookie)
});
my $default = C4::Context->userenv->{'branch'};
my @datearr = localtime(time());
my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
my $dbh=C4::Context->dbh;
my $todaysdate = get_today();
# if we have a return from the form we launch the subroutine CancelReserve
@ -94,6 +90,7 @@ my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.s
# if the document is not in his homebranch location and there is not reservation after, we transfer it
if (($fbr ne $tbr) and (not $nextreservinfo)){
C4::Circulation::Circ2::dotransfer($item,$fbr,$tbr);
C4::Circulation::Circ2::itemseen($dbh,$itm);
}
}
@ -136,4 +133,4 @@ foreach my $num (@getreserves) {
show_date => format_date($todaysdate),
);
print "Content-Type: text/html\n\n", $template->output;
output_html_with_http_headers $input, $cookie, $template->output;

4
circ/branchtransfers.pl

@ -25,11 +25,9 @@
use strict;
use CGI;
use C4::Circulation::Circ2;
use C4::Output;
use C4::Reserves2;
use C4::Auth;
use C4::Interface::CGI::Output;
use HTML::Template;
use C4::Koha;
use C4::Members;
###############################################
@ -39,7 +37,7 @@ my %env;
my $linecolor1='#ffffcc';
my $linecolor2='white';
my $branches = getbranches();
my $branches = GetBranches();
my $printers = getprinters(\%env);

5
circ/circulation.pl

@ -93,9 +93,8 @@ $env{'branchcode'}=$branch;
$env{'printer'}=$printer;
$env{'queue'}=$printer;
my @datearr = localtime(time());
# FIXME - Could just use POSIX::strftime("%Y%m%d", localtime);
my $todaysdate = (1900+$datearr[5])."-".sprintf ("%0.2d", ($datearr[4]+1))."-".sprintf ("%0.2d", ($datearr[3]));
my $todaysdate =get_today();
# check and see if we should print

4
circ/rescirculation.pl

@ -81,9 +81,7 @@ $env{'branchcode'}=$branch;
$env{'printer'}=$printer;
$env{'queue'}=$printer;
my @datearr = localtime(time());
# FIXME - Could just use POSIX::strftime("%Y%m%d", localtime);
my $todaysdate = (1900+$datearr[5])."-".sprintf ("%0.2d", ($datearr[4]+1))."-".sprintf ("%0.2d", ($datearr[3]));
my $todaysdate =get_today();
# check and see if we should print

4
circ/resreturns.pl

@ -32,7 +32,7 @@ use C4::Print;
use C4::Reserves2;
use C4::Auth;
use C4::Interface::CGI::Output;
#use HTML::Template;
use C4::Koha;
use C4::Members;
my $query = new CGI;
@ -55,7 +55,7 @@ my $headerbackgroundcolor = '#99cc33';
my $linecolor1 = '#ffffcc';
my $linecolor2 = 'white';
my $branches = getbranches();
my $branches = GetBranches();
my $printers = getprinters( \%env );
# my $branch = getbranch( $query, $branches );

25
circ/returns.pl

@ -34,6 +34,7 @@ use C4::Auth;
use C4::Interface::CGI::Output;
use C4::Koha;
use C4::Members;
use C4::Date;
my $query = new CGI;
#getting the template
@ -53,7 +54,7 @@ my %env;
my $headerbackgroundcolor = '#99cc33';
my $linecolor1 = '#ffffcc';
my $linecolor2 = 'white';
my $todaysdate =get_today();
my $branches = GetBranches();
my $printers = getprinters( \%env );
@ -237,16 +238,12 @@ if ( $messages->{'ResFound'} ) {
}
if ( $res->{'ResFound'} eq "Reserved" ) {
my @da = localtime( time() );
my $todaysdate =
sprintf( "%0.2d", ( $da[3] + 1 ) ) . "/"
. sprintf( "%0.2d", ( $da[4] + 1 ) ) . "/"
. ( $da[5] + 1900 );
$template->param(
found => 1,
branchname => $branches->{ $res->{'branchcode'} }->{'branchname'},
reserved => 1,
today => $todaysdate,
today =>format_date( $todaysdate),
itemnumber => $res->{'itemnumber'},
itemtitle => $iteminfo->{'title'},
itemauthor => $iteminfo->{'author'},
@ -414,17 +411,9 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
my $overduetext;
my $borrowerinfo;
if ($duedate) {
my @tempdate = split ( /-/, $duedate );
$ri{year}=$tempdate[0];
$ri{month}=$tempdate[1];
$ri{day}=$tempdate[2];
my $duedatenz = "$tempdate[2]/$tempdate[1]/$tempdate[0]";
my @datearr = localtime( time() );
my $todaysdate =
$datearr[5] . '-'
. sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
. sprintf( "%0.2d", $datearr[3] );
$ri{duedate}=$duedate;
$ri{duedate}=format_date($duedate);
my ($borrower) =
getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
$ri{bornum} = $borrower->{'borrowernumber'};

Loading…
Cancel
Save