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 (-12 lines)
Lines 329-345 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
329
        $orderinfo->{biblionumber}=$biblionumber;
329
        $orderinfo->{biblionumber}=$biblionumber;
330
    }
330
    }
331
331
332
    # change suggestion status if applicable
333
    if ( my $suggestionid = $input->param('suggestionid') ) {
334
        ModSuggestion(
335
            {
336
                suggestionid => $suggestionid,
337
                biblionumber => $orderinfo->{biblionumber},
338
                STATUS       => 'ORDERED',
339
            }
340
        );
341
    }
342
343
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
332
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
344
333
345
    my $order;
334
    my $order;
346
- 

Return to bug 35717