@@ -, +, @@ --- C4/Acquisition.pm | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) --- a/C4/Acquisition.pm +++ a/C4/Acquisition.pm @@ -28,7 +28,6 @@ use MARC::Record; use C4::Suggestions; use C4::Biblio; use C4::Debug; -use C4::SQLHelper qw(InsertInTable UpdateInTable); use C4::Bookseller qw(GetBookSellerFromId); use C4::Templates qw(gettemplate); @@ -1270,17 +1269,13 @@ sub NewOrder { croak "Mandatory parameter $key missing" unless $orderinfo->{$key}; } - if ( defined $orderinfo->{subscription} && $orderinfo->{'subscription'} eq 'yes' ) { - $orderinfo->{'subscription'} = 1; - } else { - $orderinfo->{'subscription'} = 0; - } $orderinfo->{'entrydate'} ||= C4::Dates->new()->output("iso"); if (!$orderinfo->{quantityreceived}) { $orderinfo->{quantityreceived} = 0; } - my $ordernumber=InsertInTable("aqorders",$orderinfo); + my $rs = Koha::Database->new()->schema->resultset('Aqorder'); + my $ordernumber = $rs->create($orderinfo)->id; if (not $orderinfo->{parent_ordernumber}) { my $sth = $dbh->prepare(" UPDATE aqorders --