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

(-)a/Koha/EDI.pm (-8 / +5 lines)
Lines 45-50 use Koha::Plugins; # Adds plugin dirs to @INC Link Here
45
use Koha::Plugins::Handler;
45
use Koha::Plugins::Handler;
46
use Koha::Acquisition::Baskets;
46
use Koha::Acquisition::Baskets;
47
use Koha::Acquisition::Booksellers;
47
use Koha::Acquisition::Booksellers;
48
use Koha::Acquisition::Orders;
48
49
49
our $VERSION = 1.1;
50
our $VERSION = 1.1;
50
51
Lines 330-345 sub process_invoice { Link Here
330
                # ModReceiveOrder does not validate that $ordernumber exists validate here
331
                # ModReceiveOrder does not validate that $ordernumber exists validate here
331
                if ($order) {
332
                if ($order) {
332
333
333
                    # check suggestions
334
                    my $order_koha_object = Koha::Acquisition::Orders->find($ordernumber);
334
                    my $s = $schema->resultset('Suggestion')->search(
335
                    my $suggestions = $order_koha_object->suggestions;
335
                        {
336
                    while ( my $suggestion = $suggestions->next ) {
336
                            biblionumber => $order->biblionumber->biblionumber,
337
                        }
338
                    )->single;
339
                    if ($s) {
340
                        ModSuggestion(
337
                        ModSuggestion(
341
                            {
338
                            {
342
                                suggestionid => $s->suggestionid,
339
                                suggestionid => $suggestion->id,
343
                                STATUS       => 'AVAILABLE',
340
                                STATUS       => 'AVAILABLE',
344
                            }
341
                            }
345
                        );
342
                        );
(-)a/acqui/addorder.pl (-13 / +1 lines)
Lines 340-345 if ( $op eq 'cud-order' ) { Link Here
340
                {
340
                {
341
                    suggestionid => $suggestionid,
341
                    suggestionid => $suggestionid,
342
                    biblionumber => $orderinfo->{biblionumber},
342
                    biblionumber => $orderinfo->{biblionumber},
343
                    ordernumber => $order->ordernumber,
343
                    STATUS       => 'ORDERED',
344
                    STATUS       => 'ORDERED',
344
                }
345
                }
345
            );
346
            );
Lines 369-386 if ( $op eq 'cud-order' ) { Link Here
369
        $order->populate_with_prices_for_ordering();
370
        $order->populate_with_prices_for_ordering();
370
        $order->store;
371
        $order->store;
371
372
372
        # change suggestion status if applicable
373
        if ( my $suggestionid = $input->param('suggestionid') ) {
374
            ModSuggestion(
375
                {
376
                    suggestionid => $suggestionid,
377
                    biblionumber => $orderinfo->{biblionumber},
378
                    ordernumber => $order->ordernumber,
379
                    STATUS       => 'ORDERED',
380
                }
381
            );
382
        }
383
384
        # Log the order creation
373
        # Log the order creation
385
        if ( C4::Context->preference("AcquisitionLog") ) {
374
        if ( C4::Context->preference("AcquisitionLog") ) {
386
            my $infos = {};
375
            my $infos = {};
387
- 

Return to bug 35717