|
Lines 334-357
if ( $op eq 'cud-order' ) {
Link Here
|
| 334 |
$orderinfo->{biblionumber} = $biblionumber; |
334 |
$orderinfo->{biblionumber} = $biblionumber; |
| 335 |
} |
335 |
} |
| 336 |
|
336 |
|
| 337 |
# change suggestion status if applicable |
|
|
| 338 |
if ( my $suggestionid = $input->param('suggestionid') ) { |
| 339 |
ModSuggestion( |
| 340 |
{ |
| 341 |
suggestionid => $suggestionid, |
| 342 |
biblionumber => $orderinfo->{biblionumber}, |
| 343 |
ordernumber => $orderinfo->{ordernumber}, |
| 344 |
STATUS => 'ORDERED', |
| 345 |
} |
| 346 |
); |
| 347 |
if ( C4::Context->preference('PlaceHoldsOnOrdersFromSuggestions') ) { |
| 348 |
my $suggestion = Koha::Suggestions->find($suggestionid); |
| 349 |
if ($suggestion) { |
| 350 |
$suggestion->place_hold(); |
| 351 |
} |
| 352 |
} |
| 353 |
} |
| 354 |
|
| 355 |
$orderinfo->{unitprice} = $orderinfo->{ecost} |
337 |
$orderinfo->{unitprice} = $orderinfo->{ecost} |
| 356 |
if not defined $orderinfo->{unitprice} |
338 |
if not defined $orderinfo->{unitprice} |
| 357 |
or $orderinfo->{unitprice} eq ''; |
339 |
or $orderinfo->{unitprice} eq ''; |
|
Lines 370-375
if ( $op eq 'cud-order' ) {
Link Here
|
| 370 |
$order->populate_with_prices_for_ordering(); |
352 |
$order->populate_with_prices_for_ordering(); |
| 371 |
$order->store; |
353 |
$order->store; |
| 372 |
|
354 |
|
|
|
355 |
# change suggestion status if applicable |
| 356 |
if ( my $suggestionid = $input->param('suggestionid') ) { |
| 357 |
ModSuggestion( |
| 358 |
{ |
| 359 |
suggestionid => $suggestionid, |
| 360 |
biblionumber => $orderinfo->{biblionumber}, |
| 361 |
ordernumber => $order->ordernumber, |
| 362 |
STATUS => 'ORDERED', |
| 363 |
} |
| 364 |
); |
| 365 |
if ( C4::Context->preference('PlaceHoldsOnOrdersFromSuggestions') ) { |
| 366 |
my $suggestion = Koha::Suggestions->find($suggestionid); |
| 367 |
if ($suggestion) { |
| 368 |
$suggestion->place_hold(); |
| 369 |
} |
| 370 |
} |
| 371 |
} |
| 372 |
|
| 373 |
# Log the order creation |
373 |
# Log the order creation |
| 374 |
if ( C4::Context->preference("AcquisitionLog") ) { |
374 |
if ( C4::Context->preference("AcquisitionLog") ) { |
| 375 |
my $infos = {}; |
375 |
my $infos = {}; |
| 376 |
- |
|
|