View | Details | Raw Unified | Return to bug 12626
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-8 / +2 lines)
Lines 28-34 use MARC::Record; Link Here
28
use C4::Suggestions;
28
use C4::Suggestions;
29
use C4::Biblio;
29
use C4::Biblio;
30
use C4::Debug;
30
use C4::Debug;
31
use C4::SQLHelper qw(InsertInTable UpdateInTable);
32
use C4::Bookseller qw(GetBookSellerFromId);
31
use C4::Bookseller qw(GetBookSellerFromId);
33
use C4::Templates qw(gettemplate);
32
use C4::Templates qw(gettemplate);
34
33
Lines 1270-1286 sub NewOrder { Link Here
1270
        croak "Mandatory parameter $key missing" unless $orderinfo->{$key};
1269
        croak "Mandatory parameter $key missing" unless $orderinfo->{$key};
1271
    }
1270
    }
1272
1271
1273
    if ( defined $orderinfo->{subscription} && $orderinfo->{'subscription'} eq 'yes' ) {
1274
        $orderinfo->{'subscription'} = 1;
1275
    } else {
1276
        $orderinfo->{'subscription'} = 0;
1277
    }
1278
    $orderinfo->{'entrydate'} ||= C4::Dates->new()->output("iso");
1272
    $orderinfo->{'entrydate'} ||= C4::Dates->new()->output("iso");
1279
    if (!$orderinfo->{quantityreceived}) {
1273
    if (!$orderinfo->{quantityreceived}) {
1280
        $orderinfo->{quantityreceived} = 0;
1274
        $orderinfo->{quantityreceived} = 0;
1281
    }
1275
    }
1282
1276
1283
    my $ordernumber=InsertInTable("aqorders",$orderinfo);
1277
    my $rs = Koha::Database->new()->schema->resultset('Aqorder');
1278
    my $ordernumber = $rs->create($orderinfo)->id;
1284
    if (not $orderinfo->{parent_ordernumber}) {
1279
    if (not $orderinfo->{parent_ordernumber}) {
1285
        my $sth = $dbh->prepare("
1280
        my $sth = $dbh->prepare("
1286
            UPDATE aqorders
1281
            UPDATE aqorders
1287
- 

Return to bug 12626