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 |
); |