Lines 373-378
sub SendAlerts {
Link Here
|
373 |
my $sthorders; |
373 |
my $sthorders; |
374 |
my $dataorders; |
374 |
my $dataorders; |
375 |
my $action; |
375 |
my $action; |
|
|
376 |
my $basketno; |
376 |
if ( $type eq 'claimacquisition') { |
377 |
if ( $type eq 'claimacquisition') { |
377 |
$strsth = qq{ |
378 |
$strsth = qq{ |
378 |
SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.* |
379 |
SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.* |
Lines 419-424
sub SendAlerts {
Link Here
|
419 |
} |
420 |
} |
420 |
|
421 |
|
421 |
if ( $type eq 'orderacquisition') { |
422 |
if ( $type eq 'orderacquisition') { |
|
|
423 |
my $basketno = $externalid; |
422 |
$strsth = qq{ |
424 |
$strsth = qq{ |
423 |
SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.* |
425 |
SELECT aqorders.*,aqbasket.*,biblio.*,biblioitems.* |
424 |
FROM aqorders |
426 |
FROM aqorders |
Lines 429-441
sub SendAlerts {
Link Here
|
429 |
AND orderstatus IN ('new','ordered') |
431 |
AND orderstatus IN ('new','ordered') |
430 |
}; |
432 |
}; |
431 |
|
433 |
|
432 |
if (!$externalid){ |
434 |
unless ( $basketno ) { |
433 |
carp "No basketnumber given"; |
435 |
carp "No basketnumber given"; |
434 |
return { error => "no_basketno" }; |
436 |
return { error => "no_basketno" }; |
435 |
} |
437 |
} |
436 |
$action = "ACQUISITION ORDER"; |
438 |
$action = "ACQUISITION ORDER"; |
437 |
$sthorders = $dbh->prepare($strsth); |
439 |
$sthorders = $dbh->prepare($strsth); |
438 |
$sthorders->execute($externalid); |
440 |
$sthorders->execute($basketno); |
439 |
$dataorders = $sthorders->fetchall_arrayref( {} ); |
441 |
$dataorders = $sthorders->fetchall_arrayref( {} ); |
440 |
} |
442 |
} |
441 |
|
443 |
|
Lines 472-478
sub SendAlerts {
Link Here
|
472 |
'branches' => $userenv->{branch}, |
474 |
'branches' => $userenv->{branch}, |
473 |
'aqbooksellers' => $databookseller, |
475 |
'aqbooksellers' => $databookseller, |
474 |
'aqcontacts' => $datacontact, |
476 |
'aqcontacts' => $datacontact, |
475 |
'aqbasket' => $externalid, |
477 |
'aqbasket' => $basketno, |
476 |
}, |
478 |
}, |
477 |
repeat => $dataorders, |
479 |
repeat => $dataorders, |
478 |
want_librarian => 1, |
480 |
want_librarian => 1, |
479 |
- |
|
|