X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=request.pl;h=dd494780128c64a668ac6daf6974c96645fd5a8b;hb=68f3587e7137a0f78f9511eedcbc31711cc8598d;hp=3653efe891056463fa746c7b3ba43db35a48d0ad;hpb=ae9610209601dc1dca9c4dc625f579f29653e690;p=koha.git diff --git a/request.pl b/request.pl index 3653efe891..dd49478012 100755 --- a/request.pl +++ b/request.pl @@ -34,6 +34,8 @@ use C4::Circulation::Circ2; use HTML::Template; use C4::Catalogue; use CGI; +use C4::Date; + my $input = new CGI; # get biblio information.... @@ -61,30 +63,11 @@ for (my $i=1; $i<=$num; $i++){ push(@optionloop, \%option); } - -# get branch information -my $branch = $input->cookie('branch'); -($branch) || ($branch = 'L'); -my $branches = getbranches(); -# make branch selection options... -my @branchloop; -foreach my $br (keys %$branches) { - (next) unless $branches->{$br}->{'IS'}; - # Only branches with the 'IS' branchrelation - # can issue books - my %abranch; - $abranch{'selected'}=($br eq $branch); - $abranch{'branch'}=$br; - $abranch{'branchname'}=$branches->{$br}->{'branchname'}; - push(@branchloop,\%abranch); -} - - # todays date my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =localtime(time); $year=$year+1900; $mon++; -my $date="$mday/$mon/$year"; +my $date=format_date("$year-$mon-$mday"); # get biblioitem information and build rows for form @@ -122,6 +105,7 @@ foreach my $dat (sort {$b->{'dateaccessioned'} cmp $a->{'dateaccessioned'}} @dat #existingreserves building my @reserveloop; +my $branches = getbranches(); foreach my $res (sort {$a->{'found'} cmp $b->{'found'}} @$reserves){ my %reserve; # my $prioropt = priorityoptions($totalcount, $res->{'priority'}); @@ -132,10 +116,9 @@ foreach my $res (sort {$a->{'found'} cmp $b->{'found'}} @$reserves){ $option{selected}=($i==$res->{'priority'}); push(@optionloop, \%option); } -# my $bropt = branchoptions($res->{'branchcode'}); my @branchloop; foreach my $br (keys %$branches) { - (next) unless $branches->{$br}->{'IS'}; +# (next) unless $branches->{$br}->{'IS'}; # Only branches with the 'IS' branchrelation # can issue books my %abranch; @@ -154,7 +137,7 @@ foreach my $res (sort {$a->{'found'} cmp $b->{'found'}} @$reserves){ $reserve{'wbrcode'} = $res->{'branchcode'}; $reserve{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'}; } - $reserve{'date'} = slashifyDate($res->{'reservedate'}); + $reserve{'date'} = format_date($res->{'reservedate'}); $reserve{'borrowernumber'}=$res->{'borrowernumber'}; $reserve{'biblionumber'}=$res->{'biblionumber'}; $reserve{'bornum'}=$res->{'borrowernumber'};