|
Lines 1388-1405
sub AddIssue {
Link Here
|
| 1388 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
1388 |
C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve ); |
| 1389 |
|
1389 |
|
| 1390 |
# Starting process for transfer job (checking transfert and validate it if we have one) |
1390 |
# Starting process for transfer job (checking transfert and validate it if we have one) |
| 1391 |
my ($datesent) = GetTransfers( $item_object->itemnumber ); |
1391 |
if ( my $transfer = $item_object->get_transfer ) { |
| 1392 |
if ($datesent) { |
|
|
| 1393 |
# updating line of branchtranfert to finish it, and changing the to branch value, implement a comment for visibility of this case (maybe for stats ....) |
1392 |
# updating line of branchtranfert to finish it, and changing the to branch value, implement a comment for visibility of this case (maybe for stats ....) |
| 1394 |
my $sth = $dbh->prepare( |
1393 |
$transfer->set( |
| 1395 |
"UPDATE branchtransfers |
1394 |
{ |
| 1396 |
SET datearrived = now(), |
1395 |
datearrived => dt_from_string, |
| 1397 |
tobranch = ?, |
1396 |
tobranch => C4::Context->userenv->{branch}, |
| 1398 |
comments = 'Forced branchtransfer' |
1397 |
comments => 'Forced branchtransfer' |
| 1399 |
WHERE itemnumber= ? AND datearrived IS NULL" |
1398 |
} |
| 1400 |
); |
1399 |
)->store; |
| 1401 |
$sth->execute( C4::Context->userenv->{'branch'}, |
1400 |
if ( $transfer->reason eq 'Reserve' ) { |
| 1402 |
$item_object->itemnumber ); |
1401 |
my $hold = $item_object->holds->search( { found => 'T' } )->next; |
|
|
1402 |
if ( $hold ) { # Is this really needed? |
| 1403 |
$hold->set( { found => undef } )->store; |
| 1404 |
C4::Reserves::ModReserveMinusPriority($item_object->itemnumber, $hold->reserve_id); |
| 1405 |
} |
| 1406 |
} |
| 1403 |
} |
1407 |
} |
| 1404 |
|
1408 |
|
| 1405 |
# If automatic renewal wasn't selected while issuing, set the value according to the issuing rule. |
1409 |
# If automatic renewal wasn't selected while issuing, set the value according to the issuing rule. |
| 1406 |
- |
|
|