use C4::Auth;
use C4::Branch;
use C4::Output;
-use C4::Acquisition qw/GetBasket NewBasket GetContracts ModBasketHeader/;
+use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/;
use C4::Bookseller qw/GetBookSellerFromId GetBookSeller/;
+use C4::Contract qw/GetContracts/;
my $input = new CGI;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "acqui/basketheader.tmpl",
+ template_name => "acqui/basketheader.tt",
query => $input,
type => "intranet",
authnotrequired => 0,
if (! $booksellerid) {
$booksellerid=$basket->{'booksellerid'};
}
- @contractloop = &GetContracts($booksellerid, 1);
+ my $contracts = GetContracts({
+ booksellerid => $booksellerid,
+ activeonly => 1,
+ });
+
+ @contractloop = @$contracts;
for (@contractloop) {
if ( $basket->{'contractnumber'} eq $_->{'contractnumber'} ) {
$_->{'selected'} = 1;
} else {
#new basket
my $basket;
- push(@contractloop, &GetContracts($booksellerid, 1));
+ my $contracts = GetContracts({
+ booksellerid => $booksellerid,
+ activeonly => 1,
+ });
+ push(@contractloop, @$contracts);
}
my $bookseller = GetBookSellerFromId($booksellerid);
my $count = scalar @contractloop;
$input->param('basketnote'),
$input->param('basketbooksellernote'),
$input->param('basketcontractnumber') || undef,
- undef,
$input->param('deliveryplace'),
$input->param('billingplace'),
);