use C4::Output;
use C4::Search;
use C4::Auth;
-use C4::Biblio;
-use C4::Output;
use C4::Interface::CGI::Output;
use C4::Database;
use HTML::Template;
+use C4::Date;
my $input=new CGI;
my $id=$input->param('id');
my $biblio=$input->param('biblio');
my $catview=$input->param('catview');
my $gst=$input->param('gst');
-my ($count,@results)=ordersearch($search,$biblio,$catview);
+my ($count,@results)=ordersearch($search,$id,$biblio,$catview);
my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
-my @date=split('-',$results[0]->{'entrydate'});
-my $date="$date[2]/$date[1]/$date[0]";
+my $date = $results[0]->{'entrydate'};
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/acquire.tmpl",
$template->param($count);
if ($count == 1){
- my $query="Select itemtype,description from itemtypes order by description";
- my $sth=$dbh->prepare($query);
+ my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
$sth->execute;
my @itemtype;
my %itemtypes;
gst => $gst,
catview => ($catview ne 'yes'?1:0),
name => $booksellers[0]->{'name'},
- date => $date,
+ date => format_date($date),
title => $results[0]->{'title'},
author => $results[0]->{'author'},
- copyrightdate => $results[0]->{'copyrightdate'},
+ copyrightdate => format_date($results[0]->{'copyrightdate'}),
CGIitemtype => $CGIitemtype,
CGIbranch => $CGIbranch,
isbn => $results[0]->{'isbn'},
for (my $i=0;$i<$count;$i++){
my %line;
$line{isbn} = $results[$i]->{'isbn'};
+ $line{basketno} = $results[$i]->{'basketno'};
+ $line{quantity} = $results[$i]->{'quantity'};
+ $line{quantityrecieved} = $results[$i]->{'quantityreceived'};
$line{ordernumber} = $results[$i]->{'ordernumber'};
$line{biblionumber} = $results[$i]->{'biblionumber'};
$line{invoice} = $invoice;
$line{gst} = $gst;
$line{title} = $results[$i]->{'title'};
$line{author} = $results[$i]->{'author'};
+ $line{id} = $id;
push @loop,\%line;
}
- $template->param( loop => \@loop);
+ $template->param( loop => \@loop,
+ date => format_date($date),
+ name => $booksellers[0]->{'name'},
+ id => $id,
+ invoice => $invoice,
+);
}
output_html_with_http_headers $input, $cookie, $template->output;